From f48a49436e0fdd9c9350e9b794931e048ad3b047 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 27 Feb 2025 13:54:03 -0500 Subject: [PATCH 01/56] regenerate Python api client --- sdk/python/examples/pastebin/README.md | 2 +- sdk/python/sdk/zrok/.gitattributes | 1 + sdk/python/sdk/zrok/.swagger-codegen-ignore | 9 + sdk/python/sdk/zrok/.swagger-codegen/VERSION | 2 +- sdk/python/sdk/zrok/.travis.yml | 13 - sdk/python/sdk/zrok/README.md | 274 -- sdk/python/sdk/zrok/__init__.py | 1 + sdk/python/sdk/zrok/docs/AccessBody.md | 12 - sdk/python/sdk/zrok/docs/AccessBody1.md | 11 - sdk/python/sdk/zrok/docs/AccountApi.md | 383 --- sdk/python/sdk/zrok/docs/AccountBody.md | 10 - sdk/python/sdk/zrok/docs/AdminApi.md | 720 ------ sdk/python/sdk/zrok/docs/AuthUser.md | 10 - .../sdk/zrok/docs/ChangePasswordBody.md | 11 - .../sdk/zrok/docs/ClientVersionCheckBody.md | 9 - sdk/python/sdk/zrok/docs/Configuration.md | 13 - sdk/python/sdk/zrok/docs/DisableBody.md | 9 - sdk/python/sdk/zrok/docs/EnableBody.md | 10 - sdk/python/sdk/zrok/docs/Environment.md | 16 - .../sdk/zrok/docs/EnvironmentAndResources.md | 11 - sdk/python/sdk/zrok/docs/EnvironmentApi.md | 110 - sdk/python/sdk/zrok/docs/Environments.md | 8 - sdk/python/sdk/zrok/docs/ErrorMessage.md | 8 - sdk/python/sdk/zrok/docs/Frontend.md | 17 - sdk/python/sdk/zrok/docs/FrontendBody.md | 12 - sdk/python/sdk/zrok/docs/FrontendBody1.md | 9 - sdk/python/sdk/zrok/docs/FrontendBody2.md | 11 - sdk/python/sdk/zrok/docs/Frontends.md | 8 - sdk/python/sdk/zrok/docs/GrantsBody.md | 9 - sdk/python/sdk/zrok/docs/IdentityBody.md | 9 - sdk/python/sdk/zrok/docs/InlineResponse200.md | 9 - .../sdk/zrok/docs/InlineResponse2001.md | 9 - .../sdk/zrok/docs/InlineResponse2002.md | 14 - .../sdk/zrok/docs/InlineResponse2003.md | 9 - .../zrok/docs/InlineResponse2003Members.md | 10 - .../sdk/zrok/docs/InlineResponse2004.md | 9 - .../zrok/docs/InlineResponse2004Members.md | 10 - .../docs/InlineResponse2004Organizations.md | 10 - .../sdk/zrok/docs/InlineResponse2005.md | 9 - .../docs/InlineResponse2005Memberships.md | 11 - .../docs/InlineResponse2005Organizations.md | 10 - .../sdk/zrok/docs/InlineResponse2006.md | 9 - .../docs/InlineResponse2006Memberships.md | 11 - .../sdk/zrok/docs/InlineResponse2007.md | 9 - sdk/python/sdk/zrok/docs/InlineResponse201.md | 9 - .../sdk/zrok/docs/InlineResponse2011.md | 10 - .../sdk/zrok/docs/InlineResponse2012.md | 9 - .../sdk/zrok/docs/InlineResponse2013.md | 10 - sdk/python/sdk/zrok/docs/InlineResponse400.md | 9 - sdk/python/sdk/zrok/docs/InviteBody.md | 10 - sdk/python/sdk/zrok/docs/LoginBody.md | 10 - sdk/python/sdk/zrok/docs/MetadataApi.md | 796 ------ sdk/python/sdk/zrok/docs/Metrics.md | 12 - sdk/python/sdk/zrok/docs/MetricsSample.md | 11 - .../sdk/zrok/docs/OrganizationAddBody.md | 11 - sdk/python/sdk/zrok/docs/OrganizationBody.md | 9 - sdk/python/sdk/zrok/docs/OrganizationBody1.md | 9 - .../sdk/zrok/docs/OrganizationListBody.md | 9 - .../sdk/zrok/docs/OrganizationRemoveBody.md | 10 - sdk/python/sdk/zrok/docs/Overview.md | 10 - sdk/python/sdk/zrok/docs/Principal.md | 13 - .../zrok/docs/RegenerateAccountTokenBody.md | 9 - .../sdk/zrok/docs/RegenerateTokenBody.md | 9 - sdk/python/sdk/zrok/docs/RegisterBody.md | 10 - sdk/python/sdk/zrok/docs/ResetPasswordBody.md | 10 - .../sdk/zrok/docs/ResetPasswordRequestBody.md | 9 - sdk/python/sdk/zrok/docs/Share.md | 20 - sdk/python/sdk/zrok/docs/ShareApi.md | 315 --- sdk/python/sdk/zrok/docs/ShareBody.md | 12 - sdk/python/sdk/zrok/docs/ShareRequest.md | 22 - sdk/python/sdk/zrok/docs/ShareResponse.md | 10 - sdk/python/sdk/zrok/docs/Shares.md | 8 - sdk/python/sdk/zrok/docs/SparkData.md | 8 - sdk/python/sdk/zrok/docs/SparkDataSample.md | 10 - sdk/python/sdk/zrok/docs/SparklinesBody.md | 11 - sdk/python/sdk/zrok/docs/TokenGenerateBody.md | 9 - sdk/python/sdk/zrok/docs/UnaccessBody.md | 11 - sdk/python/sdk/zrok/docs/UnshareBody.md | 11 - sdk/python/sdk/zrok/docs/VerifyBody.md | 9 - sdk/python/sdk/zrok/docs/Version.md | 8 - sdk/python/sdk/zrok/docs/VersionBody.md | 9 - sdk/python/sdk/zrok/docs/VersionCheckBody.md | 9 - sdk/python/sdk/zrok/setup.cfg | 33 + sdk/python/sdk/zrok/setup.py | 25 +- sdk/python/sdk/zrok/test-requirements.txt | 5 - sdk/python/sdk/zrok/test/__init__.py | 1 - sdk/python/sdk/zrok/test/test_access_body.py | 39 - sdk/python/sdk/zrok/test/test_access_body1.py | 39 - sdk/python/sdk/zrok/test/test_account_api.py | 81 - sdk/python/sdk/zrok/test/test_account_body.py | 39 - sdk/python/sdk/zrok/test/test_admin_api.py | 117 - sdk/python/sdk/zrok/test/test_auth_user.py | 39 - .../zrok/test/test_change_password_body.py | 39 - .../test/test_client_version_check_body.py | 39 - .../sdk/zrok/test/test_configuration.py | 39 - sdk/python/sdk/zrok/test/test_disable_body.py | 39 - sdk/python/sdk/zrok/test/test_enable_body.py | 39 - sdk/python/sdk/zrok/test/test_environment.py | 39 - .../test/test_environment_and_resources.py | 39 - .../sdk/zrok/test/test_environment_api.py | 45 - sdk/python/sdk/zrok/test/test_environments.py | 39 - .../sdk/zrok/test/test_error_message.py | 39 - sdk/python/sdk/zrok/test/test_frontend.py | 39 - .../sdk/zrok/test/test_frontend_body.py | 39 - .../sdk/zrok/test/test_frontend_body1.py | 39 - .../sdk/zrok/test/test_frontend_body2.py | 39 - sdk/python/sdk/zrok/test/test_frontends.py | 39 - sdk/python/sdk/zrok/test/test_grants_body.py | 39 - .../sdk/zrok/test/test_identity_body.py | 39 - .../sdk/zrok/test/test_inline_response200.py | 39 - .../sdk/zrok/test/test_inline_response2001.py | 39 - .../sdk/zrok/test/test_inline_response2002.py | 39 - .../sdk/zrok/test/test_inline_response2003.py | 39 - .../test/test_inline_response2003_members.py | 39 - .../sdk/zrok/test/test_inline_response2004.py | 39 - .../test/test_inline_response2004_members.py | 39 - .../test_inline_response2004_organizations.py | 39 - .../sdk/zrok/test/test_inline_response2005.py | 39 - .../test_inline_response2005_memberships.py | 39 - .../test_inline_response2005_organizations.py | 39 - .../sdk/zrok/test/test_inline_response2006.py | 39 - .../test_inline_response2006_memberships.py | 39 - .../sdk/zrok/test/test_inline_response2007.py | 39 - .../sdk/zrok/test/test_inline_response201.py | 39 - .../sdk/zrok/test/test_inline_response2011.py | 39 - .../sdk/zrok/test/test_inline_response2012.py | 39 - .../sdk/zrok/test/test_inline_response2013.py | 39 - .../sdk/zrok/test/test_inline_response400.py | 39 - sdk/python/sdk/zrok/test/test_invite_body.py | 39 - sdk/python/sdk/zrok/test/test_login_body.py | 39 - sdk/python/sdk/zrok/test/test_metadata_api.py | 117 - sdk/python/sdk/zrok/test/test_metrics.py | 39 - .../sdk/zrok/test/test_metrics_sample.py | 39 - .../zrok/test/test_organization_add_body.py | 39 - .../sdk/zrok/test/test_organization_body.py | 39 - .../sdk/zrok/test/test_organization_body1.py | 39 - .../zrok/test/test_organization_list_body.py | 39 - .../test/test_organization_remove_body.py | 39 - sdk/python/sdk/zrok/test/test_overview.py | 39 - sdk/python/sdk/zrok/test/test_principal.py | 39 - .../test_regenerate_account_token_body.py | 39 - .../zrok/test/test_regenerate_token_body.py | 39 - .../sdk/zrok/test/test_register_body.py | 39 - .../sdk/zrok/test/test_reset_password_body.py | 39 - .../test/test_reset_password_request_body.py | 39 - sdk/python/sdk/zrok/test/test_share.py | 39 - sdk/python/sdk/zrok/test/test_share_api.py | 63 - sdk/python/sdk/zrok/test/test_share_body.py | 39 - .../sdk/zrok/test/test_share_request.py | 39 - .../sdk/zrok/test/test_share_response.py | 39 - sdk/python/sdk/zrok/test/test_shares.py | 39 - sdk/python/sdk/zrok/test/test_spark_data.py | 39 - .../sdk/zrok/test/test_spark_data_sample.py | 39 - .../sdk/zrok/test/test_sparklines_body.py | 39 - .../sdk/zrok/test/test_token_generate_body.py | 39 - .../sdk/zrok/test/test_unaccess_body.py | 39 - sdk/python/sdk/zrok/test/test_unshare_body.py | 39 - sdk/python/sdk/zrok/test/test_verify_body.py | 39 - sdk/python/sdk/zrok/test/test_version.py | 39 - sdk/python/sdk/zrok/test/test_version_body.py | 39 - .../sdk/zrok/test/test_version_check_body.py | 39 - sdk/python/sdk/zrok/tox.ini | 10 - sdk/python/sdk/zrok/versioneer.py | 2277 +++++++++++++++++ sdk/python/sdk/zrok/zrok/__init__.py | 4 + sdk/python/sdk/zrok/zrok/_version.py | 683 +++++ sdk/python/sdk/zrok/zrok/access.py | 57 + sdk/python/sdk/zrok/zrok/decor.py | 33 + sdk/python/sdk/zrok/zrok/dialer.py | 10 + .../sdk/zrok/zrok/environment/__init__.py | 1 + sdk/python/sdk/zrok/zrok/environment/dirs.py | 32 + sdk/python/sdk/zrok/zrok/environment/root.py | 2 +- sdk/python/sdk/zrok/zrok/listener.py | 29 + sdk/python/sdk/zrok/zrok/model.py | 76 + sdk/python/sdk/zrok/zrok/overview.py | 78 + sdk/python/sdk/zrok/zrok/proxy.py | 203 ++ sdk/python/sdk/zrok/zrok/share.py | 122 + sdk/python/sdk/zrok/zrok_api/__init__.py | 73 +- .../sdk/zrok/zrok_api/api/account_api.py | 55 +- sdk/python/sdk/zrok/zrok_api/api/admin_api.py | 121 +- .../sdk/zrok/zrok_api/api/environment_api.py | 19 +- .../sdk/zrok/zrok_api/api/metadata_api.py | 121 +- sdk/python/sdk/zrok/zrok_api/api/share_api.py | 39 +- sdk/python/sdk/zrok/zrok_api/api_client.py | 33 +- sdk/python/sdk/zrok/zrok_api/configuration.py | 45 +- .../sdk/zrok/zrok_api/models/__init__.py | 72 +- .../zrok/zrok_api/models/access_request.py | 136 + ...ine_response2013.py => access_response.py} | 26 +- .../sdk/zrok/zrok_api/models/account_body.py | 2 +- .../sdk/zrok/zrok_api/models/auth_user.py | 19 +- sdk/python/sdk/zrok/zrok_api/models/body.py | 175 ++ .../models/{invite_body.py => body1.py} | 43 +- .../{inline_response2007.py => body10.py} | 55 +- sdk/python/sdk/zrok/zrok_api/models/body11.py | 175 ++ sdk/python/sdk/zrok/zrok_api/models/body12.py | 123 + sdk/python/sdk/zrok/zrok_api/models/body13.py | 123 + .../{token_generate_body.py => body14.py} | 35 +- sdk/python/sdk/zrok/zrok_api/models/body15.py | 123 + .../{inline_response2012.py => body16.py} | 35 +- sdk/python/sdk/zrok/zrok_api/models/body17.py | 175 ++ sdk/python/sdk/zrok/zrok_api/models/body18.py | 123 + sdk/python/sdk/zrok/zrok_api/models/body19.py | 149 ++ sdk/python/sdk/zrok/zrok_api/models/body2.py | 149 ++ sdk/python/sdk/zrok/zrok_api/models/body20.py | 149 ++ sdk/python/sdk/zrok/zrok_api/models/body21.py | 123 + ...client_version_check_body.py => body22.py} | 35 +- .../models/{sparklines_body.py => body23.py} | 51 +- .../models/{access_body.py => body24.py} | 59 +- .../models/{access_body1.py => body25.py} | 51 +- .../models/{share_body.py => body26.py} | 59 +- .../models/{unaccess_body.py => body27.py} | 51 +- .../models/{unshare_body.py => body28.py} | 51 +- sdk/python/sdk/zrok/zrok_api/models/body3.py | 123 + .../models/{register_body.py => body4.py} | 43 +- .../{reset_password_body.py => body5.py} | 43 +- sdk/python/sdk/zrok/zrok_api/models/body6.py | 123 + .../models/{verify_body.py => body7.py} | 35 +- sdk/python/sdk/zrok/zrok_api/models/body8.py | 149 ++ sdk/python/sdk/zrok/zrok_api/models/body9.py | 208 ++ ...ord_body.py => change_password_request.py} | 34 +- .../sdk/zrok/zrok_api/models/configuration.py | 19 +- ...end_body.py => create_frontend_request.py} | 42 +- .../models/create_frontend_response.py | 110 + ...nd_body1.py => delete_frontend_request.py} | 18 +- .../{disable_body.py => disable_request.py} | 18 +- .../{enable_body.py => enable_request.py} | 26 +- ...ine_response2011.py => enable_response.py} | 26 +- .../sdk/zrok/zrok_api/models/environment.py | 19 +- .../models/environment_and_resources.py | 19 +- .../sdk/zrok/zrok_api/models/environments.py | 17 +- .../sdk/zrok/zrok_api/models/error_message.py | 17 +- .../sdk/zrok/zrok_api/models/frontend.py | 19 +- .../sdk/zrok/zrok_api/models/frontends.py | 17 +- .../sdk/zrok/zrok_api/models/grants_body.py | 2 +- .../sdk/zrok/zrok_api/models/identity_body.py | 2 +- .../zrok_api/models/inline_response200.py | 177 +- .../zrok_api/models/inline_response2001.py | 36 +- ...bers.py => inline_response2001_members.py} | 26 +- .../zrok_api/models/inline_response2002.py | 166 +- ...y => inline_response2002_organizations.py} | 48 +- .../zrok_api/models/inline_response2003.py | 36 +- ....py => inline_response2003_memberships.py} | 56 +- .../zrok_api/models/inline_response2004.py | 110 - .../zrok_api/models/inline_response2005.py | 110 - .../zrok_api/models/inline_response201.py | 19 +- .../zrok/zrok_api/models/invite_request.py | 136 + .../models/invite_token_generate_request.py | 110 + .../{login_body.py => login_request.py} | 26 +- .../zrok/zrok_api/models/login_response.py | 84 + .../sdk/zrok/zrok_api/models/metrics.py | 19 +- .../zrok/zrok_api/models/metrics_sample.py | 19 +- .../zrok_api/models/organization_add_body.py | 32 +- .../zrok/zrok_api/models/organization_body.py | 2 +- .../zrok_api/models/organization_body1.py | 32 +- .../zrok_api/models/organization_list_body.py | 32 +- ...se2006.py => organization_members_body.py} | 44 +- .../models/organization_remove_body.py | 32 +- .../organizationremove_organizations.py | 136 + .../sdk/zrok/zrok_api/models/overview.py | 19 +- .../zrok_api/models/password_requirements.py | 214 ++ .../sdk/zrok/zrok_api/models/principal.py | 19 +- .../zrok/zrok_api/models/public_frontend.py | 240 ++ .../zrok_api/models/public_frontend_list.py | 84 + ...token_body.py => regenerate_token_body.py} | 18 +- .../zrok/zrok_api/models/register_request.py | 136 + .../zrok/zrok_api/models/register_response.py | 110 + .../zrok_api/models/reset_password_request.py | 136 + .../models/reset_password_request_body.py | 2 +- sdk/python/sdk/zrok/zrok_api/models/share.py | 19 +- .../sdk/zrok/zrok_api/models/share_request.py | 31 +- .../zrok/zrok_api/models/share_response.py | 19 +- sdk/python/sdk/zrok/zrok_api/models/shares.py | 17 +- .../sdk/zrok/zrok_api/models/spark_data.py | 17 +- .../zrok/zrok_api/models/spark_data_sample.py | 19 +- .../zrok/zrok_api/models/unaccess_request.py | 162 ++ .../zrok/zrok_api/models/unshare_request.py | 162 ++ ...nd_body2.py => update_frontend_request.py} | 34 +- .../zrok_api/models/update_share_request.py | 188 ++ .../zrok/zrok_api/models/verify_request.py | 110 + .../zrok/zrok_api/models/verify_response.py | 110 + .../sdk/zrok/zrok_api/models/version.py | 17 +- sdk/python/sdk/zrok/zrok_api/rest.py | 10 +- 281 files changed, 9800 insertions(+), 7770 deletions(-) create mode 100644 sdk/python/sdk/zrok/.gitattributes delete mode 100644 sdk/python/sdk/zrok/.travis.yml delete mode 100644 sdk/python/sdk/zrok/README.md create mode 100644 sdk/python/sdk/zrok/__init__.py delete mode 100644 sdk/python/sdk/zrok/docs/AccessBody.md delete mode 100644 sdk/python/sdk/zrok/docs/AccessBody1.md delete mode 100644 sdk/python/sdk/zrok/docs/AccountApi.md delete mode 100644 sdk/python/sdk/zrok/docs/AccountBody.md delete mode 100644 sdk/python/sdk/zrok/docs/AdminApi.md delete mode 100644 sdk/python/sdk/zrok/docs/AuthUser.md delete mode 100644 sdk/python/sdk/zrok/docs/ChangePasswordBody.md delete mode 100644 sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md delete mode 100644 sdk/python/sdk/zrok/docs/Configuration.md delete mode 100644 sdk/python/sdk/zrok/docs/DisableBody.md delete mode 100644 sdk/python/sdk/zrok/docs/EnableBody.md delete mode 100644 sdk/python/sdk/zrok/docs/Environment.md delete mode 100644 sdk/python/sdk/zrok/docs/EnvironmentAndResources.md delete mode 100644 sdk/python/sdk/zrok/docs/EnvironmentApi.md delete mode 100644 sdk/python/sdk/zrok/docs/Environments.md delete mode 100644 sdk/python/sdk/zrok/docs/ErrorMessage.md delete mode 100644 sdk/python/sdk/zrok/docs/Frontend.md delete mode 100644 sdk/python/sdk/zrok/docs/FrontendBody.md delete mode 100644 sdk/python/sdk/zrok/docs/FrontendBody1.md delete mode 100644 sdk/python/sdk/zrok/docs/FrontendBody2.md delete mode 100644 sdk/python/sdk/zrok/docs/Frontends.md delete mode 100644 sdk/python/sdk/zrok/docs/GrantsBody.md delete mode 100644 sdk/python/sdk/zrok/docs/IdentityBody.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse200.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2001.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2002.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2003.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2003Members.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2004.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2004Members.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2005.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2006.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2007.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse201.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2011.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2012.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2013.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse400.md delete mode 100644 sdk/python/sdk/zrok/docs/InviteBody.md delete mode 100644 sdk/python/sdk/zrok/docs/LoginBody.md delete mode 100644 sdk/python/sdk/zrok/docs/MetadataApi.md delete mode 100644 sdk/python/sdk/zrok/docs/Metrics.md delete mode 100644 sdk/python/sdk/zrok/docs/MetricsSample.md delete mode 100644 sdk/python/sdk/zrok/docs/OrganizationAddBody.md delete mode 100644 sdk/python/sdk/zrok/docs/OrganizationBody.md delete mode 100644 sdk/python/sdk/zrok/docs/OrganizationBody1.md delete mode 100644 sdk/python/sdk/zrok/docs/OrganizationListBody.md delete mode 100644 sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md delete mode 100644 sdk/python/sdk/zrok/docs/Overview.md delete mode 100644 sdk/python/sdk/zrok/docs/Principal.md delete mode 100644 sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md delete mode 100644 sdk/python/sdk/zrok/docs/RegenerateTokenBody.md delete mode 100644 sdk/python/sdk/zrok/docs/RegisterBody.md delete mode 100644 sdk/python/sdk/zrok/docs/ResetPasswordBody.md delete mode 100644 sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md delete mode 100644 sdk/python/sdk/zrok/docs/Share.md delete mode 100644 sdk/python/sdk/zrok/docs/ShareApi.md delete mode 100644 sdk/python/sdk/zrok/docs/ShareBody.md delete mode 100644 sdk/python/sdk/zrok/docs/ShareRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/ShareResponse.md delete mode 100644 sdk/python/sdk/zrok/docs/Shares.md delete mode 100644 sdk/python/sdk/zrok/docs/SparkData.md delete mode 100644 sdk/python/sdk/zrok/docs/SparkDataSample.md delete mode 100644 sdk/python/sdk/zrok/docs/SparklinesBody.md delete mode 100644 sdk/python/sdk/zrok/docs/TokenGenerateBody.md delete mode 100644 sdk/python/sdk/zrok/docs/UnaccessBody.md delete mode 100644 sdk/python/sdk/zrok/docs/UnshareBody.md delete mode 100644 sdk/python/sdk/zrok/docs/VerifyBody.md delete mode 100644 sdk/python/sdk/zrok/docs/Version.md delete mode 100644 sdk/python/sdk/zrok/docs/VersionBody.md delete mode 100644 sdk/python/sdk/zrok/docs/VersionCheckBody.md create mode 100644 sdk/python/sdk/zrok/setup.cfg delete mode 100644 sdk/python/sdk/zrok/test-requirements.txt delete mode 100644 sdk/python/sdk/zrok/test/__init__.py delete mode 100644 sdk/python/sdk/zrok/test/test_access_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_access_body1.py delete mode 100644 sdk/python/sdk/zrok/test/test_account_api.py delete mode 100644 sdk/python/sdk/zrok/test/test_account_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_admin_api.py delete mode 100644 sdk/python/sdk/zrok/test/test_auth_user.py delete mode 100644 sdk/python/sdk/zrok/test/test_change_password_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_client_version_check_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_configuration.py delete mode 100644 sdk/python/sdk/zrok/test/test_disable_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_enable_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_environment.py delete mode 100644 sdk/python/sdk/zrok/test/test_environment_and_resources.py delete mode 100644 sdk/python/sdk/zrok/test/test_environment_api.py delete mode 100644 sdk/python/sdk/zrok/test/test_environments.py delete mode 100644 sdk/python/sdk/zrok/test/test_error_message.py delete mode 100644 sdk/python/sdk/zrok/test/test_frontend.py delete mode 100644 sdk/python/sdk/zrok/test/test_frontend_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_frontend_body1.py delete mode 100644 sdk/python/sdk/zrok/test/test_frontend_body2.py delete mode 100644 sdk/python/sdk/zrok/test/test_frontends.py delete mode 100644 sdk/python/sdk/zrok/test/test_grants_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_identity_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response200.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2001.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2002.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2003.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2003_members.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2004.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2004_members.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2005.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2006.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2007.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response201.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2011.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2012.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2013.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response400.py delete mode 100644 sdk/python/sdk/zrok/test/test_invite_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_login_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_metadata_api.py delete mode 100644 sdk/python/sdk/zrok/test/test_metrics.py delete mode 100644 sdk/python/sdk/zrok/test/test_metrics_sample.py delete mode 100644 sdk/python/sdk/zrok/test/test_organization_add_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_organization_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_organization_body1.py delete mode 100644 sdk/python/sdk/zrok/test/test_organization_list_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_organization_remove_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_overview.py delete mode 100644 sdk/python/sdk/zrok/test/test_principal.py delete mode 100644 sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_regenerate_token_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_register_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_reset_password_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_reset_password_request_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_share.py delete mode 100644 sdk/python/sdk/zrok/test/test_share_api.py delete mode 100644 sdk/python/sdk/zrok/test/test_share_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_share_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_share_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_shares.py delete mode 100644 sdk/python/sdk/zrok/test/test_spark_data.py delete mode 100644 sdk/python/sdk/zrok/test/test_spark_data_sample.py delete mode 100644 sdk/python/sdk/zrok/test/test_sparklines_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_token_generate_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_unaccess_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_unshare_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_verify_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_version.py delete mode 100644 sdk/python/sdk/zrok/test/test_version_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_version_check_body.py delete mode 100644 sdk/python/sdk/zrok/tox.ini create mode 100644 sdk/python/sdk/zrok/versioneer.py create mode 100644 sdk/python/sdk/zrok/zrok/__init__.py create mode 100644 sdk/python/sdk/zrok/zrok/_version.py create mode 100644 sdk/python/sdk/zrok/zrok/access.py create mode 100644 sdk/python/sdk/zrok/zrok/decor.py create mode 100644 sdk/python/sdk/zrok/zrok/dialer.py create mode 100644 sdk/python/sdk/zrok/zrok/environment/__init__.py create mode 100644 sdk/python/sdk/zrok/zrok/environment/dirs.py create mode 100644 sdk/python/sdk/zrok/zrok/listener.py create mode 100644 sdk/python/sdk/zrok/zrok/model.py create mode 100644 sdk/python/sdk/zrok/zrok/overview.py create mode 100644 sdk/python/sdk/zrok/zrok/proxy.py create mode 100644 sdk/python/sdk/zrok/zrok/share.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/access_request.py rename sdk/python/sdk/zrok/zrok_api/models/{inline_response2013.py => access_response.py} (78%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body.py rename sdk/python/sdk/zrok/zrok_api/models/{invite_body.py => body1.py} (72%) rename sdk/python/sdk/zrok/zrok_api/models/{inline_response2007.py => body10.py} (63%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body11.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body12.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body13.py rename sdk/python/sdk/zrok/zrok_api/models/{token_generate_body.py => body14.py} (74%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body15.py rename sdk/python/sdk/zrok/zrok_api/models/{inline_response2012.py => body16.py} (76%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body17.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body18.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body19.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body2.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body20.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body21.py rename sdk/python/sdk/zrok/zrok_api/models/{client_version_check_body.py => body22.py} (74%) rename sdk/python/sdk/zrok/zrok_api/models/{sparklines_body.py => body23.py} (72%) rename sdk/python/sdk/zrok/zrok_api/models/{access_body.py => body24.py} (70%) rename sdk/python/sdk/zrok/zrok_api/models/{access_body1.py => body25.py} (72%) rename sdk/python/sdk/zrok/zrok_api/models/{share_body.py => body26.py} (74%) rename sdk/python/sdk/zrok/zrok_api/models/{unaccess_body.py => body27.py} (72%) rename sdk/python/sdk/zrok/zrok_api/models/{unshare_body.py => body28.py} (72%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body3.py rename sdk/python/sdk/zrok/zrok_api/models/{register_body.py => body4.py} (72%) rename sdk/python/sdk/zrok/zrok_api/models/{reset_password_body.py => body5.py} (73%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body6.py rename sdk/python/sdk/zrok/zrok_api/models/{verify_body.py => body7.py} (74%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body8.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/body9.py rename sdk/python/sdk/zrok/zrok_api/models/{change_password_body.py => change_password_request.py} (77%) rename sdk/python/sdk/zrok/zrok_api/models/{frontend_body.py => create_frontend_request.py} (74%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_frontend_response.py rename sdk/python/sdk/zrok/zrok_api/models/{frontend_body1.py => delete_frontend_request.py} (81%) rename sdk/python/sdk/zrok/zrok_api/models/{disable_body.py => disable_request.py} (83%) rename sdk/python/sdk/zrok/zrok_api/models/{enable_body.py => enable_request.py} (79%) rename sdk/python/sdk/zrok/zrok_api/models/{inline_response2011.py => enable_response.py} (79%) rename sdk/python/sdk/zrok/zrok_api/models/{inline_response2003_members.py => inline_response2001_members.py} (79%) rename sdk/python/sdk/zrok/zrok_api/models/{inline_response2004_organizations.py => inline_response2002_organizations.py} (66%) rename sdk/python/sdk/zrok/zrok_api/models/{inline_response2005_memberships.py => inline_response2003_memberships.py} (65%) delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/invite_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py rename sdk/python/sdk/zrok/zrok_api/models/{login_body.py => login_request.py} (80%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/login_response.py rename sdk/python/sdk/zrok/zrok_api/models/{inline_response2006.py => organization_members_body.py} (69%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/organizationremove_organizations.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/password_requirements.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/public_frontend.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/public_frontend_list.py rename sdk/python/sdk/zrok/zrok_api/models/{regenerate_account_token_body.py => regenerate_token_body.py} (82%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/register_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/register_response.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/unshare_request.py rename sdk/python/sdk/zrok/zrok_api/models/{frontend_body2.py => update_frontend_request.py} (74%) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/update_share_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/verify_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/verify_response.py diff --git a/sdk/python/examples/pastebin/README.md b/sdk/python/examples/pastebin/README.md index 18cbef8d..be016135 100644 --- a/sdk/python/examples/pastebin/README.md +++ b/sdk/python/examples/pastebin/README.md @@ -4,7 +4,7 @@ This example shows the use of the zrok SDK spinning up a simple pastebin command ## Self-hosting Setup :wrench: -You don't need this section if you're using hosted zrok from NetFoundry (https://api-v1.zrok.io/). +You don't need this section if you're using hosted zrok from NetFoundry (https://api.zrok.io/). Refer to the [setup guide](../../../docs/guides/self-hosting/self_hosting_guide.md) for details on setting up your zrok environment if you're self-hosting zrok. diff --git a/sdk/python/sdk/zrok/.gitattributes b/sdk/python/sdk/zrok/.gitattributes new file mode 100644 index 00000000..4abb03b2 --- /dev/null +++ b/sdk/python/sdk/zrok/.gitattributes @@ -0,0 +1 @@ +zrok/_version.py export-subst diff --git a/sdk/python/sdk/zrok/.swagger-codegen-ignore b/sdk/python/sdk/zrok/.swagger-codegen-ignore index c5fa491b..cbe3e7fe 100644 --- a/sdk/python/sdk/zrok/.swagger-codegen-ignore +++ b/sdk/python/sdk/zrok/.swagger-codegen-ignore @@ -21,3 +21,12 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +.travis.yml +git_push.sh +tox.ini +test-requirements.txt +test/ +docs/ +README.md +setup.py \ No newline at end of file diff --git a/sdk/python/sdk/zrok/.swagger-codegen/VERSION b/sdk/python/sdk/zrok/.swagger-codegen/VERSION index b262b4de..24ade4ad 100644 --- a/sdk/python/sdk/zrok/.swagger-codegen/VERSION +++ b/sdk/python/sdk/zrok/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.51 \ No newline at end of file +2.4.43 \ No newline at end of file diff --git a/sdk/python/sdk/zrok/.travis.yml b/sdk/python/sdk/zrok/.travis.yml deleted file mode 100644 index dd6c4450..00000000 --- a/sdk/python/sdk/zrok/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.2" - - "3.3" - - "3.4" - - "3.5" - #- "3.5-dev" # 3.5 development branch - #- "nightly" # points to the latest development branch e.g. 3.6-dev -# command to install dependencies -install: "pip install -r requirements.txt" -# command to run tests -script: nosetests diff --git a/sdk/python/sdk/zrok/README.md b/sdk/python/sdk/zrok/README.md deleted file mode 100644 index eabbfa8c..00000000 --- a/sdk/python/sdk/zrok/README.md +++ /dev/null @@ -1,274 +0,0 @@ -# zrok_sdk -zrok client access - -This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - -- API version: 1.0.0 -- Package version: 1.0.0 -- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen - -## Requirements. - -Python 2.7 and 3.4+ - -## Installation & Usage -### pip install - -If the python package is hosted on Github, you can install directly from Github - -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import zrok_api -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import zrok_api -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ChangePasswordBody() # ChangePasswordBody | (optional) - -try: - api_instance.change_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.InviteBody() # InviteBody | (optional) - -try: - api_instance.invite(body=body) -except ApiException as e: - print("Exception when calling AccountApi->invite: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.LoginBody() # LoginBody | (optional) - -try: - api_response = api_instance.login(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->login: %s\n" % e) - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.RegenerateAccountTokenBody() # RegenerateAccountTokenBody | (optional) - -try: - api_response = api_instance.regenerate_account_token(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.RegisterBody() # RegisterBody | (optional) - -try: - api_response = api_instance.register(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->register: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ResetPasswordBody() # ResetPasswordBody | (optional) - -try: - api_instance.reset_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ResetPasswordRequestBody() # ResetPasswordRequestBody | (optional) - -try: - api_instance.reset_password_request(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password_request: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.VerifyBody() # VerifyBody | (optional) - -try: - api_response = api_instance.verify(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->verify: %s\n" % e) -``` - -## Documentation for API Endpoints - -All URIs are relative to */api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AccountApi* | [**change_password**](docs/AccountApi.md#change_password) | **POST** /changePassword | -*AccountApi* | [**invite**](docs/AccountApi.md#invite) | **POST** /invite | -*AccountApi* | [**login**](docs/AccountApi.md#login) | **POST** /login | -*AccountApi* | [**regenerate_account_token**](docs/AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | -*AccountApi* | [**register**](docs/AccountApi.md#register) | **POST** /register | -*AccountApi* | [**reset_password**](docs/AccountApi.md#reset_password) | **POST** /resetPassword | -*AccountApi* | [**reset_password_request**](docs/AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | -*AccountApi* | [**verify**](docs/AccountApi.md#verify) | **POST** /verify | -*AdminApi* | [**add_organization_member**](docs/AdminApi.md#add_organization_member) | **POST** /organization/add | -*AdminApi* | [**create_account**](docs/AdminApi.md#create_account) | **POST** /account | -*AdminApi* | [**create_frontend**](docs/AdminApi.md#create_frontend) | **POST** /frontend | -*AdminApi* | [**create_identity**](docs/AdminApi.md#create_identity) | **POST** /identity | -*AdminApi* | [**create_organization**](docs/AdminApi.md#create_organization) | **POST** /organization | -*AdminApi* | [**delete_frontend**](docs/AdminApi.md#delete_frontend) | **DELETE** /frontend | -*AdminApi* | [**delete_organization**](docs/AdminApi.md#delete_organization) | **DELETE** /organization | -*AdminApi* | [**grants**](docs/AdminApi.md#grants) | **POST** /grants | -*AdminApi* | [**invite_token_generate**](docs/AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | -*AdminApi* | [**list_frontends**](docs/AdminApi.md#list_frontends) | **GET** /frontends | -*AdminApi* | [**list_organization_members**](docs/AdminApi.md#list_organization_members) | **POST** /organization/list | -*AdminApi* | [**list_organizations**](docs/AdminApi.md#list_organizations) | **GET** /organizations | -*AdminApi* | [**remove_organization_member**](docs/AdminApi.md#remove_organization_member) | **POST** /organization/remove | -*AdminApi* | [**update_frontend**](docs/AdminApi.md#update_frontend) | **PATCH** /frontend | -*EnvironmentApi* | [**disable**](docs/EnvironmentApi.md#disable) | **POST** /disable | -*EnvironmentApi* | [**enable**](docs/EnvironmentApi.md#enable) | **POST** /enable | -*MetadataApi* | [**client_version_check**](docs/MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | -*MetadataApi* | [**configuration**](docs/MetadataApi.md#configuration) | **GET** /configuration | -*MetadataApi* | [**get_account_detail**](docs/MetadataApi.md#get_account_detail) | **GET** /detail/account | -*MetadataApi* | [**get_account_metrics**](docs/MetadataApi.md#get_account_metrics) | **GET** /metrics/account | -*MetadataApi* | [**get_environment_detail**](docs/MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | -*MetadataApi* | [**get_environment_metrics**](docs/MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | -*MetadataApi* | [**get_frontend_detail**](docs/MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | -*MetadataApi* | [**get_share_detail**](docs/MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | -*MetadataApi* | [**get_share_metrics**](docs/MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | -*MetadataApi* | [**get_sparklines**](docs/MetadataApi.md#get_sparklines) | **POST** /sparklines | -*MetadataApi* | [**list_memberships**](docs/MetadataApi.md#list_memberships) | **GET** /memberships | -*MetadataApi* | [**list_org_members**](docs/MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | -*MetadataApi* | [**org_account_overview**](docs/MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | -*MetadataApi* | [**overview**](docs/MetadataApi.md#overview) | **GET** /overview | -*MetadataApi* | [**version**](docs/MetadataApi.md#version) | **GET** /version | -*MetadataApi* | [**version_inventory**](docs/MetadataApi.md#version_inventory) | **GET** /versions | -*ShareApi* | [**access**](docs/ShareApi.md#access) | **POST** /access | -*ShareApi* | [**share**](docs/ShareApi.md#share) | **POST** /share | -*ShareApi* | [**unaccess**](docs/ShareApi.md#unaccess) | **DELETE** /unaccess | -*ShareApi* | [**unshare**](docs/ShareApi.md#unshare) | **DELETE** /unshare | -*ShareApi* | [**update_access**](docs/ShareApi.md#update_access) | **PATCH** /access | -*ShareApi* | [**update_share**](docs/ShareApi.md#update_share) | **PATCH** /share | - -## Documentation For Models - - - [AccessBody](docs/AccessBody.md) - - [AccessBody1](docs/AccessBody1.md) - - [AccountBody](docs/AccountBody.md) - - [AuthUser](docs/AuthUser.md) - - [ChangePasswordBody](docs/ChangePasswordBody.md) - - [ClientVersionCheckBody](docs/ClientVersionCheckBody.md) - - [Configuration](docs/Configuration.md) - - [DisableBody](docs/DisableBody.md) - - [EnableBody](docs/EnableBody.md) - - [Environment](docs/Environment.md) - - [EnvironmentAndResources](docs/EnvironmentAndResources.md) - - [Environments](docs/Environments.md) - - [ErrorMessage](docs/ErrorMessage.md) - - [Frontend](docs/Frontend.md) - - [FrontendBody](docs/FrontendBody.md) - - [FrontendBody1](docs/FrontendBody1.md) - - [FrontendBody2](docs/FrontendBody2.md) - - [Frontends](docs/Frontends.md) - - [GrantsBody](docs/GrantsBody.md) - - [IdentityBody](docs/IdentityBody.md) - - [InlineResponse200](docs/InlineResponse200.md) - - [InlineResponse2001](docs/InlineResponse2001.md) - - [InlineResponse2002](docs/InlineResponse2002.md) - - [InlineResponse2003](docs/InlineResponse2003.md) - - [InlineResponse2003Members](docs/InlineResponse2003Members.md) - - [InlineResponse2004](docs/InlineResponse2004.md) - - [InlineResponse2004Organizations](docs/InlineResponse2004Organizations.md) - - [InlineResponse2005](docs/InlineResponse2005.md) - - [InlineResponse2005Memberships](docs/InlineResponse2005Memberships.md) - - [InlineResponse2006](docs/InlineResponse2006.md) - - [InlineResponse2007](docs/InlineResponse2007.md) - - [InlineResponse201](docs/InlineResponse201.md) - - [InlineResponse2011](docs/InlineResponse2011.md) - - [InlineResponse2012](docs/InlineResponse2012.md) - - [InlineResponse2013](docs/InlineResponse2013.md) - - [InviteBody](docs/InviteBody.md) - - [LoginBody](docs/LoginBody.md) - - [Metrics](docs/Metrics.md) - - [MetricsSample](docs/MetricsSample.md) - - [OrganizationAddBody](docs/OrganizationAddBody.md) - - [OrganizationBody](docs/OrganizationBody.md) - - [OrganizationBody1](docs/OrganizationBody1.md) - - [OrganizationListBody](docs/OrganizationListBody.md) - - [OrganizationRemoveBody](docs/OrganizationRemoveBody.md) - - [Overview](docs/Overview.md) - - [Principal](docs/Principal.md) - - [RegenerateAccountTokenBody](docs/RegenerateAccountTokenBody.md) - - [RegisterBody](docs/RegisterBody.md) - - [ResetPasswordBody](docs/ResetPasswordBody.md) - - [ResetPasswordRequestBody](docs/ResetPasswordRequestBody.md) - - [Share](docs/Share.md) - - [ShareBody](docs/ShareBody.md) - - [ShareRequest](docs/ShareRequest.md) - - [ShareResponse](docs/ShareResponse.md) - - [Shares](docs/Shares.md) - - [SparkData](docs/SparkData.md) - - [SparkDataSample](docs/SparkDataSample.md) - - [SparklinesBody](docs/SparklinesBody.md) - - [TokenGenerateBody](docs/TokenGenerateBody.md) - - [UnaccessBody](docs/UnaccessBody.md) - - [UnshareBody](docs/UnshareBody.md) - - [VerifyBody](docs/VerifyBody.md) - - [Version](docs/Version.md) - -## Documentation For Authorization - - -## key - -- **Type**: API key -- **API key parameter name**: x-token -- **Location**: HTTP header - - -## Author - - diff --git a/sdk/python/sdk/zrok/__init__.py b/sdk/python/sdk/zrok/__init__.py new file mode 100644 index 00000000..e6b36ad8 --- /dev/null +++ b/sdk/python/sdk/zrok/__init__.py @@ -0,0 +1 @@ +from . import environment # noqa diff --git a/sdk/python/sdk/zrok/docs/AccessBody.md b/sdk/python/sdk/zrok/docs/AccessBody.md deleted file mode 100644 index 86e3636b..00000000 --- a/sdk/python/sdk/zrok/docs/AccessBody.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccessBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AccessBody1.md b/sdk/python/sdk/zrok/docs/AccessBody1.md deleted file mode 100644 index 68968950..00000000 --- a/sdk/python/sdk/zrok/docs/AccessBody1.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccessBody1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AccountApi.md b/sdk/python/sdk/zrok/docs/AccountApi.md deleted file mode 100644 index 531caa12..00000000 --- a/sdk/python/sdk/zrok/docs/AccountApi.md +++ /dev/null @@ -1,383 +0,0 @@ -# zrok_api.AccountApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**change_password**](AccountApi.md#change_password) | **POST** /changePassword | -[**invite**](AccountApi.md#invite) | **POST** /invite | -[**login**](AccountApi.md#login) | **POST** /login | -[**regenerate_account_token**](AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | -[**register**](AccountApi.md#register) | **POST** /register | -[**reset_password**](AccountApi.md#reset_password) | **POST** /resetPassword | -[**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | -[**verify**](AccountApi.md#verify) | **POST** /verify | - -# **change_password** -> change_password(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ChangePasswordBody() # ChangePasswordBody | (optional) - -try: - api_instance.change_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ChangePasswordBody**](ChangePasswordBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **invite** -> invite(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.InviteBody() # InviteBody | (optional) - -try: - api_instance.invite(body=body) -except ApiException as e: - print("Exception when calling AccountApi->invite: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**InviteBody**](InviteBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **login** -> str login(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.LoginBody() # LoginBody | (optional) - -try: - api_response = api_instance.login(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->login: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**LoginBody**](LoginBody.md)| | [optional] - -### Return type - -**str** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **regenerate_account_token** -> InlineResponse200 regenerate_account_token(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.RegenerateAccountTokenBody() # RegenerateAccountTokenBody | (optional) - -try: - api_response = api_instance.regenerate_account_token(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegenerateAccountTokenBody**](RegenerateAccountTokenBody.md)| | [optional] - -### Return type - -[**InlineResponse200**](InlineResponse200.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **register** -> InlineResponse200 register(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.RegisterBody() # RegisterBody | (optional) - -try: - api_response = api_instance.register(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->register: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegisterBody**](RegisterBody.md)| | [optional] - -### Return type - -[**InlineResponse200**](InlineResponse200.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **reset_password** -> reset_password(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.ResetPasswordBody() # ResetPasswordBody | (optional) - -try: - api_instance.reset_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ResetPasswordBody**](ResetPasswordBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **reset_password_request** -> reset_password_request(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.ResetPasswordRequestBody() # ResetPasswordRequestBody | (optional) - -try: - api_instance.reset_password_request(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password_request: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ResetPasswordRequestBody**](ResetPasswordRequestBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **verify** -> InlineResponse2001 verify(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.VerifyBody() # VerifyBody | (optional) - -try: - api_response = api_instance.verify(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->verify: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**VerifyBody**](VerifyBody.md)| | [optional] - -### Return type - -[**InlineResponse2001**](InlineResponse2001.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AccountBody.md b/sdk/python/sdk/zrok/docs/AccountBody.md deleted file mode 100644 index 076efa50..00000000 --- a/sdk/python/sdk/zrok/docs/AccountBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# AccountBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AdminApi.md b/sdk/python/sdk/zrok/docs/AdminApi.md deleted file mode 100644 index 34977dd4..00000000 --- a/sdk/python/sdk/zrok/docs/AdminApi.md +++ /dev/null @@ -1,720 +0,0 @@ -# zrok_api.AdminApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_organization_member**](AdminApi.md#add_organization_member) | **POST** /organization/add | -[**create_account**](AdminApi.md#create_account) | **POST** /account | -[**create_frontend**](AdminApi.md#create_frontend) | **POST** /frontend | -[**create_identity**](AdminApi.md#create_identity) | **POST** /identity | -[**create_organization**](AdminApi.md#create_organization) | **POST** /organization | -[**delete_frontend**](AdminApi.md#delete_frontend) | **DELETE** /frontend | -[**delete_organization**](AdminApi.md#delete_organization) | **DELETE** /organization | -[**grants**](AdminApi.md#grants) | **POST** /grants | -[**invite_token_generate**](AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | -[**list_frontends**](AdminApi.md#list_frontends) | **GET** /frontends | -[**list_organization_members**](AdminApi.md#list_organization_members) | **POST** /organization/list | -[**list_organizations**](AdminApi.md#list_organizations) | **GET** /organizations | -[**remove_organization_member**](AdminApi.md#remove_organization_member) | **POST** /organization/remove | -[**update_frontend**](AdminApi.md#update_frontend) | **PATCH** /frontend | - -# **add_organization_member** -> add_organization_member(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationAddBody() # OrganizationAddBody | (optional) - -try: - api_instance.add_organization_member(body=body) -except ApiException as e: - print("Exception when calling AdminApi->add_organization_member: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationAddBody**](OrganizationAddBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_account** -> InlineResponse200 create_account(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.AccountBody() # AccountBody | (optional) - -try: - api_response = api_instance.create_account(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_account: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AccountBody**](AccountBody.md)| | [optional] - -### Return type - -[**InlineResponse200**](InlineResponse200.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_frontend** -> InlineResponse201 create_frontend(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.FrontendBody() # FrontendBody | (optional) - -try: - api_response = api_instance.create_frontend(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_frontend: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FrontendBody**](FrontendBody.md)| | [optional] - -### Return type - -[**InlineResponse201**](InlineResponse201.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_identity** -> InlineResponse2011 create_identity(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.IdentityBody() # IdentityBody | (optional) - -try: - api_response = api_instance.create_identity(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_identity: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**IdentityBody**](IdentityBody.md)| | [optional] - -### Return type - -[**InlineResponse2011**](InlineResponse2011.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_organization** -> InlineResponse2012 create_organization(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationBody() # OrganizationBody | (optional) - -try: - api_response = api_instance.create_organization(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_organization: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationBody**](OrganizationBody.md)| | [optional] - -### Return type - -[**InlineResponse2012**](InlineResponse2012.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_frontend** -> delete_frontend(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.FrontendBody1() # FrontendBody1 | (optional) - -try: - api_instance.delete_frontend(body=body) -except ApiException as e: - print("Exception when calling AdminApi->delete_frontend: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FrontendBody1**](FrontendBody1.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_organization** -> delete_organization(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationBody1() # OrganizationBody1 | (optional) - -try: - api_instance.delete_organization(body=body) -except ApiException as e: - print("Exception when calling AdminApi->delete_organization: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationBody1**](OrganizationBody1.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **grants** -> grants(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.GrantsBody() # GrantsBody | (optional) - -try: - api_instance.grants(body=body) -except ApiException as e: - print("Exception when calling AdminApi->grants: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**GrantsBody**](GrantsBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **invite_token_generate** -> invite_token_generate(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.TokenGenerateBody() # TokenGenerateBody | (optional) - -try: - api_instance.invite_token_generate(body=body) -except ApiException as e: - print("Exception when calling AdminApi->invite_token_generate: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**TokenGenerateBody**](TokenGenerateBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_frontends** -> list[InlineResponse2002] list_frontends() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) - -try: - api_response = api_instance.list_frontends() - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->list_frontends: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[InlineResponse2002]**](InlineResponse2002.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_organization_members** -> InlineResponse2003 list_organization_members(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationListBody() # OrganizationListBody | (optional) - -try: - api_response = api_instance.list_organization_members(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->list_organization_members: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationListBody**](OrganizationListBody.md)| | [optional] - -### Return type - -[**InlineResponse2003**](InlineResponse2003.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_organizations** -> InlineResponse2004 list_organizations() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) - -try: - api_response = api_instance.list_organizations() - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->list_organizations: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InlineResponse2004**](InlineResponse2004.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **remove_organization_member** -> remove_organization_member(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationRemoveBody() # OrganizationRemoveBody | (optional) - -try: - api_instance.remove_organization_member(body=body) -except ApiException as e: - print("Exception when calling AdminApi->remove_organization_member: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationRemoveBody**](OrganizationRemoveBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_frontend** -> update_frontend(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.FrontendBody2() # FrontendBody2 | (optional) - -try: - api_instance.update_frontend(body=body) -except ApiException as e: - print("Exception when calling AdminApi->update_frontend: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FrontendBody2**](FrontendBody2.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AuthUser.md b/sdk/python/sdk/zrok/docs/AuthUser.md deleted file mode 100644 index 2abe24ba..00000000 --- a/sdk/python/sdk/zrok/docs/AuthUser.md +++ /dev/null @@ -1,10 +0,0 @@ -# AuthUser - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ChangePasswordBody.md b/sdk/python/sdk/zrok/docs/ChangePasswordBody.md deleted file mode 100644 index 1137de72..00000000 --- a/sdk/python/sdk/zrok/docs/ChangePasswordBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChangePasswordBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**old_password** | **str** | | [optional] -**new_password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md b/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md deleted file mode 100644 index 4a36f24e..00000000 --- a/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClientVersionCheckBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Configuration.md b/sdk/python/sdk/zrok/docs/Configuration.md deleted file mode 100644 index ee94f24b..00000000 --- a/sdk/python/sdk/zrok/docs/Configuration.md +++ /dev/null @@ -1,13 +0,0 @@ -# Configuration - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **str** | | [optional] -**tou_link** | **str** | | [optional] -**invites_open** | **bool** | | [optional] -**requires_invite_token** | **bool** | | [optional] -**invite_token_contact** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/DisableBody.md b/sdk/python/sdk/zrok/docs/DisableBody.md deleted file mode 100644 index f6ee65f2..00000000 --- a/sdk/python/sdk/zrok/docs/DisableBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# DisableBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/EnableBody.md b/sdk/python/sdk/zrok/docs/EnableBody.md deleted file mode 100644 index 7ba7d7b3..00000000 --- a/sdk/python/sdk/zrok/docs/EnableBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# EnableBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**host** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Environment.md b/sdk/python/sdk/zrok/docs/Environment.md deleted file mode 100644 index bd71fee9..00000000 --- a/sdk/python/sdk/zrok/docs/Environment.md +++ /dev/null @@ -1,16 +0,0 @@ -# Environment - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**host** | **str** | | [optional] -**address** | **str** | | [optional] -**z_id** | **str** | | [optional] -**activity** | [**SparkData**](SparkData.md) | | [optional] -**limited** | **bool** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md b/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md deleted file mode 100644 index 7ed1a39a..00000000 --- a/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnvironmentAndResources - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**environment** | [**Environment**](Environment.md) | | [optional] -**frontends** | [**Frontends**](Frontends.md) | | [optional] -**shares** | [**Shares**](Shares.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/EnvironmentApi.md b/sdk/python/sdk/zrok/docs/EnvironmentApi.md deleted file mode 100644 index f9e49447..00000000 --- a/sdk/python/sdk/zrok/docs/EnvironmentApi.md +++ /dev/null @@ -1,110 +0,0 @@ -# zrok_api.EnvironmentApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**disable**](EnvironmentApi.md#disable) | **POST** /disable | -[**enable**](EnvironmentApi.md#enable) | **POST** /enable | - -# **disable** -> disable(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.EnvironmentApi(zrok_api.ApiClient(configuration)) -body = zrok_api.DisableBody() # DisableBody | (optional) - -try: - api_instance.disable(body=body) -except ApiException as e: - print("Exception when calling EnvironmentApi->disable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DisableBody**](DisableBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enable** -> InlineResponse2011 enable(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.EnvironmentApi(zrok_api.ApiClient(configuration)) -body = zrok_api.EnableBody() # EnableBody | (optional) - -try: - api_response = api_instance.enable(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling EnvironmentApi->enable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**EnableBody**](EnableBody.md)| | [optional] - -### Return type - -[**InlineResponse2011**](InlineResponse2011.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Environments.md b/sdk/python/sdk/zrok/docs/Environments.md deleted file mode 100644 index 5cdc8b26..00000000 --- a/sdk/python/sdk/zrok/docs/Environments.md +++ /dev/null @@ -1,8 +0,0 @@ -# Environments - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ErrorMessage.md b/sdk/python/sdk/zrok/docs/ErrorMessage.md deleted file mode 100644 index 25d74334..00000000 --- a/sdk/python/sdk/zrok/docs/ErrorMessage.md +++ /dev/null @@ -1,8 +0,0 @@ -# ErrorMessage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Frontend.md b/sdk/python/sdk/zrok/docs/Frontend.md deleted file mode 100644 index 428eb19d..00000000 --- a/sdk/python/sdk/zrok/docs/Frontend.md +++ /dev/null @@ -1,17 +0,0 @@ -# Frontend - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**frontend_token** | **str** | | [optional] -**share_token** | **str** | | [optional] -**backend_mode** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] -**z_id** | **str** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/FrontendBody.md b/sdk/python/sdk/zrok/docs/FrontendBody.md deleted file mode 100644 index 5d0a3e37..00000000 --- a/sdk/python/sdk/zrok/docs/FrontendBody.md +++ /dev/null @@ -1,12 +0,0 @@ -# FrontendBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**permission_mode** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/FrontendBody1.md b/sdk/python/sdk/zrok/docs/FrontendBody1.md deleted file mode 100644 index 7bcd3be5..00000000 --- a/sdk/python/sdk/zrok/docs/FrontendBody1.md +++ /dev/null @@ -1,9 +0,0 @@ -# FrontendBody1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/FrontendBody2.md b/sdk/python/sdk/zrok/docs/FrontendBody2.md deleted file mode 100644 index e459d152..00000000 --- a/sdk/python/sdk/zrok/docs/FrontendBody2.md +++ /dev/null @@ -1,11 +0,0 @@ -# FrontendBody2 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**public_name** | **str** | | [optional] -**url_template** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Frontends.md b/sdk/python/sdk/zrok/docs/Frontends.md deleted file mode 100644 index c308436b..00000000 --- a/sdk/python/sdk/zrok/docs/Frontends.md +++ /dev/null @@ -1,8 +0,0 @@ -# Frontends - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/GrantsBody.md b/sdk/python/sdk/zrok/docs/GrantsBody.md deleted file mode 100644 index 1e744a53..00000000 --- a/sdk/python/sdk/zrok/docs/GrantsBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# GrantsBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/IdentityBody.md b/sdk/python/sdk/zrok/docs/IdentityBody.md deleted file mode 100644 index 39125ca5..00000000 --- a/sdk/python/sdk/zrok/docs/IdentityBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# IdentityBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse200.md b/sdk/python/sdk/zrok/docs/InlineResponse200.md deleted file mode 100644 index cc5f9b8b..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse200.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse200 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2001.md b/sdk/python/sdk/zrok/docs/InlineResponse2001.md deleted file mode 100644 index 820bf042..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2001.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2001 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2002.md b/sdk/python/sdk/zrok/docs/InlineResponse2002.md deleted file mode 100644 index d50b57e3..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2002.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineResponse2002 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2003.md b/sdk/python/sdk/zrok/docs/InlineResponse2003.md deleted file mode 100644 index 39488d9e..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2003.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2003 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**members** | [**list[InlineResponse2003Members]**](InlineResponse2003Members.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md b/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md deleted file mode 100644 index ddc3c4dd..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2003Members - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004.md b/sdk/python/sdk/zrok/docs/InlineResponse2004.md deleted file mode 100644 index 8c11d95d..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2004.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2004 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organizations** | [**list[InlineResponse2004Organizations]**](InlineResponse2004Organizations.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md b/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md deleted file mode 100644 index 9a3ba443..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2004Members - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md b/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md deleted file mode 100644 index 053d9f98..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2004Organizations - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005.md b/sdk/python/sdk/zrok/docs/InlineResponse2005.md deleted file mode 100644 index 8f539747..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2005.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2005 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**memberships** | [**list[InlineResponse2005Memberships]**](InlineResponse2005Memberships.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md b/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md deleted file mode 100644 index 147189c3..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2005Memberships - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md b/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md deleted file mode 100644 index 2f4ba151..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2005Organizations - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**token** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2006.md b/sdk/python/sdk/zrok/docs/InlineResponse2006.md deleted file mode 100644 index 7a03d61e..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2006.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2006 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sparklines** | [**list[Metrics]**](Metrics.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md b/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md deleted file mode 100644 index 3c6e1efe..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2006Memberships - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2007.md b/sdk/python/sdk/zrok/docs/InlineResponse2007.md deleted file mode 100644 index e0914fdd..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2007.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2007 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**controller_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse201.md b/sdk/python/sdk/zrok/docs/InlineResponse201.md deleted file mode 100644 index bbe25b94..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse201.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse201 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2011.md b/sdk/python/sdk/zrok/docs/InlineResponse2011.md deleted file mode 100644 index 8fd74494..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2011.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2011 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] -**cfg** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2012.md b/sdk/python/sdk/zrok/docs/InlineResponse2012.md deleted file mode 100644 index a72f2065..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2012.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2012 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2013.md b/sdk/python/sdk/zrok/docs/InlineResponse2013.md deleted file mode 100644 index 98930cb2..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2013.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2013 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**backend_mode** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse400.md b/sdk/python/sdk/zrok/docs/InlineResponse400.md deleted file mode 100644 index 29c731f6..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse400.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse400 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InviteBody.md b/sdk/python/sdk/zrok/docs/InviteBody.md deleted file mode 100644 index 0fb2fcb0..00000000 --- a/sdk/python/sdk/zrok/docs/InviteBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# InviteBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**invite_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/LoginBody.md b/sdk/python/sdk/zrok/docs/LoginBody.md deleted file mode 100644 index b877ebb8..00000000 --- a/sdk/python/sdk/zrok/docs/LoginBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# LoginBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/MetadataApi.md b/sdk/python/sdk/zrok/docs/MetadataApi.md deleted file mode 100644 index 4d205435..00000000 --- a/sdk/python/sdk/zrok/docs/MetadataApi.md +++ /dev/null @@ -1,796 +0,0 @@ -# zrok_api.MetadataApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**client_version_check**](MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | -[**configuration**](MetadataApi.md#configuration) | **GET** /configuration | -[**get_account_detail**](MetadataApi.md#get_account_detail) | **GET** /detail/account | -[**get_account_metrics**](MetadataApi.md#get_account_metrics) | **GET** /metrics/account | -[**get_environment_detail**](MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | -[**get_environment_metrics**](MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | -[**get_frontend_detail**](MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | -[**get_share_detail**](MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | -[**get_share_metrics**](MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | -[**get_sparklines**](MetadataApi.md#get_sparklines) | **POST** /sparklines | -[**list_memberships**](MetadataApi.md#list_memberships) | **GET** /memberships | -[**list_org_members**](MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | -[**org_account_overview**](MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | -[**overview**](MetadataApi.md#overview) | **GET** /overview | -[**version**](MetadataApi.md#version) | **GET** /version | -[**version_inventory**](MetadataApi.md#version_inventory) | **GET** /versions | - -# **client_version_check** -> client_version_check(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.MetadataApi() -body = zrok_api.ClientVersionCheckBody() # ClientVersionCheckBody | (optional) - -try: - api_instance.client_version_check(body=body) -except ApiException as e: - print("Exception when calling MetadataApi->client_version_check: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ClientVersionCheckBody**](ClientVersionCheckBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **configuration** -> Configuration configuration() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.MetadataApi() - -try: - api_response = api_instance.configuration() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->configuration: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Configuration**](Configuration.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_account_detail** -> Environments get_account_detail() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) - -try: - api_response = api_instance.get_account_detail() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_account_detail: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Environments**](Environments.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_account_metrics** -> Metrics get_account_metrics(duration=duration) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -duration = 'duration_example' # str | (optional) - -try: - api_response = api_instance.get_account_metrics(duration=duration) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_environment_detail** -> EnvironmentAndResources get_environment_detail(env_zid) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -env_zid = 'env_zid_example' # str | - -try: - api_response = api_instance.get_environment_detail(env_zid) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_zid** | **str**| | - -### Return type - -[**EnvironmentAndResources**](EnvironmentAndResources.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_environment_metrics** -> Metrics get_environment_metrics(env_id, duration=duration) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -env_id = 'env_id_example' # str | -duration = 'duration_example' # str | (optional) - -try: - api_response = api_instance.get_environment_metrics(env_id, duration=duration) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_id** | **str**| | - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_frontend_detail** -> Frontend get_frontend_detail(frontend_id) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -frontend_id = 56 # int | - -try: - api_response = api_instance.get_frontend_detail(frontend_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **frontend_id** | **int**| | - -### Return type - -[**Frontend**](Frontend.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_share_detail** -> Share get_share_detail(share_token) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -share_token = 'share_token_example' # str | - -try: - api_response = api_instance.get_share_detail(share_token) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_share_detail: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_token** | **str**| | - -### Return type - -[**Share**](Share.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_share_metrics** -> Metrics get_share_metrics(share_token, duration=duration) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -share_token = 'share_token_example' # str | -duration = 'duration_example' # str | (optional) - -try: - api_response = api_instance.get_share_metrics(share_token, duration=duration) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_token** | **str**| | - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_sparklines** -> InlineResponse2006 get_sparklines(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -body = zrok_api.SparklinesBody() # SparklinesBody | (optional) - -try: - api_response = api_instance.get_sparklines(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_sparklines: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**SparklinesBody**](SparklinesBody.md)| | [optional] - -### Return type - -[**InlineResponse2006**](InlineResponse2006.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_memberships** -> InlineResponse2005 list_memberships() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) - -try: - api_response = api_instance.list_memberships() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->list_memberships: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InlineResponse2005**](InlineResponse2005.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_org_members** -> InlineResponse2003 list_org_members(organization_token) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -organization_token = 'organization_token_example' # str | - -try: - api_response = api_instance.list_org_members(organization_token) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->list_org_members: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_token** | **str**| | - -### Return type - -[**InlineResponse2003**](InlineResponse2003.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **org_account_overview** -> Overview org_account_overview(organization_token, account_email) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -organization_token = 'organization_token_example' # str | -account_email = 'account_email_example' # str | - -try: - api_response = api_instance.org_account_overview(organization_token, account_email) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->org_account_overview: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_token** | **str**| | - **account_email** | **str**| | - -### Return type - -[**Overview**](Overview.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **overview** -> Overview overview() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) - -try: - api_response = api_instance.overview() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->overview: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Overview**](Overview.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **version** -> Version version() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.MetadataApi() - -try: - api_response = api_instance.version() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->version: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Version**](Version.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **version_inventory** -> InlineResponse2007 version_inventory() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.MetadataApi() - -try: - api_response = api_instance.version_inventory() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->version_inventory: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InlineResponse2007**](InlineResponse2007.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Metrics.md b/sdk/python/sdk/zrok/docs/Metrics.md deleted file mode 100644 index 0be4994b..00000000 --- a/sdk/python/sdk/zrok/docs/Metrics.md +++ /dev/null @@ -1,12 +0,0 @@ -# Metrics - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope** | **str** | | [optional] -**id** | **str** | | [optional] -**period** | **float** | | [optional] -**samples** | [**list[MetricsSample]**](MetricsSample.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/MetricsSample.md b/sdk/python/sdk/zrok/docs/MetricsSample.md deleted file mode 100644 index 60863b05..00000000 --- a/sdk/python/sdk/zrok/docs/MetricsSample.md +++ /dev/null @@ -1,11 +0,0 @@ -# MetricsSample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rx** | **float** | | [optional] -**tx** | **float** | | [optional] -**timestamp** | **float** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationAddBody.md b/sdk/python/sdk/zrok/docs/OrganizationAddBody.md deleted file mode 100644 index 485613d0..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationAddBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# OrganizationAddBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationBody.md b/sdk/python/sdk/zrok/docs/OrganizationBody.md deleted file mode 100644 index 014b7e7a..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationBody1.md b/sdk/python/sdk/zrok/docs/OrganizationBody1.md deleted file mode 100644 index 2fbaf697..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationBody1.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationBody1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationListBody.md b/sdk/python/sdk/zrok/docs/OrganizationListBody.md deleted file mode 100644 index 2ceb8a7d..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationListBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationListBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md b/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md deleted file mode 100644 index f61c0b93..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# OrganizationRemoveBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Overview.md b/sdk/python/sdk/zrok/docs/Overview.md deleted file mode 100644 index 4d477740..00000000 --- a/sdk/python/sdk/zrok/docs/Overview.md +++ /dev/null @@ -1,10 +0,0 @@ -# Overview - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_limited** | **bool** | | [optional] -**environments** | [**list[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Principal.md b/sdk/python/sdk/zrok/docs/Principal.md deleted file mode 100644 index c45a677a..00000000 --- a/sdk/python/sdk/zrok/docs/Principal.md +++ /dev/null @@ -1,13 +0,0 @@ -# Principal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**email** | **str** | | [optional] -**token** | **str** | | [optional] -**limitless** | **bool** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md b/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md deleted file mode 100644 index 930d7945..00000000 --- a/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# RegenerateAccountTokenBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md b/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md deleted file mode 100644 index 2c863aba..00000000 --- a/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# RegenerateTokenBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/RegisterBody.md b/sdk/python/sdk/zrok/docs/RegisterBody.md deleted file mode 100644 index 0adc3fc8..00000000 --- a/sdk/python/sdk/zrok/docs/RegisterBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# RegisterBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ResetPasswordBody.md b/sdk/python/sdk/zrok/docs/ResetPasswordBody.md deleted file mode 100644 index 9f74c6d6..00000000 --- a/sdk/python/sdk/zrok/docs/ResetPasswordBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# ResetPasswordBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reset_token** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md b/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md deleted file mode 100644 index a59834d9..00000000 --- a/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# ResetPasswordRequestBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Share.md b/sdk/python/sdk/zrok/docs/Share.md deleted file mode 100644 index 8a5d67ab..00000000 --- a/sdk/python/sdk/zrok/docs/Share.md +++ /dev/null @@ -1,20 +0,0 @@ -# Share - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**share_token** | **str** | | [optional] -**z_id** | **str** | | [optional] -**share_mode** | **str** | | [optional] -**backend_mode** | **str** | | [optional] -**frontend_selection** | **str** | | [optional] -**frontend_endpoint** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**reserved** | **bool** | | [optional] -**activity** | [**SparkData**](SparkData.md) | | [optional] -**limited** | **bool** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ShareApi.md b/sdk/python/sdk/zrok/docs/ShareApi.md deleted file mode 100644 index 86a8b390..00000000 --- a/sdk/python/sdk/zrok/docs/ShareApi.md +++ /dev/null @@ -1,315 +0,0 @@ -# zrok_api.ShareApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**access**](ShareApi.md#access) | **POST** /access | -[**share**](ShareApi.md#share) | **POST** /share | -[**unaccess**](ShareApi.md#unaccess) | **DELETE** /unaccess | -[**unshare**](ShareApi.md#unshare) | **DELETE** /unshare | -[**update_access**](ShareApi.md#update_access) | **PATCH** /access | -[**update_share**](ShareApi.md#update_share) | **PATCH** /share | - -# **access** -> InlineResponse2013 access(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.AccessBody() # AccessBody | (optional) - -try: - api_response = api_instance.access(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ShareApi->access: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AccessBody**](AccessBody.md)| | [optional] - -### Return type - -[**InlineResponse2013**](InlineResponse2013.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **share** -> ShareResponse share(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ShareRequest() # ShareRequest | (optional) - -try: - api_response = api_instance.share(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ShareApi->share: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ShareRequest**](ShareRequest.md)| | [optional] - -### Return type - -[**ShareResponse**](ShareResponse.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **unaccess** -> unaccess(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.UnaccessBody() # UnaccessBody | (optional) - -try: - api_instance.unaccess(body=body) -except ApiException as e: - print("Exception when calling ShareApi->unaccess: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UnaccessBody**](UnaccessBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **unshare** -> unshare(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.UnshareBody() # UnshareBody | (optional) - -try: - api_instance.unshare(body=body) -except ApiException as e: - print("Exception when calling ShareApi->unshare: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UnshareBody**](UnshareBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_access** -> update_access(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.AccessBody1() # AccessBody1 | (optional) - -try: - api_instance.update_access(body=body) -except ApiException as e: - print("Exception when calling ShareApi->update_access: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AccessBody1**](AccessBody1.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_share** -> update_share(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ShareBody() # ShareBody | (optional) - -try: - api_instance.update_share(body=body) -except ApiException as e: - print("Exception when calling ShareApi->update_share: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ShareBody**](ShareBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ShareBody.md b/sdk/python/sdk/zrok/docs/ShareBody.md deleted file mode 100644 index 4c01d818..00000000 --- a/sdk/python/sdk/zrok/docs/ShareBody.md +++ /dev/null @@ -1,12 +0,0 @@ -# ShareBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**share_token** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**add_access_grants** | **list[str]** | | [optional] -**remove_access_grants** | **list[str]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ShareRequest.md b/sdk/python/sdk/zrok/docs/ShareRequest.md deleted file mode 100644 index d1054fc7..00000000 --- a/sdk/python/sdk/zrok/docs/ShareRequest.md +++ /dev/null @@ -1,22 +0,0 @@ -# ShareRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_mode** | **str** | | [optional] -**frontend_selection** | **list[str]** | | [optional] -**backend_mode** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**auth_scheme** | **str** | | [optional] -**auth_users** | [**list[AuthUser]**](AuthUser.md) | | [optional] -**oauth_provider** | **str** | | [optional] -**oauth_email_domains** | **list[str]** | | [optional] -**oauth_authorization_check_interval** | **str** | | [optional] -**reserved** | **bool** | | [optional] -**permission_mode** | **str** | | [optional] -**access_grants** | **list[str]** | | [optional] -**unique_name** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ShareResponse.md b/sdk/python/sdk/zrok/docs/ShareResponse.md deleted file mode 100644 index f6d09e89..00000000 --- a/sdk/python/sdk/zrok/docs/ShareResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# ShareResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_proxy_endpoints** | **list[str]** | | [optional] -**share_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Shares.md b/sdk/python/sdk/zrok/docs/Shares.md deleted file mode 100644 index 5e8cabd6..00000000 --- a/sdk/python/sdk/zrok/docs/Shares.md +++ /dev/null @@ -1,8 +0,0 @@ -# Shares - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/SparkData.md b/sdk/python/sdk/zrok/docs/SparkData.md deleted file mode 100644 index a0065208..00000000 --- a/sdk/python/sdk/zrok/docs/SparkData.md +++ /dev/null @@ -1,8 +0,0 @@ -# SparkData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/SparkDataSample.md b/sdk/python/sdk/zrok/docs/SparkDataSample.md deleted file mode 100644 index 192675b6..00000000 --- a/sdk/python/sdk/zrok/docs/SparkDataSample.md +++ /dev/null @@ -1,10 +0,0 @@ -# SparkDataSample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rx** | **float** | | [optional] -**tx** | **float** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/SparklinesBody.md b/sdk/python/sdk/zrok/docs/SparklinesBody.md deleted file mode 100644 index 94437504..00000000 --- a/sdk/python/sdk/zrok/docs/SparklinesBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# SparklinesBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | **bool** | | [optional] -**environments** | **list[str]** | | [optional] -**shares** | **list[str]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/TokenGenerateBody.md b/sdk/python/sdk/zrok/docs/TokenGenerateBody.md deleted file mode 100644 index 0622eb92..00000000 --- a/sdk/python/sdk/zrok/docs/TokenGenerateBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# TokenGenerateBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invite_tokens** | **list[str]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/UnaccessBody.md b/sdk/python/sdk/zrok/docs/UnaccessBody.md deleted file mode 100644 index d3bcdfbe..00000000 --- a/sdk/python/sdk/zrok/docs/UnaccessBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnaccessBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/UnshareBody.md b/sdk/python/sdk/zrok/docs/UnshareBody.md deleted file mode 100644 index ec7c4dd1..00000000 --- a/sdk/python/sdk/zrok/docs/UnshareBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnshareBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**reserved** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/VerifyBody.md b/sdk/python/sdk/zrok/docs/VerifyBody.md deleted file mode 100644 index 993e6a34..00000000 --- a/sdk/python/sdk/zrok/docs/VerifyBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# VerifyBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Version.md b/sdk/python/sdk/zrok/docs/Version.md deleted file mode 100644 index 203ff4a1..00000000 --- a/sdk/python/sdk/zrok/docs/Version.md +++ /dev/null @@ -1,8 +0,0 @@ -# Version - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/VersionBody.md b/sdk/python/sdk/zrok/docs/VersionBody.md deleted file mode 100644 index 43f385ee..00000000 --- a/sdk/python/sdk/zrok/docs/VersionBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# VersionBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/VersionCheckBody.md b/sdk/python/sdk/zrok/docs/VersionCheckBody.md deleted file mode 100644 index b00f7a3f..00000000 --- a/sdk/python/sdk/zrok/docs/VersionCheckBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# VersionCheckBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/setup.cfg b/sdk/python/sdk/zrok/setup.cfg new file mode 100644 index 00000000..2194d4d2 --- /dev/null +++ b/sdk/python/sdk/zrok/setup.cfg @@ -0,0 +1,33 @@ +[metadata] +name = openziti +author = OpenZiti Developers +author_email = developers@openziti.org +description = Ziti Python SDK +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/openziti/zrok +license = Apache 2.0 +project_urls = + Source = https://github.com/openziti/zrok + Tracker = https://github.com/openziti/zrok/issues + Discussion = https://openziti.discourse.group/ + +[options] +package_dir = + = . +packages = find: + +[options.packages.find] +where = . + +[flake8] +exclude = zrok_api, build +max-line-length = 120 + +[versioneer] +VCS = git +style = pep440-pre +versionfile_source = zrok/_version.py +versionfile_build = zrok/_version.py +tag_prefix = v +parentdir_prefix = zrok- diff --git a/sdk/python/sdk/zrok/setup.py b/sdk/python/sdk/zrok/setup.py index 3d0fc92b..801f64a3 100644 --- a/sdk/python/sdk/zrok/setup.py +++ b/sdk/python/sdk/zrok/setup.py @@ -1,18 +1,9 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - from setuptools import setup, find_packages # noqa: H301 +import os +import versioneer -NAME = "zrok_sdk" +# optionally upload to TestPyPi with alternative name in testing repo +NAME = os.getenv('ZROK_PY_NAME', "zrok") VERSION = "1.0.0" # To install the library, run the following # @@ -21,19 +12,21 @@ VERSION = "1.0.0" # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil", "openziti >= 0.8.1"] setup( name=NAME, - version=VERSION, + cmdclass=versioneer.get_cmdclass(dict()), + version=versioneer.get_version(), description="zrok", author_email="", url="", keywords=["Swagger", "zrok"], install_requires=REQUIRES, + python_requires='>3.10.0', packages=find_packages(), include_package_data=True, long_description="""\ - zrok client access # noqa: E501 + Geo-scale, next-generation peer-to-peer sharing platform built on top of OpenZiti. """ ) diff --git a/sdk/python/sdk/zrok/test-requirements.txt b/sdk/python/sdk/zrok/test-requirements.txt deleted file mode 100644 index 2702246c..00000000 --- a/sdk/python/sdk/zrok/test-requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -coverage>=4.0.3 -nose>=1.3.7 -pluggy>=0.3.1 -py>=1.4.31 -randomize>=0.13 diff --git a/sdk/python/sdk/zrok/test/__init__.py b/sdk/python/sdk/zrok/test/__init__.py deleted file mode 100644 index 576f56f8..00000000 --- a/sdk/python/sdk/zrok/test/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# coding: utf-8 \ No newline at end of file diff --git a/sdk/python/sdk/zrok/test/test_access_body.py b/sdk/python/sdk/zrok/test/test_access_body.py deleted file mode 100644 index 7e936247..00000000 --- a/sdk/python/sdk/zrok/test/test_access_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.access_body import AccessBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAccessBody(unittest.TestCase): - """AccessBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAccessBody(self): - """Test AccessBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.access_body.AccessBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_access_body1.py b/sdk/python/sdk/zrok/test/test_access_body1.py deleted file mode 100644 index 53e78285..00000000 --- a/sdk/python/sdk/zrok/test/test_access_body1.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.access_body1 import AccessBody1 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAccessBody1(unittest.TestCase): - """AccessBody1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAccessBody1(self): - """Test AccessBody1""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.access_body1.AccessBody1() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_account_api.py b/sdk/python/sdk/zrok/test/test_account_api.py deleted file mode 100644 index 2a02a258..00000000 --- a/sdk/python/sdk/zrok/test/test_account_api.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.api.account_api import AccountApi # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAccountApi(unittest.TestCase): - """AccountApi unit test stubs""" - - def setUp(self): - self.api = AccountApi() # noqa: E501 - - def tearDown(self): - pass - - def test_change_password(self): - """Test case for change_password - - """ - pass - - def test_invite(self): - """Test case for invite - - """ - pass - - def test_login(self): - """Test case for login - - """ - pass - - def test_regenerate_token(self): - """Test case for regenerate_token - - """ - pass - - def test_register(self): - """Test case for register - - """ - pass - - def test_reset_password(self): - """Test case for reset_password - - """ - pass - - def test_reset_password_request(self): - """Test case for reset_password_request - - """ - pass - - def test_verify(self): - """Test case for verify - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_account_body.py b/sdk/python/sdk/zrok/test/test_account_body.py deleted file mode 100644 index 56a6837a..00000000 --- a/sdk/python/sdk/zrok/test/test_account_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.account_body import AccountBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAccountBody(unittest.TestCase): - """AccountBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAccountBody(self): - """Test AccountBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.account_body.AccountBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_admin_api.py b/sdk/python/sdk/zrok/test/test_admin_api.py deleted file mode 100644 index 5b9a30b4..00000000 --- a/sdk/python/sdk/zrok/test/test_admin_api.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.api.admin_api import AdminApi # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAdminApi(unittest.TestCase): - """AdminApi unit test stubs""" - - def setUp(self): - self.api = AdminApi() # noqa: E501 - - def tearDown(self): - pass - - def test_add_organization_member(self): - """Test case for add_organization_member - - """ - pass - - def test_create_account(self): - """Test case for create_account - - """ - pass - - def test_create_frontend(self): - """Test case for create_frontend - - """ - pass - - def test_create_identity(self): - """Test case for create_identity - - """ - pass - - def test_create_organization(self): - """Test case for create_organization - - """ - pass - - def test_delete_frontend(self): - """Test case for delete_frontend - - """ - pass - - def test_delete_organization(self): - """Test case for delete_organization - - """ - pass - - def test_grants(self): - """Test case for grants - - """ - pass - - def test_invite_token_generate(self): - """Test case for invite_token_generate - - """ - pass - - def test_list_frontends(self): - """Test case for list_frontends - - """ - pass - - def test_list_organization_members(self): - """Test case for list_organization_members - - """ - pass - - def test_list_organizations(self): - """Test case for list_organizations - - """ - pass - - def test_remove_organization_member(self): - """Test case for remove_organization_member - - """ - pass - - def test_update_frontend(self): - """Test case for update_frontend - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_auth_user.py b/sdk/python/sdk/zrok/test/test_auth_user.py deleted file mode 100644 index 3e362a20..00000000 --- a/sdk/python/sdk/zrok/test/test_auth_user.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.auth_user import AuthUser # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAuthUser(unittest.TestCase): - """AuthUser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAuthUser(self): - """Test AuthUser""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.auth_user.AuthUser() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_change_password_body.py b/sdk/python/sdk/zrok/test/test_change_password_body.py deleted file mode 100644 index d1ebf600..00000000 --- a/sdk/python/sdk/zrok/test/test_change_password_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.change_password_body import ChangePasswordBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestChangePasswordBody(unittest.TestCase): - """ChangePasswordBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChangePasswordBody(self): - """Test ChangePasswordBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.change_password_body.ChangePasswordBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_client_version_check_body.py b/sdk/python/sdk/zrok/test/test_client_version_check_body.py deleted file mode 100644 index 11fec3f4..00000000 --- a/sdk/python/sdk/zrok/test/test_client_version_check_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.client_version_check_body import ClientVersionCheckBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestClientVersionCheckBody(unittest.TestCase): - """ClientVersionCheckBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClientVersionCheckBody(self): - """Test ClientVersionCheckBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.client_version_check_body.ClientVersionCheckBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_configuration.py b/sdk/python/sdk/zrok/test/test_configuration.py deleted file mode 100644 index 29ad044b..00000000 --- a/sdk/python/sdk/zrok/test/test_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.configuration import Configuration # noqa: E501 -from zrok_api.rest import ApiException - - -class TestConfiguration(unittest.TestCase): - """Configuration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testConfiguration(self): - """Test Configuration""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.configuration.Configuration() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_disable_body.py b/sdk/python/sdk/zrok/test/test_disable_body.py deleted file mode 100644 index ab342d59..00000000 --- a/sdk/python/sdk/zrok/test/test_disable_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.disable_body import DisableBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestDisableBody(unittest.TestCase): - """DisableBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDisableBody(self): - """Test DisableBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.disable_body.DisableBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_enable_body.py b/sdk/python/sdk/zrok/test/test_enable_body.py deleted file mode 100644 index d3eec4b3..00000000 --- a/sdk/python/sdk/zrok/test/test_enable_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.enable_body import EnableBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnableBody(unittest.TestCase): - """EnableBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnableBody(self): - """Test EnableBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.enable_body.EnableBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environment.py b/sdk/python/sdk/zrok/test/test_environment.py deleted file mode 100644 index 3a339b29..00000000 --- a/sdk/python/sdk/zrok/test/test_environment.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.environment import Environment # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnvironment(unittest.TestCase): - """Environment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnvironment(self): - """Test Environment""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.environment.Environment() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environment_and_resources.py b/sdk/python/sdk/zrok/test/test_environment_and_resources.py deleted file mode 100644 index ab4f4501..00000000 --- a/sdk/python/sdk/zrok/test/test_environment_and_resources.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.environment_and_resources import EnvironmentAndResources # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnvironmentAndResources(unittest.TestCase): - """EnvironmentAndResources unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnvironmentAndResources(self): - """Test EnvironmentAndResources""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.environment_and_resources.EnvironmentAndResources() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environment_api.py b/sdk/python/sdk/zrok/test/test_environment_api.py deleted file mode 100644 index c70480e6..00000000 --- a/sdk/python/sdk/zrok/test/test_environment_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.api.environment_api import EnvironmentApi # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnvironmentApi(unittest.TestCase): - """EnvironmentApi unit test stubs""" - - def setUp(self): - self.api = EnvironmentApi() # noqa: E501 - - def tearDown(self): - pass - - def test_disable(self): - """Test case for disable - - """ - pass - - def test_enable(self): - """Test case for enable - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environments.py b/sdk/python/sdk/zrok/test/test_environments.py deleted file mode 100644 index 21972eca..00000000 --- a/sdk/python/sdk/zrok/test/test_environments.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.environments import Environments # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnvironments(unittest.TestCase): - """Environments unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnvironments(self): - """Test Environments""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.environments.Environments() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_error_message.py b/sdk/python/sdk/zrok/test/test_error_message.py deleted file mode 100644 index db509710..00000000 --- a/sdk/python/sdk/zrok/test/test_error_message.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.error_message import ErrorMessage # noqa: E501 -from zrok_api.rest import ApiException - - -class TestErrorMessage(unittest.TestCase): - """ErrorMessage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testErrorMessage(self): - """Test ErrorMessage""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.error_message.ErrorMessage() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend.py b/sdk/python/sdk/zrok/test/test_frontend.py deleted file mode 100644 index 7b44e3ef..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontend import Frontend # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontend(unittest.TestCase): - """Frontend unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontend(self): - """Test Frontend""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend.Frontend() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend_body.py b/sdk/python/sdk/zrok/test/test_frontend_body.py deleted file mode 100644 index 8519edbc..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontend_body import FrontendBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontendBody(unittest.TestCase): - """FrontendBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontendBody(self): - """Test FrontendBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend_body.FrontendBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend_body1.py b/sdk/python/sdk/zrok/test/test_frontend_body1.py deleted file mode 100644 index 5a560aff..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend_body1.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontend_body1 import FrontendBody1 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontendBody1(unittest.TestCase): - """FrontendBody1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontendBody1(self): - """Test FrontendBody1""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend_body1.FrontendBody1() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend_body2.py b/sdk/python/sdk/zrok/test/test_frontend_body2.py deleted file mode 100644 index c8b2016c..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend_body2.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontend_body2 import FrontendBody2 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontendBody2(unittest.TestCase): - """FrontendBody2 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontendBody2(self): - """Test FrontendBody2""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend_body2.FrontendBody2() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontends.py b/sdk/python/sdk/zrok/test/test_frontends.py deleted file mode 100644 index cb96d34b..00000000 --- a/sdk/python/sdk/zrok/test/test_frontends.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontends import Frontends # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontends(unittest.TestCase): - """Frontends unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontends(self): - """Test Frontends""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontends.Frontends() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_grants_body.py b/sdk/python/sdk/zrok/test/test_grants_body.py deleted file mode 100644 index 431fd27b..00000000 --- a/sdk/python/sdk/zrok/test/test_grants_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.grants_body import GrantsBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestGrantsBody(unittest.TestCase): - """GrantsBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGrantsBody(self): - """Test GrantsBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.grants_body.GrantsBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_identity_body.py b/sdk/python/sdk/zrok/test/test_identity_body.py deleted file mode 100644 index b3716d87..00000000 --- a/sdk/python/sdk/zrok/test/test_identity_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.identity_body import IdentityBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestIdentityBody(unittest.TestCase): - """IdentityBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testIdentityBody(self): - """Test IdentityBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.identity_body.IdentityBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response200.py b/sdk/python/sdk/zrok/test/test_inline_response200.py deleted file mode 100644 index a447716d..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response200.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response200 import InlineResponse200 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse200(unittest.TestCase): - """InlineResponse200 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse200(self): - """Test InlineResponse200""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response200.InlineResponse200() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2001.py b/sdk/python/sdk/zrok/test/test_inline_response2001.py deleted file mode 100644 index 73fc1356..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2001.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2001 import InlineResponse2001 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2001(unittest.TestCase): - """InlineResponse2001 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2001(self): - """Test InlineResponse2001""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2001.InlineResponse2001() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2002.py b/sdk/python/sdk/zrok/test/test_inline_response2002.py deleted file mode 100644 index 0230ae38..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2002.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2002 import InlineResponse2002 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2002(unittest.TestCase): - """InlineResponse2002 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2002(self): - """Test InlineResponse2002""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2002.InlineResponse2002() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2003.py b/sdk/python/sdk/zrok/test/test_inline_response2003.py deleted file mode 100644 index dc30845e..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2003.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2003 import InlineResponse2003 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2003(unittest.TestCase): - """InlineResponse2003 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2003(self): - """Test InlineResponse2003""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2003.InlineResponse2003() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2003_members.py b/sdk/python/sdk/zrok/test/test_inline_response2003_members.py deleted file mode 100644 index 1fd04fa1..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2003_members.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2003_members import InlineResponse2003Members # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2003Members(unittest.TestCase): - """InlineResponse2003Members unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2003Members(self): - """Test InlineResponse2003Members""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2003_members.InlineResponse2003Members() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004.py b/sdk/python/sdk/zrok/test/test_inline_response2004.py deleted file mode 100644 index 264bc094..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2004.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2004 import InlineResponse2004 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2004(unittest.TestCase): - """InlineResponse2004 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2004(self): - """Test InlineResponse2004""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2004.InlineResponse2004() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004_members.py b/sdk/python/sdk/zrok/test/test_inline_response2004_members.py deleted file mode 100644 index 7376a0b9..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2004_members.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2004_members import InlineResponse2004Members # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2004Members(unittest.TestCase): - """InlineResponse2004Members unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2004Members(self): - """Test InlineResponse2004Members""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2004_members.InlineResponse2004Members() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py b/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py deleted file mode 100644 index 598471e6..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2004Organizations(unittest.TestCase): - """InlineResponse2004Organizations unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2004Organizations(self): - """Test InlineResponse2004Organizations""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2004_organizations.InlineResponse2004Organizations() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005.py b/sdk/python/sdk/zrok/test/test_inline_response2005.py deleted file mode 100644 index cf3b41ac..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2005.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2005 import InlineResponse2005 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2005(unittest.TestCase): - """InlineResponse2005 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2005(self): - """Test InlineResponse2005""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2005.InlineResponse2005() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py b/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py deleted file mode 100644 index 230a6ac2..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2005Memberships(unittest.TestCase): - """InlineResponse2005Memberships unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2005Memberships(self): - """Test InlineResponse2005Memberships""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2005_memberships.InlineResponse2005Memberships() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py b/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py deleted file mode 100644 index 6c3e995e..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2005_organizations import InlineResponse2005Organizations # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2005Organizations(unittest.TestCase): - """InlineResponse2005Organizations unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2005Organizations(self): - """Test InlineResponse2005Organizations""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2005_organizations.InlineResponse2005Organizations() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2006.py b/sdk/python/sdk/zrok/test/test_inline_response2006.py deleted file mode 100644 index fd19aa10..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2006.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2006 import InlineResponse2006 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2006(unittest.TestCase): - """InlineResponse2006 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2006(self): - """Test InlineResponse2006""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2006.InlineResponse2006() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py b/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py deleted file mode 100644 index 1a779c3e..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2006_memberships import InlineResponse2006Memberships # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2006Memberships(unittest.TestCase): - """InlineResponse2006Memberships unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2006Memberships(self): - """Test InlineResponse2006Memberships""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2006_memberships.InlineResponse2006Memberships() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2007.py b/sdk/python/sdk/zrok/test/test_inline_response2007.py deleted file mode 100644 index 52ae67ba..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2007.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2007 import InlineResponse2007 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2007(unittest.TestCase): - """InlineResponse2007 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2007(self): - """Test InlineResponse2007""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2007.InlineResponse2007() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response201.py b/sdk/python/sdk/zrok/test/test_inline_response201.py deleted file mode 100644 index 3c719ebd..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response201.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response201 import InlineResponse201 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse201(unittest.TestCase): - """InlineResponse201 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse201(self): - """Test InlineResponse201""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response201.InlineResponse201() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2011.py b/sdk/python/sdk/zrok/test/test_inline_response2011.py deleted file mode 100644 index 3594d34c..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2011.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2011 import InlineResponse2011 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2011(unittest.TestCase): - """InlineResponse2011 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2011(self): - """Test InlineResponse2011""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2011.InlineResponse2011() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2012.py b/sdk/python/sdk/zrok/test/test_inline_response2012.py deleted file mode 100644 index cc69a570..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2012.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2012 import InlineResponse2012 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2012(unittest.TestCase): - """InlineResponse2012 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2012(self): - """Test InlineResponse2012""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2012.InlineResponse2012() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2013.py b/sdk/python/sdk/zrok/test/test_inline_response2013.py deleted file mode 100644 index 3b028a6c..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2013.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2013 import InlineResponse2013 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2013(unittest.TestCase): - """InlineResponse2013 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2013(self): - """Test InlineResponse2013""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2013.InlineResponse2013() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response400.py b/sdk/python/sdk/zrok/test/test_inline_response400.py deleted file mode 100644 index 13e6f8c6..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response400.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response400 import InlineResponse400 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse400(unittest.TestCase): - """InlineResponse400 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse400(self): - """Test InlineResponse400""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response400.InlineResponse400() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_invite_body.py b/sdk/python/sdk/zrok/test/test_invite_body.py deleted file mode 100644 index 8228bdc0..00000000 --- a/sdk/python/sdk/zrok/test/test_invite_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.invite_body import InviteBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInviteBody(unittest.TestCase): - """InviteBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInviteBody(self): - """Test InviteBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.invite_body.InviteBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_login_body.py b/sdk/python/sdk/zrok/test/test_login_body.py deleted file mode 100644 index 3dd5df4d..00000000 --- a/sdk/python/sdk/zrok/test/test_login_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.login_body import LoginBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestLoginBody(unittest.TestCase): - """LoginBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLoginBody(self): - """Test LoginBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.login_body.LoginBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metadata_api.py b/sdk/python/sdk/zrok/test/test_metadata_api.py deleted file mode 100644 index 4d75a9a4..00000000 --- a/sdk/python/sdk/zrok/test/test_metadata_api.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.api.metadata_api import MetadataApi # noqa: E501 -from zrok_api.rest import ApiException - - -class TestMetadataApi(unittest.TestCase): - """MetadataApi unit test stubs""" - - def setUp(self): - self.api = MetadataApi() # noqa: E501 - - def tearDown(self): - pass - - def test_configuration(self): - """Test case for configuration - - """ - pass - - def test_get_account_detail(self): - """Test case for get_account_detail - - """ - pass - - def test_get_account_metrics(self): - """Test case for get_account_metrics - - """ - pass - - def test_get_environment_detail(self): - """Test case for get_environment_detail - - """ - pass - - def test_get_environment_metrics(self): - """Test case for get_environment_metrics - - """ - pass - - def test_get_frontend_detail(self): - """Test case for get_frontend_detail - - """ - pass - - def test_get_share_detail(self): - """Test case for get_share_detail - - """ - pass - - def test_get_share_metrics(self): - """Test case for get_share_metrics - - """ - pass - - def test_get_sparklines(self): - """Test case for get_sparklines - - """ - pass - - def test_list_memberships(self): - """Test case for list_memberships - - """ - pass - - def test_list_org_members(self): - """Test case for list_org_members - - """ - pass - - def test_org_account_overview(self): - """Test case for org_account_overview - - """ - pass - - def test_overview(self): - """Test case for overview - - """ - pass - - def test_version(self): - """Test case for version - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metrics.py b/sdk/python/sdk/zrok/test/test_metrics.py deleted file mode 100644 index 71ae9c2a..00000000 --- a/sdk/python/sdk/zrok/test/test_metrics.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.metrics import Metrics # noqa: E501 -from zrok_api.rest import ApiException - - -class TestMetrics(unittest.TestCase): - """Metrics unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMetrics(self): - """Test Metrics""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.metrics.Metrics() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metrics_sample.py b/sdk/python/sdk/zrok/test/test_metrics_sample.py deleted file mode 100644 index 19e956f0..00000000 --- a/sdk/python/sdk/zrok/test/test_metrics_sample.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.metrics_sample import MetricsSample # noqa: E501 -from zrok_api.rest import ApiException - - -class TestMetricsSample(unittest.TestCase): - """MetricsSample unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMetricsSample(self): - """Test MetricsSample""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.metrics_sample.MetricsSample() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_add_body.py b/sdk/python/sdk/zrok/test/test_organization_add_body.py deleted file mode 100644 index 13274497..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_add_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_add_body import OrganizationAddBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationAddBody(unittest.TestCase): - """OrganizationAddBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationAddBody(self): - """Test OrganizationAddBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_add_body.OrganizationAddBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_body.py b/sdk/python/sdk/zrok/test/test_organization_body.py deleted file mode 100644 index 05e57436..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_body import OrganizationBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationBody(unittest.TestCase): - """OrganizationBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationBody(self): - """Test OrganizationBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_body.OrganizationBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_body1.py b/sdk/python/sdk/zrok/test/test_organization_body1.py deleted file mode 100644 index 930378cb..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_body1.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_body1 import OrganizationBody1 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationBody1(unittest.TestCase): - """OrganizationBody1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationBody1(self): - """Test OrganizationBody1""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_body1.OrganizationBody1() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_list_body.py b/sdk/python/sdk/zrok/test/test_organization_list_body.py deleted file mode 100644 index b43c57e4..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_list_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_list_body import OrganizationListBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationListBody(unittest.TestCase): - """OrganizationListBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationListBody(self): - """Test OrganizationListBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_list_body.OrganizationListBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_remove_body.py b/sdk/python/sdk/zrok/test/test_organization_remove_body.py deleted file mode 100644 index 07128ed8..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_remove_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_remove_body import OrganizationRemoveBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationRemoveBody(unittest.TestCase): - """OrganizationRemoveBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationRemoveBody(self): - """Test OrganizationRemoveBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_remove_body.OrganizationRemoveBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_overview.py b/sdk/python/sdk/zrok/test/test_overview.py deleted file mode 100644 index 8a92ad55..00000000 --- a/sdk/python/sdk/zrok/test/test_overview.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.overview import Overview # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOverview(unittest.TestCase): - """Overview unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOverview(self): - """Test Overview""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.overview.Overview() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_principal.py b/sdk/python/sdk/zrok/test/test_principal.py deleted file mode 100644 index f38cb221..00000000 --- a/sdk/python/sdk/zrok/test/test_principal.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.principal import Principal # noqa: E501 -from zrok_api.rest import ApiException - - -class TestPrincipal(unittest.TestCase): - """Principal unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPrincipal(self): - """Test Principal""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.principal.Principal() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py b/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py deleted file mode 100644 index 405b07c4..00000000 --- a/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestRegenerateAccountTokenBody(unittest.TestCase): - """RegenerateAccountTokenBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRegenerateAccountTokenBody(self): - """Test RegenerateAccountTokenBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.regenerate_account_token_body.RegenerateAccountTokenBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_regenerate_token_body.py b/sdk/python/sdk/zrok/test/test_regenerate_token_body.py deleted file mode 100644 index adfd771e..00000000 --- a/sdk/python/sdk/zrok/test/test_regenerate_token_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.regenerate_token_body import RegenerateTokenBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestRegenerateTokenBody(unittest.TestCase): - """RegenerateTokenBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRegenerateTokenBody(self): - """Test RegenerateTokenBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.regenerate_token_body.RegenerateTokenBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_register_body.py b/sdk/python/sdk/zrok/test/test_register_body.py deleted file mode 100644 index fe72be1e..00000000 --- a/sdk/python/sdk/zrok/test/test_register_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.register_body import RegisterBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestRegisterBody(unittest.TestCase): - """RegisterBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRegisterBody(self): - """Test RegisterBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.register_body.RegisterBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_reset_password_body.py b/sdk/python/sdk/zrok/test/test_reset_password_body.py deleted file mode 100644 index f4c4561d..00000000 --- a/sdk/python/sdk/zrok/test/test_reset_password_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.reset_password_body import ResetPasswordBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestResetPasswordBody(unittest.TestCase): - """ResetPasswordBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testResetPasswordBody(self): - """Test ResetPasswordBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.reset_password_body.ResetPasswordBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_reset_password_request_body.py b/sdk/python/sdk/zrok/test/test_reset_password_request_body.py deleted file mode 100644 index d9a3360b..00000000 --- a/sdk/python/sdk/zrok/test/test_reset_password_request_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestResetPasswordRequestBody(unittest.TestCase): - """ResetPasswordRequestBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testResetPasswordRequestBody(self): - """Test ResetPasswordRequestBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.reset_password_request_body.ResetPasswordRequestBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share.py b/sdk/python/sdk/zrok/test/test_share.py deleted file mode 100644 index 80a16c16..00000000 --- a/sdk/python/sdk/zrok/test/test_share.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.share import Share # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShare(unittest.TestCase): - """Share unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShare(self): - """Test Share""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share.Share() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_api.py b/sdk/python/sdk/zrok/test/test_share_api.py deleted file mode 100644 index e799f3c8..00000000 --- a/sdk/python/sdk/zrok/test/test_share_api.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.api.share_api import ShareApi # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShareApi(unittest.TestCase): - """ShareApi unit test stubs""" - - def setUp(self): - self.api = ShareApi() # noqa: E501 - - def tearDown(self): - pass - - def test_access(self): - """Test case for access - - """ - pass - - def test_share(self): - """Test case for share - - """ - pass - - def test_unaccess(self): - """Test case for unaccess - - """ - pass - - def test_unshare(self): - """Test case for unshare - - """ - pass - - def test_update_share(self): - """Test case for update_share - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_body.py b/sdk/python/sdk/zrok/test/test_share_body.py deleted file mode 100644 index fcbdb3a2..00000000 --- a/sdk/python/sdk/zrok/test/test_share_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.share_body import ShareBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShareBody(unittest.TestCase): - """ShareBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShareBody(self): - """Test ShareBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share_body.ShareBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_request.py b/sdk/python/sdk/zrok/test/test_share_request.py deleted file mode 100644 index 79abd431..00000000 --- a/sdk/python/sdk/zrok/test/test_share_request.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.share_request import ShareRequest # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShareRequest(unittest.TestCase): - """ShareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShareRequest(self): - """Test ShareRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share_request.ShareRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_response.py b/sdk/python/sdk/zrok/test/test_share_response.py deleted file mode 100644 index e2ef3f94..00000000 --- a/sdk/python/sdk/zrok/test/test_share_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.share_response import ShareResponse # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShareResponse(unittest.TestCase): - """ShareResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShareResponse(self): - """Test ShareResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share_response.ShareResponse() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_shares.py b/sdk/python/sdk/zrok/test/test_shares.py deleted file mode 100644 index f225a196..00000000 --- a/sdk/python/sdk/zrok/test/test_shares.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.shares import Shares # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShares(unittest.TestCase): - """Shares unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShares(self): - """Test Shares""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.shares.Shares() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_spark_data.py b/sdk/python/sdk/zrok/test/test_spark_data.py deleted file mode 100644 index 0543758e..00000000 --- a/sdk/python/sdk/zrok/test/test_spark_data.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.spark_data import SparkData # noqa: E501 -from zrok_api.rest import ApiException - - -class TestSparkData(unittest.TestCase): - """SparkData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSparkData(self): - """Test SparkData""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.spark_data.SparkData() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_spark_data_sample.py b/sdk/python/sdk/zrok/test/test_spark_data_sample.py deleted file mode 100644 index 993babe2..00000000 --- a/sdk/python/sdk/zrok/test/test_spark_data_sample.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.spark_data_sample import SparkDataSample # noqa: E501 -from zrok_api.rest import ApiException - - -class TestSparkDataSample(unittest.TestCase): - """SparkDataSample unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSparkDataSample(self): - """Test SparkDataSample""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.spark_data_sample.SparkDataSample() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_sparklines_body.py b/sdk/python/sdk/zrok/test/test_sparklines_body.py deleted file mode 100644 index 00165b62..00000000 --- a/sdk/python/sdk/zrok/test/test_sparklines_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.sparklines_body import SparklinesBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestSparklinesBody(unittest.TestCase): - """SparklinesBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSparklinesBody(self): - """Test SparklinesBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.sparklines_body.SparklinesBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_token_generate_body.py b/sdk/python/sdk/zrok/test/test_token_generate_body.py deleted file mode 100644 index 990712d1..00000000 --- a/sdk/python/sdk/zrok/test/test_token_generate_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.token_generate_body import TokenGenerateBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestTokenGenerateBody(unittest.TestCase): - """TokenGenerateBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTokenGenerateBody(self): - """Test TokenGenerateBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.token_generate_body.TokenGenerateBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_unaccess_body.py b/sdk/python/sdk/zrok/test/test_unaccess_body.py deleted file mode 100644 index 23e63156..00000000 --- a/sdk/python/sdk/zrok/test/test_unaccess_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.unaccess_body import UnaccessBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestUnaccessBody(unittest.TestCase): - """UnaccessBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUnaccessBody(self): - """Test UnaccessBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.unaccess_body.UnaccessBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_unshare_body.py b/sdk/python/sdk/zrok/test/test_unshare_body.py deleted file mode 100644 index 23236afe..00000000 --- a/sdk/python/sdk/zrok/test/test_unshare_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.unshare_body import UnshareBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestUnshareBody(unittest.TestCase): - """UnshareBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUnshareBody(self): - """Test UnshareBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.unshare_body.UnshareBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_verify_body.py b/sdk/python/sdk/zrok/test/test_verify_body.py deleted file mode 100644 index 9148441b..00000000 --- a/sdk/python/sdk/zrok/test/test_verify_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.verify_body import VerifyBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVerifyBody(unittest.TestCase): - """VerifyBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVerifyBody(self): - """Test VerifyBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.verify_body.VerifyBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version.py b/sdk/python/sdk/zrok/test/test_version.py deleted file mode 100644 index cad9c632..00000000 --- a/sdk/python/sdk/zrok/test/test_version.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.version import Version # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVersion(unittest.TestCase): - """Version unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVersion(self): - """Test Version""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.version.Version() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version_body.py b/sdk/python/sdk/zrok/test/test_version_body.py deleted file mode 100644 index 1c0a1898..00000000 --- a/sdk/python/sdk/zrok/test/test_version_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.version_body import VersionBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVersionBody(unittest.TestCase): - """VersionBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVersionBody(self): - """Test VersionBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.version_body.VersionBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version_check_body.py b/sdk/python/sdk/zrok/test/test_version_check_body.py deleted file mode 100644 index 5ba46b33..00000000 --- a/sdk/python/sdk/zrok/test/test_version_check_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.version_check_body import VersionCheckBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVersionCheckBody(unittest.TestCase): - """VersionCheckBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVersionCheckBody(self): - """Test VersionCheckBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.version_check_body.VersionCheckBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/tox.ini b/sdk/python/sdk/zrok/tox.ini deleted file mode 100644 index a310bec9..00000000 --- a/sdk/python/sdk/zrok/tox.ini +++ /dev/null @@ -1,10 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - nosetests \ - [] diff --git a/sdk/python/sdk/zrok/versioneer.py b/sdk/python/sdk/zrok/versioneer.py new file mode 100644 index 00000000..1e3753e6 --- /dev/null +++ b/sdk/python/sdk/zrok/versioneer.py @@ -0,0 +1,2277 @@ + +# Version: 0.29 + +"""The Versioneer - like a rocketeer, but for versions. + +The Versioneer +============== + +* like a rocketeer, but for versions! +* https://github.com/python-versioneer/python-versioneer +* Brian Warner +* License: Public Domain (Unlicense) +* Compatible with: Python 3.7, 3.8, 3.9, 3.10, 3.11 and pypy3 +* [![Latest Version][pypi-image]][pypi-url] +* [![Build Status][travis-image]][travis-url] + +This is a tool for managing a recorded version number in setuptools-based +python projects. The goal is to remove the tedious and error-prone "update +the embedded version string" step from your release process. Making a new +release should be as easy as recording a new tag in your version-control +system, and maybe making new tarballs. + + +## Quick Install + +Versioneer provides two installation modes. The "classic" vendored mode installs +a copy of versioneer into your repository. The experimental build-time dependency mode +is intended to allow you to skip this step and simplify the process of upgrading. + +### Vendored mode + +* `pip install versioneer` to somewhere in your $PATH + * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is + available, so you can also use `conda install -c conda-forge versioneer` +* add a `[tool.versioneer]` section to your `pyproject.toml` or a + `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) + * Note that you will need to add `tomli; python_version < "3.11"` to your + build-time dependencies if you use `pyproject.toml` +* run `versioneer install --vendor` in your source tree, commit the results +* verify version information with `python setup.py version` + +### Build-time dependency mode + +* `pip install versioneer` to somewhere in your $PATH + * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is + available, so you can also use `conda install -c conda-forge versioneer` +* add a `[tool.versioneer]` section to your `pyproject.toml` or a + `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) +* add `versioneer` (with `[toml]` extra, if configuring in `pyproject.toml`) + to the `requires` key of the `build-system` table in `pyproject.toml`: + ```toml + [build-system] + requires = ["setuptools", "versioneer[toml]"] + build-backend = "setuptools.build_meta" + ``` +* run `versioneer install --no-vendor` in your source tree, commit the results +* verify version information with `python setup.py version` + +## Version Identifiers + +Source trees come from a variety of places: + +* a version-control system checkout (mostly used by developers) +* a nightly tarball, produced by build automation +* a snapshot tarball, produced by a web-based VCS browser, like github's + "tarball from tag" feature +* a release tarball, produced by "setup.py sdist", distributed through PyPI + +Within each source tree, the version identifier (either a string or a number, +this tool is format-agnostic) can come from a variety of places: + +* ask the VCS tool itself, e.g. "git describe" (for checkouts), which knows + about recent "tags" and an absolute revision-id +* the name of the directory into which the tarball was unpacked +* an expanded VCS keyword ($Id$, etc) +* a `_version.py` created by some earlier build step + +For released software, the version identifier is closely related to a VCS +tag. Some projects use tag names that include more than just the version +string (e.g. "myproject-1.2" instead of just "1.2"), in which case the tool +needs to strip the tag prefix to extract the version identifier. For +unreleased software (between tags), the version identifier should provide +enough information to help developers recreate the same tree, while also +giving them an idea of roughly how old the tree is (after version 1.2, before +version 1.3). Many VCS systems can report a description that captures this, +for example `git describe --tags --dirty --always` reports things like +"0.7-1-g574ab98-dirty" to indicate that the checkout is one revision past the +0.7 tag, has a unique revision id of "574ab98", and is "dirty" (it has +uncommitted changes). + +The version identifier is used for multiple purposes: + +* to allow the module to self-identify its version: `myproject.__version__` +* to choose a name and prefix for a 'setup.py sdist' tarball + +## Theory of Operation + +Versioneer works by adding a special `_version.py` file into your source +tree, where your `__init__.py` can import it. This `_version.py` knows how to +dynamically ask the VCS tool for version information at import time. + +`_version.py` also contains `$Revision$` markers, and the installation +process marks `_version.py` to have this marker rewritten with a tag name +during the `git archive` command. As a result, generated tarballs will +contain enough information to get the proper version. + +To allow `setup.py` to compute a version too, a `versioneer.py` is added to +the top level of your source tree, next to `setup.py` and the `setup.cfg` +that configures it. This overrides several distutils/setuptools commands to +compute the version when invoked, and changes `setup.py build` and `setup.py +sdist` to replace `_version.py` with a small static file that contains just +the generated version data. + +## Installation + +See [INSTALL.md](./INSTALL.md) for detailed installation instructions. + +## Version-String Flavors + +Code which uses Versioneer can learn about its version string at runtime by +importing `_version` from your main `__init__.py` file and running the +`get_versions()` function. From the "outside" (e.g. in `setup.py`), you can +import the top-level `versioneer.py` and run `get_versions()`. + +Both functions return a dictionary with different flavors of version +information: + +* `['version']`: A condensed version string, rendered using the selected + style. This is the most commonly used value for the project's version + string. The default "pep440" style yields strings like `0.11`, + `0.11+2.g1076c97`, or `0.11+2.g1076c97.dirty`. See the "Styles" section + below for alternative styles. + +* `['full-revisionid']`: detailed revision identifier. For Git, this is the + full SHA1 commit id, e.g. "1076c978a8d3cfc70f408fe5974aa6c092c949ac". + +* `['date']`: Date and time of the latest `HEAD` commit. For Git, it is the + commit date in ISO 8601 format. This will be None if the date is not + available. + +* `['dirty']`: a boolean, True if the tree has uncommitted changes. Note that + this is only accurate if run in a VCS checkout, otherwise it is likely to + be False or None + +* `['error']`: if the version string could not be computed, this will be set + to a string describing the problem, otherwise it will be None. It may be + useful to throw an exception in setup.py if this is set, to avoid e.g. + creating tarballs with a version string of "unknown". + +Some variants are more useful than others. Including `full-revisionid` in a +bug report should allow developers to reconstruct the exact code being tested +(or indicate the presence of local changes that should be shared with the +developers). `version` is suitable for display in an "about" box or a CLI +`--version` output: it can be easily compared against release notes and lists +of bugs fixed in various releases. + +The installer adds the following text to your `__init__.py` to place a basic +version in `YOURPROJECT.__version__`: + + from ._version import get_versions + __version__ = get_versions()['version'] + del get_versions + +## Styles + +The setup.cfg `style=` configuration controls how the VCS information is +rendered into a version string. + +The default style, "pep440", produces a PEP440-compliant string, equal to the +un-prefixed tag name for actual releases, and containing an additional "local +version" section with more detail for in-between builds. For Git, this is +TAG[+DISTANCE.gHEX[.dirty]] , using information from `git describe --tags +--dirty --always`. For example "0.11+2.g1076c97.dirty" indicates that the +tree is like the "1076c97" commit but has uncommitted changes (".dirty"), and +that this commit is two revisions ("+2") beyond the "0.11" tag. For released +software (exactly equal to a known tag), the identifier will only contain the +stripped tag, e.g. "0.11". + +Other styles are available. See [details.md](details.md) in the Versioneer +source tree for descriptions. + +## Debugging + +Versioneer tries to avoid fatal errors: if something goes wrong, it will tend +to return a version of "0+unknown". To investigate the problem, run `setup.py +version`, which will run the version-lookup code in a verbose mode, and will +display the full contents of `get_versions()` (including the `error` string, +which may help identify what went wrong). + +## Known Limitations + +Some situations are known to cause problems for Versioneer. This details the +most significant ones. More can be found on Github +[issues page](https://github.com/python-versioneer/python-versioneer/issues). + +### Subprojects + +Versioneer has limited support for source trees in which `setup.py` is not in +the root directory (e.g. `setup.py` and `.git/` are *not* siblings). The are +two common reasons why `setup.py` might not be in the root: + +* Source trees which contain multiple subprojects, such as + [Buildbot](https://github.com/buildbot/buildbot), which contains both + "master" and "slave" subprojects, each with their own `setup.py`, + `setup.cfg`, and `tox.ini`. Projects like these produce multiple PyPI + distributions (and upload multiple independently-installable tarballs). +* Source trees whose main purpose is to contain a C library, but which also + provide bindings to Python (and perhaps other languages) in subdirectories. + +Versioneer will look for `.git` in parent directories, and most operations +should get the right version string. However `pip` and `setuptools` have bugs +and implementation details which frequently cause `pip install .` from a +subproject directory to fail to find a correct version string (so it usually +defaults to `0+unknown`). + +`pip install --editable .` should work correctly. `setup.py install` might +work too. + +Pip-8.1.1 is known to have this problem, but hopefully it will get fixed in +some later version. + +[Bug #38](https://github.com/python-versioneer/python-versioneer/issues/38) is tracking +this issue. The discussion in +[PR #61](https://github.com/python-versioneer/python-versioneer/pull/61) describes the +issue from the Versioneer side in more detail. +[pip PR#3176](https://github.com/pypa/pip/pull/3176) and +[pip PR#3615](https://github.com/pypa/pip/pull/3615) contain work to improve +pip to let Versioneer work correctly. + +Versioneer-0.16 and earlier only looked for a `.git` directory next to the +`setup.cfg`, so subprojects were completely unsupported with those releases. + +### Editable installs with setuptools <= 18.5 + +`setup.py develop` and `pip install --editable .` allow you to install a +project into a virtualenv once, then continue editing the source code (and +test) without re-installing after every change. + +"Entry-point scripts" (`setup(entry_points={"console_scripts": ..})`) are a +convenient way to specify executable scripts that should be installed along +with the python package. + +These both work as expected when using modern setuptools. When using +setuptools-18.5 or earlier, however, certain operations will cause +`pkg_resources.DistributionNotFound` errors when running the entrypoint +script, which must be resolved by re-installing the package. This happens +when the install happens with one version, then the egg_info data is +regenerated while a different version is checked out. Many setup.py commands +cause egg_info to be rebuilt (including `sdist`, `wheel`, and installing into +a different virtualenv), so this can be surprising. + +[Bug #83](https://github.com/python-versioneer/python-versioneer/issues/83) describes +this one, but upgrading to a newer version of setuptools should probably +resolve it. + + +## Updating Versioneer + +To upgrade your project to a new release of Versioneer, do the following: + +* install the new Versioneer (`pip install -U versioneer` or equivalent) +* edit `setup.cfg` and `pyproject.toml`, if necessary, + to include any new configuration settings indicated by the release notes. + See [UPGRADING](./UPGRADING.md) for details. +* re-run `versioneer install --[no-]vendor` in your source tree, to replace + `SRC/_version.py` +* commit any changed files + +## Future Directions + +This tool is designed to make it easily extended to other version-control +systems: all VCS-specific components are in separate directories like +src/git/ . The top-level `versioneer.py` script is assembled from these +components by running make-versioneer.py . In the future, make-versioneer.py +will take a VCS name as an argument, and will construct a version of +`versioneer.py` that is specific to the given VCS. It might also take the +configuration arguments that are currently provided manually during +installation by editing setup.py . Alternatively, it might go the other +direction and include code from all supported VCS systems, reducing the +number of intermediate scripts. + +## Similar projects + +* [setuptools_scm](https://github.com/pypa/setuptools_scm/) - a non-vendored build-time + dependency +* [minver](https://github.com/jbweston/miniver) - a lightweight reimplementation of + versioneer +* [versioningit](https://github.com/jwodder/versioningit) - a PEP 518-based setuptools + plugin + +## License + +To make Versioneer easier to embed, all its code is dedicated to the public +domain. The `_version.py` that it creates is also in the public domain. +Specifically, both are released under the "Unlicense", as described in +https://unlicense.org/. + +[pypi-image]: https://img.shields.io/pypi/v/versioneer.svg +[pypi-url]: https://pypi.python.org/pypi/versioneer/ +[travis-image]: +https://img.shields.io/travis/com/python-versioneer/python-versioneer.svg +[travis-url]: https://travis-ci.com/github/python-versioneer/python-versioneer + +""" +# pylint:disable=invalid-name,import-outside-toplevel,missing-function-docstring +# pylint:disable=missing-class-docstring,too-many-branches,too-many-statements +# pylint:disable=raise-missing-from,too-many-lines,too-many-locals,import-error +# pylint:disable=too-few-public-methods,redefined-outer-name,consider-using-with +# pylint:disable=attribute-defined-outside-init,too-many-arguments + +import configparser +import errno +import json +import os +import re +import subprocess +import sys +from pathlib import Path +from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union +from typing import NoReturn +import functools + +have_tomllib = True +if sys.version_info >= (3, 11): + import tomllib +else: + try: + import tomli as tomllib + except ImportError: + have_tomllib = False + + +class VersioneerConfig: + """Container for Versioneer configuration parameters.""" + + VCS: str + style: str + tag_prefix: str + versionfile_source: str + versionfile_build: Optional[str] + parentdir_prefix: Optional[str] + verbose: Optional[bool] + + +def get_root() -> str: + """Get the project root directory. + + We require that all commands are run from the project root, i.e. the + directory that contains setup.py, setup.cfg, and versioneer.py . + """ + root = os.path.realpath(os.path.abspath(os.getcwd())) + setup_py = os.path.join(root, "setup.py") + pyproject_toml = os.path.join(root, "pyproject.toml") + versioneer_py = os.path.join(root, "versioneer.py") + if not ( + os.path.exists(setup_py) + or os.path.exists(pyproject_toml) + or os.path.exists(versioneer_py) + ): + # allow 'python path/to/setup.py COMMAND' + root = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) + setup_py = os.path.join(root, "setup.py") + pyproject_toml = os.path.join(root, "pyproject.toml") + versioneer_py = os.path.join(root, "versioneer.py") + if not ( + os.path.exists(setup_py) + or os.path.exists(pyproject_toml) + or os.path.exists(versioneer_py) + ): + err = ("Versioneer was unable to run the project root directory. " + "Versioneer requires setup.py to be executed from " + "its immediate directory (like 'python setup.py COMMAND'), " + "or in a way that lets it use sys.argv[0] to find the root " + "(like 'python path/to/setup.py COMMAND').") + raise VersioneerBadRootError(err) + try: + # Certain runtime workflows (setup.py install/develop in a setuptools + # tree) execute all dependencies in a single python process, so + # "versioneer" may be imported multiple times, and python's shared + # module-import table will cache the first one. So we can't use + # os.path.dirname(__file__), as that will find whichever + # versioneer.py was first imported, even in later projects. + my_path = os.path.realpath(os.path.abspath(__file__)) + me_dir = os.path.normcase(os.path.splitext(my_path)[0]) + vsr_dir = os.path.normcase(os.path.splitext(versioneer_py)[0]) + if me_dir != vsr_dir and "VERSIONEER_PEP518" not in globals(): + print("Warning: build in %s is using versioneer.py from %s" + % (os.path.dirname(my_path), versioneer_py)) + except NameError: + pass + return root + + +def get_config_from_root(root: str) -> VersioneerConfig: + """Read the project setup.cfg file to determine Versioneer config.""" + # This might raise OSError (if setup.cfg is missing), or + # configparser.NoSectionError (if it lacks a [versioneer] section), or + # configparser.NoOptionError (if it lacks "VCS="). See the docstring at + # the top of versioneer.py for instructions on writing your setup.cfg . + root_pth = Path(root) + pyproject_toml = root_pth / "pyproject.toml" + setup_cfg = root_pth / "setup.cfg" + section: Union[Dict[str, Any], configparser.SectionProxy, None] = None + if pyproject_toml.exists() and have_tomllib: + try: + with open(pyproject_toml, 'rb') as fobj: + pp = tomllib.load(fobj) + section = pp['tool']['versioneer'] + except (tomllib.TOMLDecodeError, KeyError) as e: + print(f"Failed to load config from {pyproject_toml}: {e}") + print("Try to load it from setup.cfg") + if not section: + parser = configparser.ConfigParser() + with open(setup_cfg) as cfg_file: + parser.read_file(cfg_file) + parser.get("versioneer", "VCS") # raise error if missing + + section = parser["versioneer"] + + # `cast`` really shouldn't be used, but its simplest for the + # common VersioneerConfig users at the moment. We verify against + # `None` values elsewhere where it matters + + cfg = VersioneerConfig() + cfg.VCS = section['VCS'] + cfg.style = section.get("style", "") + cfg.versionfile_source = cast(str, section.get("versionfile_source")) + cfg.versionfile_build = section.get("versionfile_build") + cfg.tag_prefix = cast(str, section.get("tag_prefix")) + if cfg.tag_prefix in ("''", '""', None): + cfg.tag_prefix = "" + cfg.parentdir_prefix = section.get("parentdir_prefix") + if isinstance(section, configparser.SectionProxy): + # Make sure configparser translates to bool + cfg.verbose = section.getboolean("verbose") + else: + cfg.verbose = section.get("verbose") + + return cfg + + +class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + + +# these dictionaries contain VCS-specific tools +LONG_VERSION_PY: Dict[str, str] = {} +HANDLERS: Dict[str, Dict[str, Callable]] = {} + + +def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator + """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f: Callable) -> Callable: + """Store f in HANDLERS[vcs][method].""" + HANDLERS.setdefault(vcs, {})[method] = f + return f + return decorate + + +def run_command( + commands: List[str], + args: List[str], + cwd: Optional[str] = None, + verbose: bool = False, + hide_stderr: bool = False, + env: Optional[Dict[str, str]] = None, +) -> Tuple[Optional[str], Optional[int]]: + """Call the given command(s).""" + assert isinstance(commands, list) + process = None + + popen_kwargs: Dict[str, Any] = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + + for command in commands: + try: + dispcmd = str([command] + args) + # remember shell=False, so use git.cmd on windows, not just git + process = subprocess.Popen([command] + args, cwd=cwd, env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr + else None), **popen_kwargs) + break + except OSError as e: + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %s" % dispcmd) + print(e) + return None, None + else: + if verbose: + print("unable to find command, tried %s" % (commands,)) + return None, None + stdout = process.communicate()[0].strip().decode() + if process.returncode != 0: + if verbose: + print("unable to run %s (error)" % dispcmd) + print("stdout was %s" % stdout) + return None, process.returncode + return stdout, process.returncode + + +LONG_VERSION_PY['git'] = r''' +# This file helps to compute a version number in source trees obtained from +# git-archive tarball (such as those provided by githubs download-from-tag +# feature). Distribution tarballs (built by setup.py sdist) and build +# directories (produced by setup.py build) will contain a much shorter file +# that just contains the computed version number. + +# This file is released into the public domain. +# Generated by versioneer-0.29 +# https://github.com/python-versioneer/python-versioneer + +"""Git implementation of _version.py.""" + +import errno +import os +import re +import subprocess +import sys +from typing import Any, Callable, Dict, List, Optional, Tuple +import functools + + +def get_keywords() -> Dict[str, str]: + """Get the keywords needed to look up the version information.""" + # these strings will be replaced by git during git-archive. + # setup.py/versioneer.py will grep for the variable names, so they must + # each be defined on a line of their own. _version.py will just call + # get_keywords(). + git_refnames = "%(DOLLAR)sFormat:%%d%(DOLLAR)s" + git_full = "%(DOLLAR)sFormat:%%H%(DOLLAR)s" + git_date = "%(DOLLAR)sFormat:%%ci%(DOLLAR)s" + keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} + return keywords + + +class VersioneerConfig: + """Container for Versioneer configuration parameters.""" + + VCS: str + style: str + tag_prefix: str + parentdir_prefix: str + versionfile_source: str + verbose: bool + + +def get_config() -> VersioneerConfig: + """Create, populate and return the VersioneerConfig() object.""" + # these strings are filled in when 'setup.py versioneer' creates + # _version.py + cfg = VersioneerConfig() + cfg.VCS = "git" + cfg.style = "%(STYLE)s" + cfg.tag_prefix = "%(TAG_PREFIX)s" + cfg.parentdir_prefix = "%(PARENTDIR_PREFIX)s" + cfg.versionfile_source = "%(VERSIONFILE_SOURCE)s" + cfg.verbose = False + return cfg + + +class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + + +LONG_VERSION_PY: Dict[str, str] = {} +HANDLERS: Dict[str, Dict[str, Callable]] = {} + + +def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator + """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f: Callable) -> Callable: + """Store f in HANDLERS[vcs][method].""" + if vcs not in HANDLERS: + HANDLERS[vcs] = {} + HANDLERS[vcs][method] = f + return f + return decorate + + +def run_command( + commands: List[str], + args: List[str], + cwd: Optional[str] = None, + verbose: bool = False, + hide_stderr: bool = False, + env: Optional[Dict[str, str]] = None, +) -> Tuple[Optional[str], Optional[int]]: + """Call the given command(s).""" + assert isinstance(commands, list) + process = None + + popen_kwargs: Dict[str, Any] = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + + for command in commands: + try: + dispcmd = str([command] + args) + # remember shell=False, so use git.cmd on windows, not just git + process = subprocess.Popen([command] + args, cwd=cwd, env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr + else None), **popen_kwargs) + break + except OSError as e: + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %%s" %% dispcmd) + print(e) + return None, None + else: + if verbose: + print("unable to find command, tried %%s" %% (commands,)) + return None, None + stdout = process.communicate()[0].strip().decode() + if process.returncode != 0: + if verbose: + print("unable to run %%s (error)" %% dispcmd) + print("stdout was %%s" %% stdout) + return None, process.returncode + return stdout, process.returncode + + +def versions_from_parentdir( + parentdir_prefix: str, + root: str, + verbose: bool, +) -> Dict[str, Any]: + """Try to determine the version from the parent directory name. + + Source tarballs conventionally unpack into a directory that includes both + the project name and a version string. We will also support searching up + two directory levels for an appropriately named parent directory + """ + rootdirs = [] + + for _ in range(3): + dirname = os.path.basename(root) + if dirname.startswith(parentdir_prefix): + return {"version": dirname[len(parentdir_prefix):], + "full-revisionid": None, + "dirty": False, "error": None, "date": None} + rootdirs.append(root) + root = os.path.dirname(root) # up a level + + if verbose: + print("Tried directories %%s but none started with prefix %%s" %% + (str(rootdirs), parentdir_prefix)) + raise NotThisMethod("rootdir doesn't start with parentdir_prefix") + + +@register_vcs_handler("git", "get_keywords") +def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: + """Extract version information from the given file.""" + # the code embedded in _version.py can just fetch the value of these + # keywords. When used from setup.py, we don't want to import _version.py, + # so we do it with a regexp instead. This function is not used from + # _version.py. + keywords: Dict[str, str] = {} + try: + with open(versionfile_abs, "r") as fobj: + for line in fobj: + if line.strip().startswith("git_refnames ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["refnames"] = mo.group(1) + if line.strip().startswith("git_full ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["full"] = mo.group(1) + if line.strip().startswith("git_date ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["date"] = mo.group(1) + except OSError: + pass + return keywords + + +@register_vcs_handler("git", "keywords") +def git_versions_from_keywords( + keywords: Dict[str, str], + tag_prefix: str, + verbose: bool, +) -> Dict[str, Any]: + """Get version information from git keywords.""" + if "refnames" not in keywords: + raise NotThisMethod("Short version file found") + date = keywords.get("date") + if date is not None: + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + + # git-2.2.0 added "%%cI", which expands to an ISO-8601 -compliant + # datestamp. However we prefer "%%ci" (which expands to an "ISO-8601 + # -like" string, which we must then edit to make compliant), because + # it's been around since git-1.5.3, and it's too difficult to + # discover which version we're using, or to work around using an + # older one. + date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") + refs = {r.strip() for r in refnames.strip("()").split(",")} + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " + tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %%d + # expansion behaves like git log --decorate=short and strips out the + # refs/heads/ and refs/tags/ prefixes that would let us distinguish + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". + tags = {r for r in refs if re.search(r'\d', r)} + if verbose: + print("discarding '%%s', no digits" %% ",".join(refs - tags)) + if verbose: + print("likely tags: %%s" %% ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix):] + # Filter out refs that exactly match prefix or that don't start + # with a number once the prefix is stripped (mostly a concern + # when prefix is '') + if not re.match(r'\d', r): + continue + if verbose: + print("picking %%s" %% r) + return {"version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": None, + "date": date} + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return {"version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": "no suitable tags", "date": None} + + +@register_vcs_handler("git", "pieces_from_vcs") +def git_pieces_from_vcs( + tag_prefix: str, + root: str, + verbose: bool, + runner: Callable = run_command +) -> Dict[str, Any]: + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) + + _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, + hide_stderr=not verbose) + if rc != 0: + if verbose: + print("Directory %%s not under git control" %% root) + raise NotThisMethod("'git rev-parse --git-dir' returned error") + + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) + describe_out, rc = runner(GITS, [ + "describe", "--tags", "--dirty", "--always", "--long", + "--match", f"{tag_prefix}[[:digit:]]*" + ], cwd=root) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() + full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() + + pieces: Dict[str, Any] = {} + pieces["long"] = full_out + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + + branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], + cwd=root) + # --abbrev-ref was added in git-1.6.3 + if rc != 0 or branch_name is None: + raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") + branch_name = branch_name.strip() + + if branch_name == "HEAD": + # If we aren't exactly on a branch, pick a branch which represents + # the current commit. If all else fails, we are on a branchless + # commit. + branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) + # --contains was added in git-1.5.4 + if rc != 0 or branches is None: + raise NotThisMethod("'git branch --contains' returned error") + branches = branches.split("\n") + + # Remove the first line if we're running detached + if "(" in branches[0]: + branches.pop(0) + + # Strip off the leading "* " from the list of branches. + branches = [branch[2:] for branch in branches] + if "master" in branches: + branch_name = "master" + elif not branches: + branch_name = None + else: + # Pick the first branch that is returned. Good or bad. + branch_name = branches[0] + + pieces["branch"] = branch_name + + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out + + # look for -dirty suffix + dirty = git_describe.endswith("-dirty") + pieces["dirty"] = dirty + if dirty: + git_describe = git_describe[:git_describe.rindex("-dirty")] + + # now we have TAG-NUM-gHEX or HEX + + if "-" in git_describe: + # TAG-NUM-gHEX + mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + if not mo: + # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = ("unable to parse git-describe output: '%%s'" + %% describe_out) + return pieces + + # tag + full_tag = mo.group(1) + if not full_tag.startswith(tag_prefix): + if verbose: + fmt = "tag '%%s' doesn't start with prefix '%%s'" + print(fmt %% (full_tag, tag_prefix)) + pieces["error"] = ("tag '%%s' doesn't start with prefix '%%s'" + %% (full_tag, tag_prefix)) + return pieces + pieces["closest-tag"] = full_tag[len(tag_prefix):] + + # distance: number of commits since tag + pieces["distance"] = int(mo.group(2)) + + # commit: short hex revision ID + pieces["short"] = mo.group(3) + + else: + # HEX: no tags + pieces["closest-tag"] = None + out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) + pieces["distance"] = len(out.split()) # total number of commits + + # commit date: see ISO-8601 comment in git_versions_from_keywords() + date = runner(GITS, ["show", "-s", "--format=%%ci", "HEAD"], cwd=root)[0].strip() + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + + return pieces + + +def plus_or_dot(pieces: Dict[str, Any]) -> str: + """Return a + if we don't already have one, else return a .""" + if "+" in pieces.get("closest-tag", ""): + return "." + return "+" + + +def render_pep440(pieces: Dict[str, Any]) -> str: + """Build up version string, with post-release "local version identifier". + + Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you + get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty + + Exceptions: + 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += plus_or_dot(pieces) + rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0+untagged.%%d.g%%s" %% (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_branch(pieces: Dict[str, Any]) -> str: + """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . + + The ".dev0" means not master branch. Note that .dev0 sorts backwards + (a feature branch will appear "older" than the master branch). + + Exceptions: + 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0" + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+untagged.%%d.g%%s" %% (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: + """Split pep440 version string at the post-release segment. + + Returns the release segments before the post-release and the + post-release version number (or -1 if no post-release segment is present). + """ + vc = str.split(ver, ".post") + return vc[0], int(vc[1] or 0) if len(vc) == 2 else None + + +def render_pep440_pre(pieces: Dict[str, Any]) -> str: + """TAG[.postN.devDISTANCE] -- No -dirty. + + Exceptions: + 1: no tags. 0.post0.devDISTANCE + """ + if pieces["closest-tag"]: + if pieces["distance"]: + # update the post release segment + tag_version, post_version = pep440_split_post(pieces["closest-tag"]) + rendered = tag_version + if post_version is not None: + rendered += ".post%%d.dev%%d" %% (post_version + 1, pieces["distance"]) + else: + rendered += ".post0.dev%%d" %% (pieces["distance"]) + else: + # no commits, use the tag as the version + rendered = pieces["closest-tag"] + else: + # exception #1 + rendered = "0.post0.dev%%d" %% pieces["distance"] + return rendered + + +def render_pep440_post(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX] . + + The ".dev0" means dirty. Note that .dev0 sorts backwards + (a dirty tree will appear "older" than the corresponding clean one), + but you shouldn't be releasing software with -dirty anyways. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%%s" %% pieces["short"] + else: + # exception #1 + rendered = "0.post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += "+g%%s" %% pieces["short"] + return rendered + + +def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . + + The ".dev0" means not master branch. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%%d" %% pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%%s" %% pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0.post%%d" %% pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+g%%s" %% pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_old(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + else: + # exception #1 + rendered = "0.post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + return rendered + + +def render_git_describe(pieces: Dict[str, Any]) -> str: + """TAG[-DISTANCE-gHEX][-dirty]. + + Like 'git describe --tags --dirty --always'. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"]: + rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render_git_describe_long(pieces: Dict[str, Any]) -> str: + """TAG-DISTANCE-gHEX[-dirty]. + + Like 'git describe --tags --dirty --always -long'. + The distance/hash is unconditional. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: + """Render the given version pieces into the requested style.""" + if pieces["error"]: + return {"version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None} + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) + elif style == "pep440-branch": + rendered = render_pep440_branch(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) + elif style == "pep440-post-branch": + rendered = render_pep440_post_branch(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": + rendered = render_git_describe(pieces) + elif style == "git-describe-long": + rendered = render_git_describe_long(pieces) + else: + raise ValueError("unknown style '%%s'" %% style) + + return {"version": rendered, "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], "error": None, + "date": pieces.get("date")} + + +def get_versions() -> Dict[str, Any]: + """Get version information or return default if unable to do so.""" + # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have + # __file__, we can work backwards from there to the root. Some + # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which + # case we can only use expanded keywords. + + cfg = get_config() + verbose = cfg.verbose + + try: + return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, + verbose) + except NotThisMethod: + pass + + try: + root = os.path.realpath(__file__) + # versionfile_source is the relative path from the top of the source + # tree (where the .git directory might live) to this file. Invert + # this to find the root from __file__. + for _ in cfg.versionfile_source.split('/'): + root = os.path.dirname(root) + except NameError: + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to find root of source tree", + "date": None} + + try: + pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) + return render(pieces, cfg.style) + except NotThisMethod: + pass + + try: + if cfg.parentdir_prefix: + return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) + except NotThisMethod: + pass + + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to compute version", "date": None} +''' + + +@register_vcs_handler("git", "get_keywords") +def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: + """Extract version information from the given file.""" + # the code embedded in _version.py can just fetch the value of these + # keywords. When used from setup.py, we don't want to import _version.py, + # so we do it with a regexp instead. This function is not used from + # _version.py. + keywords: Dict[str, str] = {} + try: + with open(versionfile_abs, "r") as fobj: + for line in fobj: + if line.strip().startswith("git_refnames ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["refnames"] = mo.group(1) + if line.strip().startswith("git_full ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["full"] = mo.group(1) + if line.strip().startswith("git_date ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["date"] = mo.group(1) + except OSError: + pass + return keywords + + +@register_vcs_handler("git", "keywords") +def git_versions_from_keywords( + keywords: Dict[str, str], + tag_prefix: str, + verbose: bool, +) -> Dict[str, Any]: + """Get version information from git keywords.""" + if "refnames" not in keywords: + raise NotThisMethod("Short version file found") + date = keywords.get("date") + if date is not None: + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + + # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant + # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 + # -like" string, which we must then edit to make compliant), because + # it's been around since git-1.5.3, and it's too difficult to + # discover which version we're using, or to work around using an + # older one. + date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") + refs = {r.strip() for r in refnames.strip("()").split(",")} + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " + tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %d + # expansion behaves like git log --decorate=short and strips out the + # refs/heads/ and refs/tags/ prefixes that would let us distinguish + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". + tags = {r for r in refs if re.search(r'\d', r)} + if verbose: + print("discarding '%s', no digits" % ",".join(refs - tags)) + if verbose: + print("likely tags: %s" % ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix):] + # Filter out refs that exactly match prefix or that don't start + # with a number once the prefix is stripped (mostly a concern + # when prefix is '') + if not re.match(r'\d', r): + continue + if verbose: + print("picking %s" % r) + return {"version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": None, + "date": date} + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return {"version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": "no suitable tags", "date": None} + + +@register_vcs_handler("git", "pieces_from_vcs") +def git_pieces_from_vcs( + tag_prefix: str, + root: str, + verbose: bool, + runner: Callable = run_command +) -> Dict[str, Any]: + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) + + _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, + hide_stderr=not verbose) + if rc != 0: + if verbose: + print("Directory %s not under git control" % root) + raise NotThisMethod("'git rev-parse --git-dir' returned error") + + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) + describe_out, rc = runner(GITS, [ + "describe", "--tags", "--dirty", "--always", "--long", + "--match", f"{tag_prefix}[[:digit:]]*" + ], cwd=root) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() + full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() + + pieces: Dict[str, Any] = {} + pieces["long"] = full_out + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + + branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], + cwd=root) + # --abbrev-ref was added in git-1.6.3 + if rc != 0 or branch_name is None: + raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") + branch_name = branch_name.strip() + + if branch_name == "HEAD": + # If we aren't exactly on a branch, pick a branch which represents + # the current commit. If all else fails, we are on a branchless + # commit. + branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) + # --contains was added in git-1.5.4 + if rc != 0 or branches is None: + raise NotThisMethod("'git branch --contains' returned error") + branches = branches.split("\n") + + # Remove the first line if we're running detached + if "(" in branches[0]: + branches.pop(0) + + # Strip off the leading "* " from the list of branches. + branches = [branch[2:] for branch in branches] + if "master" in branches: + branch_name = "master" + elif not branches: + branch_name = None + else: + # Pick the first branch that is returned. Good or bad. + branch_name = branches[0] + + pieces["branch"] = branch_name + + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out + + # look for -dirty suffix + dirty = git_describe.endswith("-dirty") + pieces["dirty"] = dirty + if dirty: + git_describe = git_describe[:git_describe.rindex("-dirty")] + + # now we have TAG-NUM-gHEX or HEX + + if "-" in git_describe: + # TAG-NUM-gHEX + mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + if not mo: + # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = ("unable to parse git-describe output: '%s'" + % describe_out) + return pieces + + # tag + full_tag = mo.group(1) + if not full_tag.startswith(tag_prefix): + if verbose: + fmt = "tag '%s' doesn't start with prefix '%s'" + print(fmt % (full_tag, tag_prefix)) + pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" + % (full_tag, tag_prefix)) + return pieces + pieces["closest-tag"] = full_tag[len(tag_prefix):] + + # distance: number of commits since tag + pieces["distance"] = int(mo.group(2)) + + # commit: short hex revision ID + pieces["short"] = mo.group(3) + + else: + # HEX: no tags + pieces["closest-tag"] = None + out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) + pieces["distance"] = len(out.split()) # total number of commits + + # commit date: see ISO-8601 comment in git_versions_from_keywords() + date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + + return pieces + + +def do_vcs_install(versionfile_source: str, ipy: Optional[str]) -> None: + """Git-specific installation logic for Versioneer. + + For Git, this means creating/changing .gitattributes to mark _version.py + for export-subst keyword substitution. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + files = [versionfile_source] + if ipy: + files.append(ipy) + if "VERSIONEER_PEP518" not in globals(): + try: + my_path = __file__ + if my_path.endswith((".pyc", ".pyo")): + my_path = os.path.splitext(my_path)[0] + ".py" + versioneer_file = os.path.relpath(my_path) + except NameError: + versioneer_file = "versioneer.py" + files.append(versioneer_file) + present = False + try: + with open(".gitattributes", "r") as fobj: + for line in fobj: + if line.strip().startswith(versionfile_source): + if "export-subst" in line.strip().split()[1:]: + present = True + break + except OSError: + pass + if not present: + with open(".gitattributes", "a+") as fobj: + fobj.write(f"{versionfile_source} export-subst\n") + files.append(".gitattributes") + run_command(GITS, ["add", "--"] + files) + + +def versions_from_parentdir( + parentdir_prefix: str, + root: str, + verbose: bool, +) -> Dict[str, Any]: + """Try to determine the version from the parent directory name. + + Source tarballs conventionally unpack into a directory that includes both + the project name and a version string. We will also support searching up + two directory levels for an appropriately named parent directory + """ + rootdirs = [] + + for _ in range(3): + dirname = os.path.basename(root) + if dirname.startswith(parentdir_prefix): + return {"version": dirname[len(parentdir_prefix):], + "full-revisionid": None, + "dirty": False, "error": None, "date": None} + rootdirs.append(root) + root = os.path.dirname(root) # up a level + + if verbose: + print("Tried directories %s but none started with prefix %s" % + (str(rootdirs), parentdir_prefix)) + raise NotThisMethod("rootdir doesn't start with parentdir_prefix") + + +SHORT_VERSION_PY = """ +# This file was generated by 'versioneer.py' (0.29) from +# revision-control system data, or from the parent directory name of an +# unpacked source archive. Distribution tarballs contain a pre-generated copy +# of this file. + +import json + +version_json = ''' +%s +''' # END VERSION_JSON + + +def get_versions(): + return json.loads(version_json) +""" + + +def versions_from_file(filename: str) -> Dict[str, Any]: + """Try to determine the version from _version.py if present.""" + try: + with open(filename) as f: + contents = f.read() + except OSError: + raise NotThisMethod("unable to read _version.py") + mo = re.search(r"version_json = '''\n(.*)''' # END VERSION_JSON", + contents, re.M | re.S) + if not mo: + mo = re.search(r"version_json = '''\r\n(.*)''' # END VERSION_JSON", + contents, re.M | re.S) + if not mo: + raise NotThisMethod("no version_json in _version.py") + return json.loads(mo.group(1)) + + +def write_to_version_file(filename: str, versions: Dict[str, Any]) -> None: + """Write the given version number to the given _version.py file.""" + contents = json.dumps(versions, sort_keys=True, + indent=1, separators=(",", ": ")) + with open(filename, "w") as f: + f.write(SHORT_VERSION_PY % contents) + + print("set %s to '%s'" % (filename, versions["version"])) + + +def plus_or_dot(pieces: Dict[str, Any]) -> str: + """Return a + if we don't already have one, else return a .""" + if "+" in pieces.get("closest-tag", ""): + return "." + return "+" + + +def render_pep440(pieces: Dict[str, Any]) -> str: + """Build up version string, with post-release "local version identifier". + + Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you + get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty + + Exceptions: + 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_branch(pieces: Dict[str, Any]) -> str: + """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . + + The ".dev0" means not master branch. Note that .dev0 sorts backwards + (a feature branch will appear "older" than the master branch). + + Exceptions: + 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0" + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: + """Split pep440 version string at the post-release segment. + + Returns the release segments before the post-release and the + post-release version number (or -1 if no post-release segment is present). + """ + vc = str.split(ver, ".post") + return vc[0], int(vc[1] or 0) if len(vc) == 2 else None + + +def render_pep440_pre(pieces: Dict[str, Any]) -> str: + """TAG[.postN.devDISTANCE] -- No -dirty. + + Exceptions: + 1: no tags. 0.post0.devDISTANCE + """ + if pieces["closest-tag"]: + if pieces["distance"]: + # update the post release segment + tag_version, post_version = pep440_split_post(pieces["closest-tag"]) + rendered = tag_version + if post_version is not None: + rendered += ".post%d.dev%d" % (post_version + 1, pieces["distance"]) + else: + rendered += ".post0.dev%d" % (pieces["distance"]) + else: + # no commits, use the tag as the version + rendered = pieces["closest-tag"] + else: + # exception #1 + rendered = "0.post0.dev%d" % pieces["distance"] + return rendered + + +def render_pep440_post(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX] . + + The ".dev0" means dirty. Note that .dev0 sorts backwards + (a dirty tree will appear "older" than the corresponding clean one), + but you shouldn't be releasing software with -dirty anyways. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + return rendered + + +def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . + + The ".dev0" means not master branch. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_old(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + return rendered + + +def render_git_describe(pieces: Dict[str, Any]) -> str: + """TAG[-DISTANCE-gHEX][-dirty]. + + Like 'git describe --tags --dirty --always'. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"]: + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render_git_describe_long(pieces: Dict[str, Any]) -> str: + """TAG-DISTANCE-gHEX[-dirty]. + + Like 'git describe --tags --dirty --always -long'. + The distance/hash is unconditional. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: + """Render the given version pieces into the requested style.""" + if pieces["error"]: + return {"version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None} + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) + elif style == "pep440-branch": + rendered = render_pep440_branch(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) + elif style == "pep440-post-branch": + rendered = render_pep440_post_branch(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": + rendered = render_git_describe(pieces) + elif style == "git-describe-long": + rendered = render_git_describe_long(pieces) + else: + raise ValueError("unknown style '%s'" % style) + + return {"version": rendered, "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], "error": None, + "date": pieces.get("date")} + + +class VersioneerBadRootError(Exception): + """The project root directory is unknown or missing key files.""" + + +def get_versions(verbose: bool = False) -> Dict[str, Any]: + """Get the project version from whatever source is available. + + Returns dict with two keys: 'version' and 'full'. + """ + if "versioneer" in sys.modules: + # see the discussion in cmdclass.py:get_cmdclass() + del sys.modules["versioneer"] + + root = get_root() + cfg = get_config_from_root(root) + + assert cfg.VCS is not None, "please set [versioneer]VCS= in setup.cfg" + handlers = HANDLERS.get(cfg.VCS) + assert handlers, "unrecognized VCS '%s'" % cfg.VCS + verbose = verbose or bool(cfg.verbose) # `bool()` used to avoid `None` + assert cfg.versionfile_source is not None, \ + "please set versioneer.versionfile_source" + assert cfg.tag_prefix is not None, "please set versioneer.tag_prefix" + + versionfile_abs = os.path.join(root, cfg.versionfile_source) + + # extract version from first of: _version.py, VCS command (e.g. 'git + # describe'), parentdir. This is meant to work for developers using a + # source checkout, for users of a tarball created by 'setup.py sdist', + # and for users of a tarball/zipball created by 'git archive' or github's + # download-from-tag feature or the equivalent in other VCSes. + + get_keywords_f = handlers.get("get_keywords") + from_keywords_f = handlers.get("keywords") + if get_keywords_f and from_keywords_f: + try: + keywords = get_keywords_f(versionfile_abs) + ver = from_keywords_f(keywords, cfg.tag_prefix, verbose) + if verbose: + print("got version from expanded keyword %s" % ver) + return ver + except NotThisMethod: + pass + + try: + ver = versions_from_file(versionfile_abs) + if verbose: + print("got version from file %s %s" % (versionfile_abs, ver)) + return ver + except NotThisMethod: + pass + + from_vcs_f = handlers.get("pieces_from_vcs") + if from_vcs_f: + try: + pieces = from_vcs_f(cfg.tag_prefix, root, verbose) + ver = render(pieces, cfg.style) + if verbose: + print("got version from VCS %s" % ver) + return ver + except NotThisMethod: + pass + + try: + if cfg.parentdir_prefix: + ver = versions_from_parentdir(cfg.parentdir_prefix, root, verbose) + if verbose: + print("got version from parentdir %s" % ver) + return ver + except NotThisMethod: + pass + + if verbose: + print("unable to compute version") + + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, "error": "unable to compute version", + "date": None} + + +def get_version() -> str: + """Get the short version string for this project.""" + return get_versions()["version"] + + +def get_cmdclass(cmdclass: Optional[Dict[str, Any]] = None): + """Get the custom setuptools subclasses used by Versioneer. + + If the package uses a different cmdclass (e.g. one from numpy), it + should be provide as an argument. + """ + if "versioneer" in sys.modules: + del sys.modules["versioneer"] + # this fixes the "python setup.py develop" case (also 'install' and + # 'easy_install .'), in which subdependencies of the main project are + # built (using setup.py bdist_egg) in the same python process. Assume + # a main project A and a dependency B, which use different versions + # of Versioneer. A's setup.py imports A's Versioneer, leaving it in + # sys.modules by the time B's setup.py is executed, causing B to run + # with the wrong versioneer. Setuptools wraps the sub-dep builds in a + # sandbox that restores sys.modules to it's pre-build state, so the + # parent is protected against the child's "import versioneer". By + # removing ourselves from sys.modules here, before the child build + # happens, we protect the child from the parent's versioneer too. + # Also see https://github.com/python-versioneer/python-versioneer/issues/52 + + cmds = {} if cmdclass is None else cmdclass.copy() + + # we add "version" to setuptools + from setuptools import Command + + class cmd_version(Command): + description = "report generated version string" + user_options: List[Tuple[str, str, str]] = [] + boolean_options: List[str] = [] + + def initialize_options(self) -> None: + pass + + def finalize_options(self) -> None: + pass + + def run(self) -> None: + vers = get_versions(verbose=True) + print("Version: %s" % vers["version"]) + print(" full-revisionid: %s" % vers.get("full-revisionid")) + print(" dirty: %s" % vers.get("dirty")) + print(" date: %s" % vers.get("date")) + if vers["error"]: + print(" error: %s" % vers["error"]) + cmds["version"] = cmd_version + + # we override "build_py" in setuptools + # + # most invocation pathways end up running build_py: + # distutils/build -> build_py + # distutils/install -> distutils/build ->.. + # setuptools/bdist_wheel -> distutils/install ->.. + # setuptools/bdist_egg -> distutils/install_lib -> build_py + # setuptools/install -> bdist_egg ->.. + # setuptools/develop -> ? + # pip install: + # copies source tree to a tempdir before running egg_info/etc + # if .git isn't copied too, 'git describe' will fail + # then does setup.py bdist_wheel, or sometimes setup.py install + # setup.py egg_info -> ? + + # pip install -e . and setuptool/editable_wheel will invoke build_py + # but the build_py command is not expected to copy any files. + + # we override different "build_py" commands for both environments + if 'build_py' in cmds: + _build_py: Any = cmds['build_py'] + else: + from setuptools.command.build_py import build_py as _build_py + + class cmd_build_py(_build_py): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + _build_py.run(self) + if getattr(self, "editable_mode", False): + # During editable installs `.py` and data files are + # not copied to build_lib + return + # now locate _version.py in the new build/ directory and replace + # it with an updated value + if cfg.versionfile_build: + target_versionfile = os.path.join(self.build_lib, + cfg.versionfile_build) + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + cmds["build_py"] = cmd_build_py + + if 'build_ext' in cmds: + _build_ext: Any = cmds['build_ext'] + else: + from setuptools.command.build_ext import build_ext as _build_ext + + class cmd_build_ext(_build_ext): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + _build_ext.run(self) + if self.inplace: + # build_ext --inplace will only build extensions in + # build/lib<..> dir with no _version.py to write to. + # As in place builds will already have a _version.py + # in the module dir, we do not need to write one. + return + # now locate _version.py in the new build/ directory and replace + # it with an updated value + if not cfg.versionfile_build: + return + target_versionfile = os.path.join(self.build_lib, + cfg.versionfile_build) + if not os.path.exists(target_versionfile): + print(f"Warning: {target_versionfile} does not exist, skipping " + "version update. This can happen if you are running build_ext " + "without first running build_py.") + return + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + cmds["build_ext"] = cmd_build_ext + + if "cx_Freeze" in sys.modules: # cx_freeze enabled? + from cx_Freeze.dist import build_exe as _build_exe # type: ignore + # nczeczulin reports that py2exe won't like the pep440-style string + # as FILEVERSION, but it can be used for PRODUCTVERSION, e.g. + # setup(console=[{ + # "version": versioneer.get_version().split("+", 1)[0], # FILEVERSION + # "product_version": versioneer.get_version(), + # ... + + class cmd_build_exe(_build_exe): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + target_versionfile = cfg.versionfile_source + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + + _build_exe.run(self) + os.unlink(target_versionfile) + with open(cfg.versionfile_source, "w") as f: + LONG = LONG_VERSION_PY[cfg.VCS] + f.write(LONG % + {"DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + }) + cmds["build_exe"] = cmd_build_exe + del cmds["build_py"] + + if 'py2exe' in sys.modules: # py2exe enabled? + try: + from py2exe.setuptools_buildexe import py2exe as _py2exe # type: ignore + except ImportError: + from py2exe.distutils_buildexe import py2exe as _py2exe # type: ignore + + class cmd_py2exe(_py2exe): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + target_versionfile = cfg.versionfile_source + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + + _py2exe.run(self) + os.unlink(target_versionfile) + with open(cfg.versionfile_source, "w") as f: + LONG = LONG_VERSION_PY[cfg.VCS] + f.write(LONG % + {"DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + }) + cmds["py2exe"] = cmd_py2exe + + # sdist farms its file list building out to egg_info + if 'egg_info' in cmds: + _egg_info: Any = cmds['egg_info'] + else: + from setuptools.command.egg_info import egg_info as _egg_info + + class cmd_egg_info(_egg_info): + def find_sources(self) -> None: + # egg_info.find_sources builds the manifest list and writes it + # in one shot + super().find_sources() + + # Modify the filelist and normalize it + root = get_root() + cfg = get_config_from_root(root) + self.filelist.append('versioneer.py') + if cfg.versionfile_source: + # There are rare cases where versionfile_source might not be + # included by default, so we must be explicit + self.filelist.append(cfg.versionfile_source) + self.filelist.sort() + self.filelist.remove_duplicates() + + # The write method is hidden in the manifest_maker instance that + # generated the filelist and was thrown away + # We will instead replicate their final normalization (to unicode, + # and POSIX-style paths) + from setuptools import unicode_utils + normalized = [unicode_utils.filesys_decode(f).replace(os.sep, '/') + for f in self.filelist.files] + + manifest_filename = os.path.join(self.egg_info, 'SOURCES.txt') + with open(manifest_filename, 'w') as fobj: + fobj.write('\n'.join(normalized)) + + cmds['egg_info'] = cmd_egg_info + + # we override different "sdist" commands for both environments + if 'sdist' in cmds: + _sdist: Any = cmds['sdist'] + else: + from setuptools.command.sdist import sdist as _sdist + + class cmd_sdist(_sdist): + def run(self) -> None: + versions = get_versions() + self._versioneer_generated_versions = versions + # unless we update this, the command will keep using the old + # version + self.distribution.metadata.version = versions["version"] + return _sdist.run(self) + + def make_release_tree(self, base_dir: str, files: List[str]) -> None: + root = get_root() + cfg = get_config_from_root(root) + _sdist.make_release_tree(self, base_dir, files) + # now locate _version.py in the new base_dir directory + # (remembering that it may be a hardlink) and replace it with an + # updated value + target_versionfile = os.path.join(base_dir, cfg.versionfile_source) + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, + self._versioneer_generated_versions) + cmds["sdist"] = cmd_sdist + + return cmds + + +CONFIG_ERROR = """ +setup.cfg is missing the necessary Versioneer configuration. You need +a section like: + + [versioneer] + VCS = git + style = pep440 + versionfile_source = src/myproject/_version.py + versionfile_build = myproject/_version.py + tag_prefix = + parentdir_prefix = myproject- + +You will also need to edit your setup.py to use the results: + + import versioneer + setup(version=versioneer.get_version(), + cmdclass=versioneer.get_cmdclass(), ...) + +Please read the docstring in ./versioneer.py for configuration instructions, +edit setup.cfg, and re-run the installer or 'python versioneer.py setup'. +""" + +SAMPLE_CONFIG = """ +# See the docstring in versioneer.py for instructions. Note that you must +# re-run 'versioneer.py setup' after changing this section, and commit the +# resulting files. + +[versioneer] +#VCS = git +#style = pep440 +#versionfile_source = +#versionfile_build = +#tag_prefix = +#parentdir_prefix = + +""" + +OLD_SNIPPET = """ +from ._version import get_versions +__version__ = get_versions()['version'] +del get_versions +""" + +INIT_PY_SNIPPET = """ +from . import {0} +__version__ = {0}.get_versions()['version'] +""" + + +def do_setup() -> int: + """Do main VCS-independent setup function for installing Versioneer.""" + root = get_root() + try: + cfg = get_config_from_root(root) + except (OSError, configparser.NoSectionError, + configparser.NoOptionError) as e: + if isinstance(e, (OSError, configparser.NoSectionError)): + print("Adding sample versioneer config to setup.cfg", + file=sys.stderr) + with open(os.path.join(root, "setup.cfg"), "a") as f: + f.write(SAMPLE_CONFIG) + print(CONFIG_ERROR, file=sys.stderr) + return 1 + + print(" creating %s" % cfg.versionfile_source) + with open(cfg.versionfile_source, "w") as f: + LONG = LONG_VERSION_PY[cfg.VCS] + f.write(LONG % {"DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + }) + + ipy = os.path.join(os.path.dirname(cfg.versionfile_source), + "__init__.py") + maybe_ipy: Optional[str] = ipy + if os.path.exists(ipy): + try: + with open(ipy, "r") as f: + old = f.read() + except OSError: + old = "" + module = os.path.splitext(os.path.basename(cfg.versionfile_source))[0] + snippet = INIT_PY_SNIPPET.format(module) + if OLD_SNIPPET in old: + print(" replacing boilerplate in %s" % ipy) + with open(ipy, "w") as f: + f.write(old.replace(OLD_SNIPPET, snippet)) + elif snippet not in old: + print(" appending to %s" % ipy) + with open(ipy, "a") as f: + f.write(snippet) + else: + print(" %s unmodified" % ipy) + else: + print(" %s doesn't exist, ok" % ipy) + maybe_ipy = None + + # Make VCS-specific changes. For git, this means creating/changing + # .gitattributes to mark _version.py for export-subst keyword + # substitution. + do_vcs_install(cfg.versionfile_source, maybe_ipy) + return 0 + + +def scan_setup_py() -> int: + """Validate the contents of setup.py against Versioneer's expectations.""" + found = set() + setters = False + errors = 0 + with open("setup.py", "r") as f: + for line in f.readlines(): + if "import versioneer" in line: + found.add("import") + if "versioneer.get_cmdclass()" in line: + found.add("cmdclass") + if "versioneer.get_version()" in line: + found.add("get_version") + if "versioneer.VCS" in line: + setters = True + if "versioneer.versionfile_source" in line: + setters = True + if len(found) != 3: + print("") + print("Your setup.py appears to be missing some important items") + print("(but I might be wrong). Please make sure it has something") + print("roughly like the following:") + print("") + print(" import versioneer") + print(" setup( version=versioneer.get_version(),") + print(" cmdclass=versioneer.get_cmdclass(), ...)") + print("") + errors += 1 + if setters: + print("You should remove lines like 'versioneer.VCS = ' and") + print("'versioneer.versionfile_source = ' . This configuration") + print("now lives in setup.cfg, and should be removed from setup.py") + print("") + errors += 1 + return errors + + +def setup_command() -> NoReturn: + """Set up Versioneer and exit with appropriate error code.""" + errors = do_setup() + errors += scan_setup_py() + sys.exit(1 if errors else 0) + + +if __name__ == "__main__": + cmd = sys.argv[1] + if cmd == "setup": + setup_command() diff --git a/sdk/python/sdk/zrok/zrok/__init__.py b/sdk/python/sdk/zrok/zrok/__init__.py new file mode 100644 index 00000000..3ae70bb1 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/__init__.py @@ -0,0 +1,4 @@ +from . import environment # noqa +from . import access, decor, model, share, overview # noqa +from . import _version +__version__ = _version.get_versions()['version'] diff --git a/sdk/python/sdk/zrok/zrok/_version.py b/sdk/python/sdk/zrok/zrok/_version.py new file mode 100644 index 00000000..b5a79645 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/_version.py @@ -0,0 +1,683 @@ + +# This file helps to compute a version number in source trees obtained from +# git-archive tarball (such as those provided by githubs download-from-tag +# feature). Distribution tarballs (built by setup.py sdist) and build +# directories (produced by setup.py build) will contain a much shorter file +# that just contains the computed version number. + +# This file is released into the public domain. +# Generated by versioneer-0.29 +# https://github.com/python-versioneer/python-versioneer + +"""Git implementation of _version.py.""" + +import errno +import os +import re +import subprocess +import sys +from typing import Any, Callable, Dict, List, Optional, Tuple +import functools + + +def get_keywords() -> Dict[str, str]: + """Get the keywords needed to look up the version information.""" + # these strings will be replaced by git during git-archive. + # setup.py/versioneer.py will grep for the variable names, so they must + # each be defined on a line of their own. _version.py will just call + # get_keywords(). + git_refnames = "$Format:%d$" + git_full = "$Format:%H$" + git_date = "$Format:%ci$" + keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} + return keywords + + +class VersioneerConfig: + """Container for Versioneer configuration parameters.""" + + VCS: str + style: str + tag_prefix: str + parentdir_prefix: str + versionfile_source: str + verbose: bool + + +def get_config() -> VersioneerConfig: + """Create, populate and return the VersioneerConfig() object.""" + # these strings are filled in when 'setup.py versioneer' creates + # _version.py + cfg = VersioneerConfig() + cfg.VCS = "git" + cfg.style = "pep440-pre" + cfg.tag_prefix = "v" + cfg.parentdir_prefix = "zrok-" + cfg.versionfile_source = "zrok/_version.py" + cfg.verbose = False + return cfg + + +class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + + +LONG_VERSION_PY: Dict[str, str] = {} +HANDLERS: Dict[str, Dict[str, Callable]] = {} + + +def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator + """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f: Callable) -> Callable: + """Store f in HANDLERS[vcs][method].""" + if vcs not in HANDLERS: + HANDLERS[vcs] = {} + HANDLERS[vcs][method] = f + return f + return decorate + + +def run_command( + commands: List[str], + args: List[str], + cwd: Optional[str] = None, + verbose: bool = False, + hide_stderr: bool = False, + env: Optional[Dict[str, str]] = None, +) -> Tuple[Optional[str], Optional[int]]: + """Call the given command(s).""" + assert isinstance(commands, list) + process = None + + popen_kwargs: Dict[str, Any] = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + + for command in commands: + try: + dispcmd = str([command] + args) + # remember shell=False, so use git.cmd on windows, not just git + process = subprocess.Popen([command] + args, cwd=cwd, env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr + else None), **popen_kwargs) + break + except OSError as e: + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %s" % dispcmd) + print(e) + return None, None + else: + if verbose: + print("unable to find command, tried %s" % (commands,)) + return None, None + stdout = process.communicate()[0].strip().decode() + if process.returncode != 0: + if verbose: + print("unable to run %s (error)" % dispcmd) + print("stdout was %s" % stdout) + return None, process.returncode + return stdout, process.returncode + + +def versions_from_parentdir( + parentdir_prefix: str, + root: str, + verbose: bool, +) -> Dict[str, Any]: + """Try to determine the version from the parent directory name. + + Source tarballs conventionally unpack into a directory that includes both + the project name and a version string. We will also support searching up + two directory levels for an appropriately named parent directory + """ + rootdirs = [] + + for _ in range(3): + dirname = os.path.basename(root) + if dirname.startswith(parentdir_prefix): + return {"version": dirname[len(parentdir_prefix):], + "full-revisionid": None, + "dirty": False, "error": None, "date": None} + rootdirs.append(root) + root = os.path.dirname(root) # up a level + + if verbose: + print("Tried directories %s but none started with prefix %s" % + (str(rootdirs), parentdir_prefix)) + raise NotThisMethod("rootdir doesn't start with parentdir_prefix") + + +@register_vcs_handler("git", "get_keywords") +def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: + """Extract version information from the given file.""" + # the code embedded in _version.py can just fetch the value of these + # keywords. When used from setup.py, we don't want to import _version.py, + # so we do it with a regexp instead. This function is not used from + # _version.py. + keywords: Dict[str, str] = {} + try: + with open(versionfile_abs, "r") as fobj: + for line in fobj: + if line.strip().startswith("git_refnames ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["refnames"] = mo.group(1) + if line.strip().startswith("git_full ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["full"] = mo.group(1) + if line.strip().startswith("git_date ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["date"] = mo.group(1) + except OSError: + pass + return keywords + + +@register_vcs_handler("git", "keywords") +def git_versions_from_keywords( + keywords: Dict[str, str], + tag_prefix: str, + verbose: bool, +) -> Dict[str, Any]: + """Get version information from git keywords.""" + if "refnames" not in keywords: + raise NotThisMethod("Short version file found") + date = keywords.get("date") + if date is not None: + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + + # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant + # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 + # -like" string, which we must then edit to make compliant), because + # it's been around since git-1.5.3, and it's too difficult to + # discover which version we're using, or to work around using an + # older one. + date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") + refs = {r.strip() for r in refnames.strip("()").split(",")} + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " + tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %d + # expansion behaves like git log --decorate=short and strips out the + # refs/heads/ and refs/tags/ prefixes that would let us distinguish + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". + tags = {r for r in refs if re.search(r'\d', r)} + if verbose: + print("discarding '%s', no digits" % ",".join(refs - tags)) + if verbose: + print("likely tags: %s" % ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix):] + # Filter out refs that exactly match prefix or that don't start + # with a number once the prefix is stripped (mostly a concern + # when prefix is '') + if not re.match(r'\d', r): + continue + if verbose: + print("picking %s" % r) + return {"version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": None, + "date": date} + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return {"version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": "no suitable tags", "date": None} + + +@register_vcs_handler("git", "pieces_from_vcs") +def git_pieces_from_vcs( + tag_prefix: str, + root: str, + verbose: bool, + runner: Callable = run_command +) -> Dict[str, Any]: + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) + + _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, + hide_stderr=not verbose) + if rc != 0: + if verbose: + print("Directory %s not under git control" % root) + raise NotThisMethod("'git rev-parse --git-dir' returned error") + + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) + describe_out, rc = runner(GITS, [ + "describe", "--tags", "--dirty", "--always", "--long", + "--match", f"{tag_prefix}[[:digit:]]*" + ], cwd=root) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() + full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() + + pieces: Dict[str, Any] = {} + pieces["long"] = full_out + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + + branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], + cwd=root) + # --abbrev-ref was added in git-1.6.3 + if rc != 0 or branch_name is None: + raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") + branch_name = branch_name.strip() + + if branch_name == "HEAD": + # If we aren't exactly on a branch, pick a branch which represents + # the current commit. If all else fails, we are on a branchless + # commit. + branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) + # --contains was added in git-1.5.4 + if rc != 0 or branches is None: + raise NotThisMethod("'git branch --contains' returned error") + branches = branches.split("\n") + + # Remove the first line if we're running detached + if "(" in branches[0]: + branches.pop(0) + + # Strip off the leading "* " from the list of branches. + branches = [branch[2:] for branch in branches] + if "master" in branches: + branch_name = "master" + elif not branches: + branch_name = None + else: + # Pick the first branch that is returned. Good or bad. + branch_name = branches[0] + + pieces["branch"] = branch_name + + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out + + # look for -dirty suffix + dirty = git_describe.endswith("-dirty") + pieces["dirty"] = dirty + if dirty: + git_describe = git_describe[:git_describe.rindex("-dirty")] + + # now we have TAG-NUM-gHEX or HEX + + if "-" in git_describe: + # TAG-NUM-gHEX + mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + if not mo: + # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = ("unable to parse git-describe output: '%s'" + % describe_out) + return pieces + + # tag + full_tag = mo.group(1) + if not full_tag.startswith(tag_prefix): + if verbose: + fmt = "tag '%s' doesn't start with prefix '%s'" + print(fmt % (full_tag, tag_prefix)) + pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" + % (full_tag, tag_prefix)) + return pieces + pieces["closest-tag"] = full_tag[len(tag_prefix):] + + # distance: number of commits since tag + pieces["distance"] = int(mo.group(2)) + + # commit: short hex revision ID + pieces["short"] = mo.group(3) + + else: + # HEX: no tags + pieces["closest-tag"] = None + out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) + pieces["distance"] = len(out.split()) # total number of commits + + # commit date: see ISO-8601 comment in git_versions_from_keywords() + date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + + return pieces + + +def plus_or_dot(pieces: Dict[str, Any]) -> str: + """Return a + if we don't already have one, else return a .""" + if "+" in pieces.get("closest-tag", ""): + return "." + return "+" + + +def render_pep440(pieces: Dict[str, Any]) -> str: + """Build up version string, with post-release "local version identifier". + + Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you + get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty + + Exceptions: + 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_branch(pieces: Dict[str, Any]) -> str: + """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . + + The ".dev0" means not master branch. Note that .dev0 sorts backwards + (a feature branch will appear "older" than the master branch). + + Exceptions: + 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0" + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: + """Split pep440 version string at the post-release segment. + + Returns the release segments before the post-release and the + post-release version number (or -1 if no post-release segment is present). + """ + vc = str.split(ver, ".post") + return vc[0], int(vc[1] or 0) if len(vc) == 2 else None + + +def render_pep440_pre(pieces: Dict[str, Any]) -> str: + """TAG[.postN.devDISTANCE] -- No -dirty. + + Exceptions: + 1: no tags. 0.post0.devDISTANCE + """ + if pieces["closest-tag"]: + if pieces["distance"]: + # update the post release segment + tag_version, post_version = pep440_split_post(pieces["closest-tag"]) + rendered = tag_version + if post_version is not None: + rendered += ".post%d.dev%d" % (post_version + 1, pieces["distance"]) + else: + rendered += ".post0.dev%d" % (pieces["distance"]) + else: + # no commits, use the tag as the version + rendered = pieces["closest-tag"] + else: + # exception #1 + rendered = "0.post0.dev%d" % pieces["distance"] + return rendered + + +def render_pep440_post(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX] . + + The ".dev0" means dirty. Note that .dev0 sorts backwards + (a dirty tree will appear "older" than the corresponding clean one), + but you shouldn't be releasing software with -dirty anyways. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + return rendered + + +def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . + + The ".dev0" means not master branch. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_old(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + return rendered + + +def render_git_describe(pieces: Dict[str, Any]) -> str: + """TAG[-DISTANCE-gHEX][-dirty]. + + Like 'git describe --tags --dirty --always'. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"]: + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render_git_describe_long(pieces: Dict[str, Any]) -> str: + """TAG-DISTANCE-gHEX[-dirty]. + + Like 'git describe --tags --dirty --always -long'. + The distance/hash is unconditional. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: + """Render the given version pieces into the requested style.""" + if pieces["error"]: + return {"version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None} + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) + elif style == "pep440-branch": + rendered = render_pep440_branch(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) + elif style == "pep440-post-branch": + rendered = render_pep440_post_branch(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": + rendered = render_git_describe(pieces) + elif style == "git-describe-long": + rendered = render_git_describe_long(pieces) + else: + raise ValueError("unknown style '%s'" % style) + + return {"version": rendered, "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], "error": None, + "date": pieces.get("date")} + + +def get_versions() -> Dict[str, Any]: + """Get version information or return default if unable to do so.""" + # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have + # __file__, we can work backwards from there to the root. Some + # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which + # case we can only use expanded keywords. + + cfg = get_config() + verbose = cfg.verbose + + try: + return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, + verbose) + except NotThisMethod: + pass + + try: + root = os.path.realpath(__file__) + # versionfile_source is the relative path from the top of the source + # tree (where the .git directory might live) to this file. Invert + # this to find the root from __file__. + for _ in cfg.versionfile_source.split('/'): + root = os.path.dirname(root) + except NameError: + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to find root of source tree", + "date": None} + + try: + pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) + return render(pieces, cfg.style) + except NotThisMethod: + pass + + try: + if cfg.parentdir_prefix: + return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) + except NotThisMethod: + pass + + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to compute version", "date": None} diff --git a/sdk/python/sdk/zrok/zrok/access.py b/sdk/python/sdk/zrok/zrok/access.py new file mode 100644 index 00000000..dc3a1dfd --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/access.py @@ -0,0 +1,57 @@ +from zrok.environment.root import Root +from zrok_api.models import AccessRequest, UnaccessRequest +from zrok_api.api import ShareApi +from zrok import model + + +class Access(): + root: Root + request: model.AccessRequest + access: model.Access + + def __init__(self, root: Root, request: model.AccessRequest): + self.root = root + self.request = request + + def __enter__(self) -> model.Access: + self.access = CreateAccess(root=self.root, request=self.request) + return self.access + + def __exit__(self, exception_type, exception_value, exception_traceback): + DeleteAccess(root=self.root, acc=self.access) + + +def CreateAccess(root: Root, request: model.AccessRequest) -> model.Access: + if not root.IsEnabled(): + raise Exception("environment is not enabled; enable with 'zrok enable' first!") + + out = AccessRequest(shr_token=request.ShareToken, + env_zid=root.env.ZitiIdentity) + + try: + zrok = root.Client() + except Exception as e: + raise Exception("error getting zrok client", e) + try: + res = ShareApi(zrok).access(body=out) + except Exception as e: + raise Exception("unable to create access", e) + return model.Access(Token=res.frontend_token, + ShareToken=request.ShareToken, + BackendMode=res.backend_mode) + + +def DeleteAccess(root: Root, acc: model.Access): + req = UnaccessRequest(frontend_token=acc.Token, + shr_token=acc.ShareToken, + env_zid=root.env.ZitiIdentity) + + try: + zrok = root.Client() + except Exception as e: + raise Exception("error getting zrok client", e) + + try: + ShareApi(zrok).unaccess(body=req) + except Exception as e: + raise Exception("error deleting access", e) diff --git a/sdk/python/sdk/zrok/zrok/decor.py b/sdk/python/sdk/zrok/zrok/decor.py new file mode 100644 index 00000000..afaca880 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/decor.py @@ -0,0 +1,33 @@ +from dataclasses import dataclass +import openziti +from zrok.environment.root import Root + + +@dataclass +class Opts: + root: Root + shrToken: str + bindPort: int + bindHost: str = "" + + +class MonkeyPatch(openziti.monkeypatch): + def __init__(self, opts: {}, *args, **kwargs): + zif = opts['cfg'].root.ZitiIdentityNamed(opts['cfg'].root.EnvironmentIdentityName()) + cfg = dict(ztx=openziti.load(zif), service=opts['cfg'].shrToken) + super(MonkeyPatch, self).__init__(bindings={(opts['cfg'].bindHost, opts['cfg'].bindPort): cfg}, *args, **kwargs) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + super(MonkeyPatch, self).__exit__(exc_type, exc_val, exc_tb) + + +def zrok(opts: {}, *zargs, **zkwargs): + def zrockify_func(func): + def zrockified(*args, **kwargs): + with MonkeyPatch(opts=opts, *zargs, **zkwargs): + func(*args, **kwargs) + return zrockified + return zrockify_func diff --git a/sdk/python/sdk/zrok/zrok/dialer.py b/sdk/python/sdk/zrok/zrok/dialer.py new file mode 100644 index 00000000..adf3c632 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/dialer.py @@ -0,0 +1,10 @@ +from zrok.environment.root import Root +import openziti +from socket import SOCK_STREAM + + +def Dialer(shrToken: str, root: Root) -> openziti.zitisock.ZitiSocket: + openziti.load(root.ZitiIdentityNamed(root.EnvironmentIdentityName())) + client = openziti.socket(type=SOCK_STREAM) + client.connect((shrToken, 1)) + return client diff --git a/sdk/python/sdk/zrok/zrok/environment/__init__.py b/sdk/python/sdk/zrok/zrok/environment/__init__.py new file mode 100644 index 00000000..c8f5e5a1 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/environment/__init__.py @@ -0,0 +1 @@ +from . import dirs, root # noqa diff --git a/sdk/python/sdk/zrok/zrok/environment/dirs.py b/sdk/python/sdk/zrok/zrok/environment/dirs.py new file mode 100644 index 00000000..4b53d292 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/environment/dirs.py @@ -0,0 +1,32 @@ +from pathlib import Path +import os + + +def rootDir() -> str: + home = str(Path.home()) + return os.path.join(home, ".zrok") + + +def metadataFile() -> str: + zrd = rootDir() + return os.path.join(zrd, "metadata.json") + + +def configFile() -> str: + zrd = rootDir() + return os.path.join(zrd, "config.json") + + +def environmentFile() -> str: + zrd = rootDir() + return os.path.join(zrd, "environment.json") + + +def identitiesDir() -> str: + zrd = rootDir() + return os.path.join(zrd, "identities") + + +def identityFile(name: str) -> str: + idd = identitiesDir() + return os.path.join(idd, name + ".json") diff --git a/sdk/python/sdk/zrok/zrok/environment/root.py b/sdk/python/sdk/zrok/zrok/environment/root.py index 94c176d6..ad7ae6ef 100644 --- a/sdk/python/sdk/zrok/zrok/environment/root.py +++ b/sdk/python/sdk/zrok/zrok/environment/root.py @@ -61,7 +61,7 @@ class Root: return zrock_client def ApiEndpoint(self) -> ApiEndpoint: - apiEndpoint = "https://api-v1.zrok.io" + apiEndpoint = "https://api.zrok.io" frm = "binary" if self.cfg.ApiEndpoint != "": diff --git a/sdk/python/sdk/zrok/zrok/listener.py b/sdk/python/sdk/zrok/zrok/listener.py new file mode 100644 index 00000000..5f85f58d --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/listener.py @@ -0,0 +1,29 @@ +import openziti +from zrok.environment.root import Root + + +class Listener(): + shrToken: str + root: Root + __server: openziti.zitisock.ZitiSocket + + def __init__(self, shrToken: str, root: Root): + self.shrToken = shrToken + self.root = root + ztx = openziti.load( + self.root.ZitiIdentityNamed( + self.root.EnvironmentIdentityName())) + self.__server = ztx.bind(self.shrToken) + + def __enter__(self) -> openziti.zitisock.ZitiSocket: + self.listen() + return self.__server + + def __exit__(self, exception_type, exception_value, exception_traceback): + self.close() + + def listen(self): + self.__server.listen() + + def close(self): + self.__server.close() diff --git a/sdk/python/sdk/zrok/zrok/model.py b/sdk/python/sdk/zrok/zrok/model.py new file mode 100644 index 00000000..90f51342 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/model.py @@ -0,0 +1,76 @@ +from dataclasses import dataclass, field + +BackendMode = str + +PROXY_BACKEND_MODE: BackendMode = "proxy" +WEB_BACKEND_MODE: BackendMode = "web" +TCP_TUNNEL_BACKEND_MODE: BackendMode = "tcpTunnel" +UDP_TUNNEL_BACKEND_MODE: BackendMode = "udpTunnel" +CADDY_BACKEND_MODE: BackendMode = "caddy" +DRIVE_BACKEND_MODE: BackendMode = "drive" +SOCKS_BACKEND_MODE: BackendMode = "socks" +VPN_BACKEND_MODE: BackendMode = "vpn" + +ShareMode = str + +PRIVATE_SHARE_MODE: ShareMode = "private" +PUBLIC_SHARE_MODE: ShareMode = "public" + +PermissionMode = str + +OPEN_PERMISSION_MODE: PermissionMode = "open" +CLOSED_PERMISSION_MODE: PermissionMode = "closed" + + +@dataclass +class ShareRequest: + BackendMode: BackendMode + ShareMode: ShareMode + Target: str + Frontends: list[str] = field(default_factory=list[str]) + BasicAuth: list[str] = field(default_factory=list[str]) + OauthProvider: str = "" + OauthEmailAddressPatterns: list[str] = field(default_factory=list[str]) + OauthAuthorizationCheckInterval: str = "" + Reserved: bool = False + UniqueName: str = "" + PermissionMode: PermissionMode = OPEN_PERMISSION_MODE + AccessGrants: list[str] = field(default_factory=list[str]) + + +@dataclass +class Share: + Token: str + FrontendEndpoints: list[str] + + +@dataclass +class AccessRequest: + ShareToken: str + + +@dataclass +class Access: + Token: str + ShareToken: str + BackendMode: BackendMode + + +@dataclass +class SessionMetrics: + BytesRead: int + BytesWritten: int + LastUpdate: int + + +@dataclass +class Metrics: + Namespace: str + Sessions: dict[str, SessionMetrics] + + +AuthScheme = str + +AUTH_SCHEME_NONE: AuthScheme = "none" +AUTH_SCHEME_BASIC: AuthScheme = "basic" +AUTH_SCHEME_OAUTH: AuthScheme = "oauth" diff --git a/sdk/python/sdk/zrok/zrok/overview.py b/sdk/python/sdk/zrok/zrok/overview.py new file mode 100644 index 00000000..f7b981eb --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/overview.py @@ -0,0 +1,78 @@ +import json +from dataclasses import dataclass, field +from typing import List + +import urllib3 +from zrok.environment.root import Root +from zrok_api.models.environment import Environment +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from zrok_api.models.frontends import Frontends +from zrok_api.models.share import Share + + +@dataclass +class Overview: + environments: List[EnvironmentAndResources] = field(default_factory=list) + + @classmethod + def create(cls, root: Root) -> 'Overview': + if not root.IsEnabled(): + raise Exception("environment is not enabled; enable with 'zrok enable' first!") + + http = urllib3.PoolManager() + apiEndpoint = root.ApiEndpoint().endpoint + try: + response = http.request( + 'GET', + apiEndpoint + "/api/v1/overview", + headers={ + "X-TOKEN": root.env.Token + }) + except Exception as e: + raise Exception("unable to get account overview", e) + + json_data = json.loads(response.data.decode('utf-8')) + overview = cls() + + for env_data in json_data.get('environments', []): + env_dict = env_data['environment'] + # Map the JSON keys to the Environment class parameters + environment = Environment( + description=env_dict.get('description'), + host=env_dict.get('host'), + address=env_dict.get('address'), + z_id=env_dict.get('zId'), + activity=env_dict.get('activity'), + limited=env_dict.get('limited'), + created_at=env_dict.get('createdAt'), + updated_at=env_dict.get('updatedAt') + ) + + # Create Shares object from share data + share_list = [] + for share_data in env_data.get('shares', []): + share = Share( + token=share_data.get('token'), + z_id=share_data.get('zId'), + share_mode=share_data.get('shareMode'), + backend_mode=share_data.get('backendMode'), + frontend_selection=share_data.get('frontendSelection'), + frontend_endpoint=share_data.get('frontendEndpoint'), + backend_proxy_endpoint=share_data.get('backendProxyEndpoint'), + reserved=share_data.get('reserved'), + activity=share_data.get('activity'), + limited=share_data.get('limited'), + created_at=share_data.get('createdAt'), + updated_at=share_data.get('updatedAt') + ) + share_list.append(share) + + # Create EnvironmentAndResources object + env_resources = EnvironmentAndResources( + environment=environment, + shares=share_list, + frontends=Frontends() # Empty frontends for now as it's not in the input data + ) + overview.environments.append(env_resources) + + return overview diff --git a/sdk/python/sdk/zrok/zrok/proxy.py b/sdk/python/sdk/zrok/zrok/proxy.py new file mode 100644 index 00000000..a1244ca3 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/proxy.py @@ -0,0 +1,203 @@ +""" +Proxy share management functionality for the zrok SDK. +""" + +import atexit +import logging +import urllib.parse +from dataclasses import dataclass +from typing import Any, Dict, List, Optional + +import requests +from flask import Flask, Response, request +from waitress import serve +from zrok.environment.root import Root +from zrok.model import (PROXY_BACKEND_MODE, PUBLIC_SHARE_MODE, PRIVATE_SHARE_MODE, Share, + ShareRequest) +from zrok.overview import Overview +from zrok.share import CreateShare, ReleaseReservedShare + +import zrok + +logger = logging.getLogger(__name__) + +# List of hop-by-hop headers that should not be returned to the viewer +HOP_BY_HOP_HEADERS = { + 'connection', + 'keep-alive', + 'proxy-authenticate', + 'proxy-authorization', + 'te', + 'trailers', + 'transfer-encoding', + 'upgrade' +} + +# The proxy only listens on the zrok socket, the port used to initialize the Waitress server is not actually bound or +# listening +DUMMY_PORT = 18081 + + +@dataclass +class ProxyShare: + """Represents a proxy share with its configuration and state.""" + root: Root + share: Share + target: str + unique_name: Optional[str] = None + _cleanup_registered: bool = False + _app: Optional[Flask] = None + verify_ssl: bool = True + + @classmethod + def create(cls, root: Root, target: str, share_mode: str = PUBLIC_SHARE_MODE, unique_name: Optional[str] = None, + frontends: Optional[List[str]] = None, verify_ssl: bool = True) -> 'ProxyShare': + """ + Create a new proxy share, handling reservation and cleanup logic based on unique_name. + + Args: + root: The zrok root environment + target: Target URL or service to proxy to + unique_name: Optional unique name for a reserved share + frontends: Optional list of frontends to use, takes precedence over root's default_frontend + verify_ssl: Whether to verify SSL certificates when forwarding requests. + + Returns: + ProxyShare instance configured with the created share + """ + # First check if we have an existing reserved share with this name + if unique_name: + existing_share = cls._find_existing_share(root, unique_name) + if existing_share: + logger.debug(f"Found existing share with token: {existing_share.Token}") + return cls( + root=root, + share=existing_share, + target=target, + unique_name=unique_name, + verify_ssl=verify_ssl + ) + + # Compose the share request + share_frontends = [] + if share_mode == PUBLIC_SHARE_MODE: + if frontends: + share_frontends = frontends + elif root.cfg and root.cfg.DefaultFrontend: + share_frontends = [root.cfg.DefaultFrontend] + else: + share_frontends = ['public'] + + share_request = ShareRequest( + BackendMode=PROXY_BACKEND_MODE, + ShareMode=share_mode, + Target=target, + Frontends=share_frontends, + Reserved=True + ) + if unique_name: + share_request.UniqueName = unique_name + + # Create the share + share = CreateShare(root=root, request=share_request) + if share_mode == PUBLIC_SHARE_MODE: + logger.debug(f"Created new proxy share with endpoints: {', '.join(share.FrontendEndpoints)}") + elif share_mode == PRIVATE_SHARE_MODE: + logger.debug(f"Created new private share with token: {share.Token}") + + # Create class instance and setup cleanup-at-exit if we reserved a random share token + instance = cls( + root=root, + share=share, + target=target, + unique_name=unique_name, + verify_ssl=verify_ssl + ) + if not unique_name: + instance.register_cleanup() + return instance + + @staticmethod + def _find_existing_share(root: Root, unique_name: str) -> Optional[Share]: + """Find an existing share with the given unique name.""" + overview = Overview.create(root=root) + for env in overview.environments: + if env.environment.z_id == root.env.ZitiIdentity: + for share in env.shares: + if share.token == unique_name: + return Share(Token=share.token, FrontendEndpoints=[share.frontend_endpoint]) + return None + + def register_cleanup(self): + """Register cleanup handler to release randomly generated shares on exit.""" + if not self._cleanup_registered: + def cleanup(): + try: + ReleaseReservedShare(root=self.root, shr=self.share) + logger.info(f"Share {self.share.Token} released") + except Exception as e: + logger.error(f"Error during cleanup: {e}") + + # Register for normal exit only + atexit.register(cleanup) + self._cleanup_registered = True + return cleanup # Return the cleanup function for reuse + + def _create_app(self) -> Flask: + """Create and configure the Flask app for proxying.""" + app = Flask(__name__) + + @app.route('/', defaults={'path': ''}, methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS']) + @app.route('/', methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS']) + def proxy(path): + # Construct the target URL + url = urllib.parse.urljoin(self.target, path) + + # Forward the request + resp = requests.request( + method=request.method, + url=url, + headers={key: value for (key, value) in request.headers + if key.lower() not in HOP_BY_HOP_HEADERS}, + data=request.get_data(), + cookies=request.cookies, + allow_redirects=False, + stream=True, + verify=self.verify_ssl + ) + + # Create the response + excluded_headers = HOP_BY_HOP_HEADERS.union({'host'}) + headers = [(name, value) for (name, value) in resp.raw.headers.items() + if name.lower() not in excluded_headers] + + return Response( + resp.iter_content(chunk_size=10*1024), + status=resp.status_code, + headers=headers + ) + return app + + def run(self): + """Run the proxy server.""" + if not self._app: + self._app = self._create_app() + + zrok_opts: Dict[str, Any] = {} + zrok_opts['cfg'] = zrok.decor.Opts(root=self.root, shrToken=self.token, bindPort=DUMMY_PORT) + + @zrok.decor.zrok(opts=zrok_opts) + def run_server(): + serve(self._app, port=DUMMY_PORT, _quiet=True) + + run_server() + + @property + def endpoints(self) -> List[str]: + """Get the frontend endpoints for this share.""" + return self.share.FrontendEndpoints + + @property + def token(self) -> str: + """Get the share token.""" + return self.share.Token diff --git a/sdk/python/sdk/zrok/zrok/share.py b/sdk/python/sdk/zrok/zrok/share.py new file mode 100644 index 00000000..918f5c6a --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/share.py @@ -0,0 +1,122 @@ +from zrok.environment.root import Root +from zrok_api.models import ShareRequest, UnshareRequest, AuthUser +from zrok_api.api import ShareApi +from zrok import model + + +class Share(): + root: Root + request: model.ShareRequest + share: model.Share + + def __init__(self, root: Root, request: model.ShareRequest): + self.root = root + self.request = request + + def __enter__(self) -> model.Share: + self.share = CreateShare(root=self.root, request=self.request) + return self.share + + def __exit__(self, exception_type, exception_value, exception_traceback): + if not self.request.Reserved: + DeleteShare(root=self.root, shr=self.share) + + +def CreateShare(root: Root, request: model.ShareRequest) -> model.Share: + if not root.IsEnabled(): + raise Exception("environment is not enabled; enable with 'zrok enable' first!") + + match request.ShareMode: + case model.PRIVATE_SHARE_MODE: + out = __newPrivateShare(root, request) + case model.PUBLIC_SHARE_MODE: + out = __newPublicShare(root, request) + case _: + raise Exception("unknown share mode " + request.ShareMode) + out.reserved = request.Reserved + if request.Reserved: + out.unique_name = request.UniqueName + + if len(request.BasicAuth) > 0: + out.auth_scheme = model.AUTH_SCHEME_BASIC + for pair in request.BasicAuth: + tokens = pair.split(":") + if len(tokens) == 2: + out.auth_users.append(AuthUser(username=tokens[0].strip(), password=tokens[1].strip())) + else: + raise Exception("invalid username:password pair: " + pair) + + if request.OauthProvider != "": + out.auth_scheme = model.AUTH_SCHEME_OAUTH + + try: + zrok = root.Client() + except Exception as e: + raise Exception("error getting zrok client", e) + try: + res = ShareApi(zrok).share(body=out) + except Exception as e: + raise Exception("unable to create share", e) + + return model.Share(Token=res.shr_token, + FrontendEndpoints=res.frontend_proxy_endpoints) + + +def __newPrivateShare(root: Root, request: model.ShareRequest) -> ShareRequest: + return ShareRequest(env_zid=root.env.ZitiIdentity, + share_mode=request.ShareMode, + backend_mode=request.BackendMode, + backend_proxy_endpoint=request.Target, + auth_scheme=model.AUTH_SCHEME_NONE, + permission_mode=request.PermissionMode, + access_grants=request.AccessGrants + ) + + +def __newPublicShare(root: Root, request: model.ShareRequest) -> ShareRequest: + ret = ShareRequest(env_zid=root.env.ZitiIdentity, + share_mode=request.ShareMode, + frontend_selection=request.Frontends, + backend_mode=request.BackendMode, + backend_proxy_endpoint=request.Target, + auth_scheme=model.AUTH_SCHEME_NONE, + oauth_email_domains=request.OauthEmailAddressPatterns, + oauth_authorization_check_interval=request.OauthAuthorizationCheckInterval, + permission_mode=request.PermissionMode, + access_grants=request.AccessGrants + ) + if request.OauthProvider != "": + ret.oauth_provider = request.OauthProvider + + return ret + + +def DeleteShare(root: Root, shr: model.Share): + req = UnshareRequest(env_zid=root.env.ZitiIdentity, + shr_token=shr.Token) + + try: + zrok = root.Client() + except Exception as e: + raise Exception("error getting zrok client", e) + + try: + ShareApi(zrok).unshare(body=req) + except Exception as e: + raise Exception("error deleting share", e) + + +def ReleaseReservedShare(root: Root, shr: model.Share): + req = UnshareRequest(env_zid=root.env.ZitiIdentity, + shr_token=shr.Token, + reserved=True) + + try: + zrok = root.Client() + except Exception as e: + raise Exception("error getting zrok client", e) + + try: + ShareApi(zrok).unshare(body=req) + except Exception as e: + raise Exception("error releasing share", e) diff --git a/sdk/python/sdk/zrok/zrok_api/__init__.py b/sdk/python/sdk/zrok/zrok_api/__init__.py index a231330e..412c46f6 100644 --- a/sdk/python/sdk/zrok/zrok_api/__init__.py +++ b/sdk/python/sdk/zrok/zrok_api/__init__.py @@ -12,6 +12,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + from __future__ import absolute_import # import apis into sdk package @@ -20,70 +21,58 @@ from zrok_api.api.admin_api import AdminApi from zrok_api.api.environment_api import EnvironmentApi from zrok_api.api.metadata_api import MetadataApi from zrok_api.api.share_api import ShareApi + # import ApiClient from zrok_api.api_client import ApiClient from zrok_api.configuration import Configuration # import models into sdk package -from zrok_api.models.access_body import AccessBody -from zrok_api.models.access_body1 import AccessBody1 -from zrok_api.models.account_body import AccountBody from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_body import ChangePasswordBody -from zrok_api.models.client_version_check_body import ClientVersionCheckBody +from zrok_api.models.body import Body +from zrok_api.models.body1 import Body1 +from zrok_api.models.body10 import Body10 +from zrok_api.models.body11 import Body11 +from zrok_api.models.body12 import Body12 +from zrok_api.models.body13 import Body13 +from zrok_api.models.body14 import Body14 +from zrok_api.models.body15 import Body15 +from zrok_api.models.body16 import Body16 +from zrok_api.models.body17 import Body17 +from zrok_api.models.body18 import Body18 +from zrok_api.models.body19 import Body19 +from zrok_api.models.body2 import Body2 +from zrok_api.models.body20 import Body20 +from zrok_api.models.body21 import Body21 +from zrok_api.models.body22 import Body22 +from zrok_api.models.body23 import Body23 +from zrok_api.models.body24 import Body24 +from zrok_api.models.body25 import Body25 +from zrok_api.models.body26 import Body26 +from zrok_api.models.body27 import Body27 +from zrok_api.models.body28 import Body28 +from zrok_api.models.body3 import Body3 +from zrok_api.models.body4 import Body4 +from zrok_api.models.body5 import Body5 +from zrok_api.models.body6 import Body6 +from zrok_api.models.body7 import Body7 +from zrok_api.models.body8 import Body8 +from zrok_api.models.body9 import Body9 from zrok_api.models.configuration import Configuration -from zrok_api.models.disable_body import DisableBody -from zrok_api.models.enable_body import EnableBody from zrok_api.models.environment import Environment from zrok_api.models.environment_and_resources import EnvironmentAndResources from zrok_api.models.environments import Environments from zrok_api.models.error_message import ErrorMessage from zrok_api.models.frontend import Frontend -from zrok_api.models.frontend_body import FrontendBody -from zrok_api.models.frontend_body1 import FrontendBody1 -from zrok_api.models.frontend_body2 import FrontendBody2 from zrok_api.models.frontends import Frontends -from zrok_api.models.grants_body import GrantsBody -from zrok_api.models.identity_body import IdentityBody from zrok_api.models.inline_response200 import InlineResponse200 -from zrok_api.models.inline_response2001 import InlineResponse2001 -from zrok_api.models.inline_response2002 import InlineResponse2002 -from zrok_api.models.inline_response2003 import InlineResponse2003 -from zrok_api.models.inline_response2003_members import InlineResponse2003Members -from zrok_api.models.inline_response2004 import InlineResponse2004 -from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations -from zrok_api.models.inline_response2005 import InlineResponse2005 -from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships -from zrok_api.models.inline_response2006 import InlineResponse2006 -from zrok_api.models.inline_response2007 import InlineResponse2007 from zrok_api.models.inline_response201 import InlineResponse201 -from zrok_api.models.inline_response2011 import InlineResponse2011 -from zrok_api.models.inline_response2012 import InlineResponse2012 -from zrok_api.models.inline_response2013 import InlineResponse2013 -from zrok_api.models.invite_body import InviteBody -from zrok_api.models.login_body import LoginBody from zrok_api.models.metrics import Metrics from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.organization_add_body import OrganizationAddBody -from zrok_api.models.organization_body import OrganizationBody -from zrok_api.models.organization_body1 import OrganizationBody1 -from zrok_api.models.organization_list_body import OrganizationListBody -from zrok_api.models.organization_remove_body import OrganizationRemoveBody from zrok_api.models.overview import Overview from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody -from zrok_api.models.register_body import RegisterBody -from zrok_api.models.reset_password_body import ResetPasswordBody -from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody from zrok_api.models.share import Share -from zrok_api.models.share_body import ShareBody from zrok_api.models.share_request import ShareRequest from zrok_api.models.share_response import ShareResponse from zrok_api.models.shares import Shares from zrok_api.models.spark_data import SparkData from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.sparklines_body import SparklinesBody -from zrok_api.models.token_generate_body import TokenGenerateBody -from zrok_api.models.unaccess_body import UnaccessBody -from zrok_api.models.unshare_body import UnshareBody -from zrok_api.models.verify_body import VerifyBody from zrok_api.models.version import Version diff --git a/sdk/python/sdk/zrok/zrok_api/api/account_api.py b/sdk/python/sdk/zrok/zrok_api/api/account_api.py index 8a85d9e1..6166da61 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/account_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/account_api.py @@ -10,6 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + from __future__ import absolute_import import re # noqa: F401 @@ -41,7 +42,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param ChangePasswordBody body: + :param Body body: :return: None If the method is called asynchronously, returns the request thread. @@ -62,7 +63,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param ChangePasswordBody body: + :param Body body: :return: None If the method is called asynchronously, returns the request thread. @@ -134,7 +135,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param InviteBody body: + :param Body1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -155,7 +156,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param InviteBody body: + :param Body1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -227,7 +228,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param LoginBody body: + :param Body2 body: :return: str If the method is called asynchronously, returns the request thread. @@ -248,7 +249,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param LoginBody body: + :param Body2 body: :return: str If the method is called asynchronously, returns the request thread. @@ -320,8 +321,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param RegenerateAccountTokenBody body: - :return: InlineResponse200 + :param Body3 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -341,8 +342,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param RegenerateAccountTokenBody body: - :return: InlineResponse200 + :param Body3 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -396,7 +397,7 @@ class AccountApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse200', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -413,8 +414,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param RegisterBody body: - :return: InlineResponse200 + :param Body4 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -434,8 +435,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param RegisterBody body: - :return: InlineResponse200 + :param Body4 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -489,7 +490,7 @@ class AccountApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse200', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -506,7 +507,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param ResetPasswordBody body: + :param Body5 body: :return: None If the method is called asynchronously, returns the request thread. @@ -527,7 +528,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param ResetPasswordBody body: + :param Body5 body: :return: None If the method is called asynchronously, returns the request thread. @@ -599,7 +600,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param ResetPasswordRequestBody body: + :param Body6 body: :return: None If the method is called asynchronously, returns the request thread. @@ -620,7 +621,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param ResetPasswordRequestBody body: + :param Body6 body: :return: None If the method is called asynchronously, returns the request thread. @@ -656,6 +657,10 @@ class AccountApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -688,8 +693,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param VerifyBody body: - :return: InlineResponse2001 + :param Body7 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -709,8 +714,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param VerifyBody body: - :return: InlineResponse2001 + :param Body7 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -764,7 +769,7 @@ class AccountApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2001', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py index 081dbe65..b9649da7 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py @@ -10,6 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + from __future__ import absolute_import import re # noqa: F401 @@ -41,7 +42,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param OrganizationAddBody body: + :param Body17 body: :return: None If the method is called asynchronously, returns the request thread. @@ -62,7 +63,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param OrganizationAddBody body: + :param Body17 body: :return: None If the method is called asynchronously, returns the request thread. @@ -98,6 +99,10 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -130,8 +135,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param AccountBody body: - :return: InlineResponse200 + :param Body8 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -151,8 +156,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param AccountBody body: - :return: InlineResponse200 + :param Body8 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -206,7 +211,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse200', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -223,7 +228,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param FrontendBody body: + :param Body9 body: :return: InlineResponse201 If the method is called asynchronously, returns the request thread. @@ -244,7 +249,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param FrontendBody body: + :param Body9 body: :return: InlineResponse201 If the method is called asynchronously, returns the request thread. @@ -316,8 +321,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param IdentityBody body: - :return: InlineResponse2011 + :param Body13 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -337,8 +342,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param IdentityBody body: - :return: InlineResponse2011 + :param Body13 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -392,7 +397,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2011', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -409,8 +414,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param OrganizationBody body: - :return: InlineResponse2012 + :param Body15 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -430,8 +435,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param OrganizationBody body: - :return: InlineResponse2012 + :param Body15 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -485,7 +490,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2012', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -502,7 +507,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param FrontendBody1 body: + :param Body10 body: :return: None If the method is called asynchronously, returns the request thread. @@ -523,7 +528,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param FrontendBody1 body: + :param Body10 body: :return: None If the method is called asynchronously, returns the request thread. @@ -559,6 +564,10 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -591,7 +600,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param OrganizationBody1 body: + :param Body16 body: :return: None If the method is called asynchronously, returns the request thread. @@ -612,7 +621,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param OrganizationBody1 body: + :param Body16 body: :return: None If the method is called asynchronously, returns the request thread. @@ -648,6 +657,10 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -680,7 +693,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param GrantsBody body: + :param Body12 body: :return: None If the method is called asynchronously, returns the request thread. @@ -701,7 +714,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param GrantsBody body: + :param Body12 body: :return: None If the method is called asynchronously, returns the request thread. @@ -737,6 +750,10 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -769,7 +786,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param TokenGenerateBody body: + :param Body14 body: :return: None If the method is called asynchronously, returns the request thread. @@ -790,7 +807,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param TokenGenerateBody body: + :param Body14 body: :return: None If the method is called asynchronously, returns the request thread. @@ -826,6 +843,10 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -858,7 +879,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :return: list[InlineResponse2002] + :return: list[InlineResponse200] If the method is called asynchronously, returns the request thread. """ @@ -878,7 +899,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :return: list[InlineResponse2002] + :return: list[InlineResponse200] If the method is called asynchronously, returns the request thread. """ @@ -915,6 +936,10 @@ class AdminApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -926,7 +951,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse2002]', # noqa: E501 + response_type='list[InlineResponse200]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -943,8 +968,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param OrganizationListBody body: - :return: InlineResponse2003 + :param Body18 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -964,8 +989,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param OrganizationListBody body: - :return: InlineResponse2003 + :param Body18 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -1019,7 +1044,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2003', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1036,7 +1061,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :return: InlineResponse2004 + :return: object If the method is called asynchronously, returns the request thread. """ @@ -1056,7 +1081,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :return: InlineResponse2004 + :return: object If the method is called asynchronously, returns the request thread. """ @@ -1093,6 +1118,10 @@ class AdminApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -1104,7 +1133,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2004', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1121,7 +1150,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param OrganizationRemoveBody body: + :param Body19 body: :return: None If the method is called asynchronously, returns the request thread. @@ -1142,7 +1171,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param OrganizationRemoveBody body: + :param Body19 body: :return: None If the method is called asynchronously, returns the request thread. @@ -1178,6 +1207,10 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -1210,7 +1243,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param FrontendBody2 body: + :param Body11 body: :return: None If the method is called asynchronously, returns the request thread. @@ -1231,7 +1264,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param FrontendBody2 body: + :param Body11 body: :return: None If the method is called asynchronously, returns the request thread. @@ -1267,6 +1300,10 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 diff --git a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py b/sdk/python/sdk/zrok/zrok_api/api/environment_api.py index 16bc987e..a226f6df 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/environment_api.py @@ -10,6 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + from __future__ import absolute_import import re # noqa: F401 @@ -41,7 +42,7 @@ class EnvironmentApi(object): >>> result = thread.get() :param async_req bool - :param DisableBody body: + :param Body21 body: :return: None If the method is called asynchronously, returns the request thread. @@ -62,7 +63,7 @@ class EnvironmentApi(object): >>> result = thread.get() :param async_req bool - :param DisableBody body: + :param Body21 body: :return: None If the method is called asynchronously, returns the request thread. @@ -98,6 +99,10 @@ class EnvironmentApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -130,8 +135,8 @@ class EnvironmentApi(object): >>> result = thread.get() :param async_req bool - :param EnableBody body: - :return: InlineResponse2011 + :param Body20 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -151,8 +156,8 @@ class EnvironmentApi(object): >>> result = thread.get() :param async_req bool - :param EnableBody body: - :return: InlineResponse2011 + :param Body20 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -206,7 +211,7 @@ class EnvironmentApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2011', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py index 1afe9e25..a07654db 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py @@ -10,6 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + from __future__ import absolute_import import re # noqa: F401 @@ -41,7 +42,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :param ClientVersionCheckBody body: + :param Body22 body: :return: None If the method is called asynchronously, returns the request thread. @@ -62,7 +63,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :param ClientVersionCheckBody body: + :param Body22 body: :return: None If the method is called asynchronously, returns the request thread. @@ -191,6 +192,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 @@ -276,6 +281,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -365,6 +374,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -436,8 +449,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'env_zid' is set - if ('env_zid' not in params or - params['env_zid'] is None): + if self.api_client.client_side_validation and ('env_zid' not in params or + params['env_zid'] is None): # noqa: E501 raise ValueError("Missing the required parameter `env_zid` when calling `get_environment_detail`") # noqa: E501 collection_formats = {} @@ -458,6 +471,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -531,8 +548,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'env_id' is set - if ('env_id' not in params or - params['env_id'] is None): + if self.api_client.client_side_validation and ('env_id' not in params or + params['env_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `env_id` when calling `get_environment_metrics`") # noqa: E501 collection_formats = {} @@ -555,6 +572,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -626,8 +647,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'frontend_id' is set - if ('frontend_id' not in params or - params['frontend_id'] is None): + if self.api_client.client_side_validation and ('frontend_id' not in params or + params['frontend_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `frontend_id` when calling `get_frontend_detail`") # noqa: E501 collection_formats = {} @@ -648,6 +669,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -719,8 +744,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'share_token' is set - if ('share_token' not in params or - params['share_token'] is None): + if self.api_client.client_side_validation and ('share_token' not in params or + params['share_token'] is None): # noqa: E501 raise ValueError("Missing the required parameter `share_token` when calling `get_share_detail`") # noqa: E501 collection_formats = {} @@ -741,6 +766,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -814,8 +843,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'share_token' is set - if ('share_token' not in params or - params['share_token'] is None): + if self.api_client.client_side_validation and ('share_token' not in params or + params['share_token'] is None): # noqa: E501 raise ValueError("Missing the required parameter `share_token` when calling `get_share_metrics`") # noqa: E501 collection_formats = {} @@ -838,6 +867,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -866,8 +899,8 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :param SparklinesBody body: - :return: InlineResponse2006 + :param Body23 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -887,8 +920,8 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :param SparklinesBody body: - :return: InlineResponse2006 + :param Body23 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -942,7 +975,7 @@ class MetadataApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2006', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -959,7 +992,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :return: InlineResponse2005 + :return: object If the method is called asynchronously, returns the request thread. """ @@ -979,7 +1012,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :return: InlineResponse2005 + :return: object If the method is called asynchronously, returns the request thread. """ @@ -1016,6 +1049,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -1027,7 +1064,7 @@ class MetadataApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2005', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1045,7 +1082,7 @@ class MetadataApi(object): :param async_req bool :param str organization_token: (required) - :return: InlineResponse2003 + :return: object If the method is called asynchronously, returns the request thread. """ @@ -1066,7 +1103,7 @@ class MetadataApi(object): :param async_req bool :param str organization_token: (required) - :return: InlineResponse2003 + :return: object If the method is called asynchronously, returns the request thread. """ @@ -1087,8 +1124,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'organization_token' is set - if ('organization_token' not in params or - params['organization_token'] is None): + if self.api_client.client_side_validation and ('organization_token' not in params or + params['organization_token'] is None): # noqa: E501 raise ValueError("Missing the required parameter `organization_token` when calling `list_org_members`") # noqa: E501 collection_formats = {} @@ -1109,6 +1146,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -1120,7 +1161,7 @@ class MetadataApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2003', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1182,12 +1223,12 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'organization_token' is set - if ('organization_token' not in params or - params['organization_token'] is None): + if self.api_client.client_side_validation and ('organization_token' not in params or + params['organization_token'] is None): # noqa: E501 raise ValueError("Missing the required parameter `organization_token` when calling `org_account_overview`") # noqa: E501 # verify the required parameter 'account_email' is set - if ('account_email' not in params or - params['account_email'] is None): + if self.api_client.client_side_validation and ('account_email' not in params or + params['account_email'] is None): # noqa: E501 raise ValueError("Missing the required parameter `account_email` when calling `org_account_overview`") # noqa: E501 collection_formats = {} @@ -1210,6 +1251,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -1295,6 +1340,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -1380,6 +1429,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 @@ -1408,7 +1461,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :return: InlineResponse2007 + :return: object If the method is called asynchronously, returns the request thread. """ @@ -1428,7 +1481,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :return: InlineResponse2007 + :return: object If the method is called asynchronously, returns the request thread. """ @@ -1465,6 +1518,10 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/zrok.v1+json']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 @@ -1476,7 +1533,7 @@ class MetadataApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2007', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/sdk/python/sdk/zrok/zrok_api/api/share_api.py b/sdk/python/sdk/zrok/zrok_api/api/share_api.py index 49362e17..63090a4f 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/share_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/share_api.py @@ -10,6 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + from __future__ import absolute_import import re # noqa: F401 @@ -41,8 +42,8 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param AccessBody body: - :return: InlineResponse2013 + :param Body24 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -62,8 +63,8 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param AccessBody body: - :return: InlineResponse2013 + :param Body24 body: + :return: object If the method is called asynchronously, returns the request thread. """ @@ -117,7 +118,7 @@ class ShareApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2013', # noqa: E501 + response_type='object', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -227,7 +228,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param UnaccessBody body: + :param Body27 body: :return: None If the method is called asynchronously, returns the request thread. @@ -248,7 +249,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param UnaccessBody body: + :param Body27 body: :return: None If the method is called asynchronously, returns the request thread. @@ -284,6 +285,10 @@ class ShareApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -316,7 +321,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param UnshareBody body: + :param Body28 body: :return: None If the method is called asynchronously, returns the request thread. @@ -337,7 +342,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param UnshareBody body: + :param Body28 body: :return: None If the method is called asynchronously, returns the request thread. @@ -409,7 +414,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param AccessBody1 body: + :param Body25 body: :return: None If the method is called asynchronously, returns the request thread. @@ -430,7 +435,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param AccessBody1 body: + :param Body25 body: :return: None If the method is called asynchronously, returns the request thread. @@ -466,6 +471,10 @@ class ShareApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -498,7 +507,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param ShareBody body: + :param Body26 body: :return: None If the method is called asynchronously, returns the request thread. @@ -519,7 +528,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param ShareBody body: + :param Body26 body: :return: None If the method is called asynchronously, returns the request thread. @@ -555,6 +564,10 @@ class ShareApi(object): body_params = None if 'body' in params: body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/zrok.v1+json']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 diff --git a/sdk/python/sdk/zrok/zrok_api/api_client.py b/sdk/python/sdk/zrok/zrok_api/api_client.py index f917a79b..c8d822a5 100644 --- a/sdk/python/sdk/zrok/zrok_api/api_client.py +++ b/sdk/python/sdk/zrok/zrok_api/api_client.py @@ -8,6 +8,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + from __future__ import absolute_import import datetime @@ -65,7 +66,8 @@ class ApiClient(object): configuration = Configuration() self.configuration = configuration - self.pool = ThreadPool() + # Use the pool property to lazily initialize the ThreadPool. + self._pool = None self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: @@ -73,10 +75,18 @@ class ApiClient(object): self.cookie = cookie # Set default User-Agent. self.user_agent = 'Swagger-Codegen/1.0.0/python' + self.client_side_validation = configuration.client_side_validation def __del__(self): - self.pool.close() - self.pool.join() + if self._pool is not None: + self._pool.close() + self._pool.join() + + @property + def pool(self): + if self._pool is None: + self._pool = ThreadPool() + return self._pool @property def user_agent(self): @@ -523,14 +533,10 @@ class ApiClient(object): filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) + + with open(path, "w") as f: + f.write(response.data) + return path def __deserialize_primitive(self, data, klass): @@ -595,7 +601,7 @@ class ApiClient(object): ) def __hasattr(self, object, name): - return name in object.__class__.__dict__ + return name in object.__class__.__dict__ def __deserialize_model(self, data, klass): """Deserializes list or dict to model. @@ -605,7 +611,8 @@ class ApiClient(object): :return: model object. """ - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): + if (not klass.swagger_types and + not self.__hasattr(klass, 'get_real_child_model')): return data kwargs = {} diff --git a/sdk/python/sdk/zrok/zrok_api/configuration.py b/sdk/python/sdk/zrok/zrok_api/configuration.py index 331c27b7..4b3f8d38 100644 --- a/sdk/python/sdk/zrok/zrok_api/configuration.py +++ b/sdk/python/sdk/zrok/zrok_api/configuration.py @@ -10,6 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + from __future__ import absolute_import import copy @@ -22,31 +23,24 @@ import six from six.moves import http_client as httplib -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): +class Configuration(object): """NOTE: This class is auto generated by the swagger code generator program. Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually. """ + _default = None + def __init__(self): """Constructor""" + if self._default: + for key in self._default.__dict__.keys(): + self.__dict__[key] = copy.copy(self._default.__dict__[key]) + return + # Default Base url - self.host = "/api/v1" + self.host = "http://localhost/api/v1" # Temp file folder for downloading files self.temp_folder_path = None @@ -61,6 +55,7 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): self.username = "" # Password for HTTP basic authentication self.password = "" + # Logging Settings self.logger = {} self.logger["package_logger"] = logging.getLogger("zrok_api") @@ -101,6 +96,13 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): # Safe chars for path_param self.safe_chars_for_path_param = '' + # Disable client side validation + self.client_side_validation = True + + @classmethod + def set_default(cls, default): + cls._default = default + @property def logger_file(self): """The logger file. @@ -203,6 +205,7 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ + if self.refresh_api_key_hook: self.refresh_api_key_hook(self) @@ -219,9 +222,12 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): :return: The token for basic HTTP authentication. """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') + token = "" + if self.username or self.password: + token = urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + return token def auth_settings(self): """Gets Auth Settings dict for api client. @@ -236,6 +242,7 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): 'key': 'x-token', 'value': self.get_api_key_with_prefix('x-token') }, + } def to_debug_report(self): diff --git a/sdk/python/sdk/zrok/zrok_api/models/__init__.py b/sdk/python/sdk/zrok/zrok_api/models/__init__.py index c59710d3..ead7e734 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/__init__.py +++ b/sdk/python/sdk/zrok/zrok_api/models/__init__.py @@ -11,69 +11,57 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + from __future__ import absolute_import # import models into model package -from zrok_api.models.access_body import AccessBody -from zrok_api.models.access_body1 import AccessBody1 -from zrok_api.models.account_body import AccountBody from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_body import ChangePasswordBody -from zrok_api.models.client_version_check_body import ClientVersionCheckBody +from zrok_api.models.body import Body +from zrok_api.models.body1 import Body1 +from zrok_api.models.body10 import Body10 +from zrok_api.models.body11 import Body11 +from zrok_api.models.body12 import Body12 +from zrok_api.models.body13 import Body13 +from zrok_api.models.body14 import Body14 +from zrok_api.models.body15 import Body15 +from zrok_api.models.body16 import Body16 +from zrok_api.models.body17 import Body17 +from zrok_api.models.body18 import Body18 +from zrok_api.models.body19 import Body19 +from zrok_api.models.body2 import Body2 +from zrok_api.models.body20 import Body20 +from zrok_api.models.body21 import Body21 +from zrok_api.models.body22 import Body22 +from zrok_api.models.body23 import Body23 +from zrok_api.models.body24 import Body24 +from zrok_api.models.body25 import Body25 +from zrok_api.models.body26 import Body26 +from zrok_api.models.body27 import Body27 +from zrok_api.models.body28 import Body28 +from zrok_api.models.body3 import Body3 +from zrok_api.models.body4 import Body4 +from zrok_api.models.body5 import Body5 +from zrok_api.models.body6 import Body6 +from zrok_api.models.body7 import Body7 +from zrok_api.models.body8 import Body8 +from zrok_api.models.body9 import Body9 from zrok_api.models.configuration import Configuration -from zrok_api.models.disable_body import DisableBody -from zrok_api.models.enable_body import EnableBody from zrok_api.models.environment import Environment from zrok_api.models.environment_and_resources import EnvironmentAndResources from zrok_api.models.environments import Environments from zrok_api.models.error_message import ErrorMessage from zrok_api.models.frontend import Frontend -from zrok_api.models.frontend_body import FrontendBody -from zrok_api.models.frontend_body1 import FrontendBody1 -from zrok_api.models.frontend_body2 import FrontendBody2 from zrok_api.models.frontends import Frontends -from zrok_api.models.grants_body import GrantsBody -from zrok_api.models.identity_body import IdentityBody from zrok_api.models.inline_response200 import InlineResponse200 -from zrok_api.models.inline_response2001 import InlineResponse2001 -from zrok_api.models.inline_response2002 import InlineResponse2002 -from zrok_api.models.inline_response2003 import InlineResponse2003 -from zrok_api.models.inline_response2003_members import InlineResponse2003Members -from zrok_api.models.inline_response2004 import InlineResponse2004 -from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations -from zrok_api.models.inline_response2005 import InlineResponse2005 -from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships -from zrok_api.models.inline_response2006 import InlineResponse2006 -from zrok_api.models.inline_response2007 import InlineResponse2007 from zrok_api.models.inline_response201 import InlineResponse201 -from zrok_api.models.inline_response2011 import InlineResponse2011 -from zrok_api.models.inline_response2012 import InlineResponse2012 -from zrok_api.models.inline_response2013 import InlineResponse2013 -from zrok_api.models.invite_body import InviteBody -from zrok_api.models.login_body import LoginBody from zrok_api.models.metrics import Metrics from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.organization_add_body import OrganizationAddBody -from zrok_api.models.organization_body import OrganizationBody -from zrok_api.models.organization_body1 import OrganizationBody1 -from zrok_api.models.organization_list_body import OrganizationListBody -from zrok_api.models.organization_remove_body import OrganizationRemoveBody from zrok_api.models.overview import Overview from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody -from zrok_api.models.register_body import RegisterBody -from zrok_api.models.reset_password_body import ResetPasswordBody -from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody from zrok_api.models.share import Share -from zrok_api.models.share_body import ShareBody from zrok_api.models.share_request import ShareRequest from zrok_api.models.share_response import ShareResponse from zrok_api.models.shares import Shares from zrok_api.models.spark_data import SparkData from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.sparklines_body import SparklinesBody -from zrok_api.models.token_generate_body import TokenGenerateBody -from zrok_api.models.unaccess_body import UnaccessBody -from zrok_api.models.unshare_body import UnshareBody -from zrok_api.models.verify_body import VerifyBody from zrok_api.models.version import Version diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_request.py b/sdk/python/sdk/zrok/zrok_api/models/access_request.py new file mode 100644 index 00000000..e51ea20a --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/access_request.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AccessRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'env_zid': 'str', + 'shr_token': 'str' + } + + attribute_map = { + 'env_zid': 'envZId', + 'shr_token': 'shrToken' + } + + def __init__(self, env_zid=None, shr_token=None): # noqa: E501 + """AccessRequest - a model defined in Swagger""" # noqa: E501 + self._env_zid = None + self._shr_token = None + self.discriminator = None + if env_zid is not None: + self.env_zid = env_zid + if shr_token is not None: + self.shr_token = shr_token + + @property + def env_zid(self): + """Gets the env_zid of this AccessRequest. # noqa: E501 + + + :return: The env_zid of this AccessRequest. # noqa: E501 + :rtype: str + """ + return self._env_zid + + @env_zid.setter + def env_zid(self, env_zid): + """Sets the env_zid of this AccessRequest. + + + :param env_zid: The env_zid of this AccessRequest. # noqa: E501 + :type: str + """ + + self._env_zid = env_zid + + @property + def shr_token(self): + """Gets the shr_token of this AccessRequest. # noqa: E501 + + + :return: The shr_token of this AccessRequest. # noqa: E501 + :rtype: str + """ + return self._shr_token + + @shr_token.setter + def shr_token(self, shr_token): + """Sets the shr_token of this AccessRequest. + + + :param shr_token: The shr_token of this AccessRequest. # noqa: E501 + :type: str + """ + + self._shr_token = shr_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AccessRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccessRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py b/sdk/python/sdk/zrok/zrok_api/models/access_response.py similarity index 78% rename from sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py rename to sdk/python/sdk/zrok/zrok_api/models/access_response.py index 34a37b49..ba02584f 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py +++ b/sdk/python/sdk/zrok/zrok_api/models/access_response.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class InlineResponse2013(object): +class AccessResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -38,7 +38,7 @@ class InlineResponse2013(object): } def __init__(self, frontend_token=None, backend_mode=None): # noqa: E501 - """InlineResponse2013 - a model defined in Swagger""" # noqa: E501 + """AccessResponse - a model defined in Swagger""" # noqa: E501 self._frontend_token = None self._backend_mode = None self.discriminator = None @@ -49,20 +49,20 @@ class InlineResponse2013(object): @property def frontend_token(self): - """Gets the frontend_token of this InlineResponse2013. # noqa: E501 + """Gets the frontend_token of this AccessResponse. # noqa: E501 - :return: The frontend_token of this InlineResponse2013. # noqa: E501 + :return: The frontend_token of this AccessResponse. # noqa: E501 :rtype: str """ return self._frontend_token @frontend_token.setter def frontend_token(self, frontend_token): - """Sets the frontend_token of this InlineResponse2013. + """Sets the frontend_token of this AccessResponse. - :param frontend_token: The frontend_token of this InlineResponse2013. # noqa: E501 + :param frontend_token: The frontend_token of this AccessResponse. # noqa: E501 :type: str """ @@ -70,20 +70,20 @@ class InlineResponse2013(object): @property def backend_mode(self): - """Gets the backend_mode of this InlineResponse2013. # noqa: E501 + """Gets the backend_mode of this AccessResponse. # noqa: E501 - :return: The backend_mode of this InlineResponse2013. # noqa: E501 + :return: The backend_mode of this AccessResponse. # noqa: E501 :rtype: str """ return self._backend_mode @backend_mode.setter def backend_mode(self, backend_mode): - """Sets the backend_mode of this InlineResponse2013. + """Sets the backend_mode of this AccessResponse. - :param backend_mode: The backend_mode of this InlineResponse2013. # noqa: E501 + :param backend_mode: The backend_mode of this AccessResponse. # noqa: E501 :type: str """ @@ -110,7 +110,7 @@ class InlineResponse2013(object): )) else: result[attr] = value - if issubclass(InlineResponse2013, dict): + if issubclass(AccessResponse, dict): for key, value in self.items(): result[key] = value @@ -126,7 +126,7 @@ class InlineResponse2013(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2013): + if not isinstance(other, AccessResponse): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/account_body.py b/sdk/python/sdk/zrok/zrok_api/models/account_body.py index ea261eb0..2447dea1 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/account_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/account_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py b/sdk/python/sdk/zrok/zrok_api/models/auth_user.py index 0a04dc10..71c88cd4 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py +++ b/sdk/python/sdk/zrok/zrok_api/models/auth_user.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class AuthUser(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -37,11 +42,16 @@ class AuthUser(object): 'password': 'password' } - def __init__(self, username=None, password=None): # noqa: E501 + def __init__(self, username=None, password=None, _configuration=None): # noqa: E501 """AuthUser - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._username = None self._password = None self.discriminator = None + if username is not None: self.username = username if password is not None: @@ -129,8 +139,11 @@ class AuthUser(object): if not isinstance(other, AuthUser): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, AuthUser): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body.py b/sdk/python/sdk/zrok/zrok_api/models/body.py new file mode 100644 index 00000000..50910f74 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'old_password': 'str', + 'new_password': 'str' + } + + attribute_map = { + 'email': 'email', + 'old_password': 'oldPassword', + 'new_password': 'newPassword' + } + + def __init__(self, email=None, old_password=None, new_password=None, _configuration=None): # noqa: E501 + """Body - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email = None + self._old_password = None + self._new_password = None + self.discriminator = None + + if email is not None: + self.email = email + if old_password is not None: + self.old_password = old_password + if new_password is not None: + self.new_password = new_password + + @property + def email(self): + """Gets the email of this Body. # noqa: E501 + + + :return: The email of this Body. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Body. + + + :param email: The email of this Body. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def old_password(self): + """Gets the old_password of this Body. # noqa: E501 + + + :return: The old_password of this Body. # noqa: E501 + :rtype: str + """ + return self._old_password + + @old_password.setter + def old_password(self, old_password): + """Sets the old_password of this Body. + + + :param old_password: The old_password of this Body. # noqa: E501 + :type: str + """ + + self._old_password = old_password + + @property + def new_password(self): + """Gets the new_password of this Body. # noqa: E501 + + + :return: The new_password of this Body. # noqa: E501 + :rtype: str + """ + return self._new_password + + @new_password.setter + def new_password(self, new_password): + """Sets the new_password of this Body. + + + :param new_password: The new_password of this Body. # noqa: E501 + :type: str + """ + + self._new_password = new_password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_body.py b/sdk/python/sdk/zrok/zrok_api/models/body1.py similarity index 72% rename from sdk/python/sdk/zrok/zrok_api/models/invite_body.py rename to sdk/python/sdk/zrok/zrok_api/models/body1.py index bb4840d5..42f6e3de 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/invite_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body1.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class InviteBody(object): +from zrok_api.configuration import Configuration + + +class Body1(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -37,11 +42,16 @@ class InviteBody(object): 'invite_token': 'inviteToken' } - def __init__(self, email=None, invite_token=None): # noqa: E501 - """InviteBody - a model defined in Swagger""" # noqa: E501 + def __init__(self, email=None, invite_token=None, _configuration=None): # noqa: E501 + """Body1 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._email = None self._invite_token = None self.discriminator = None + if email is not None: self.email = email if invite_token is not None: @@ -49,20 +59,20 @@ class InviteBody(object): @property def email(self): - """Gets the email of this InviteBody. # noqa: E501 + """Gets the email of this Body1. # noqa: E501 - :return: The email of this InviteBody. # noqa: E501 + :return: The email of this Body1. # noqa: E501 :rtype: str """ return self._email @email.setter def email(self, email): - """Sets the email of this InviteBody. + """Sets the email of this Body1. - :param email: The email of this InviteBody. # noqa: E501 + :param email: The email of this Body1. # noqa: E501 :type: str """ @@ -70,20 +80,20 @@ class InviteBody(object): @property def invite_token(self): - """Gets the invite_token of this InviteBody. # noqa: E501 + """Gets the invite_token of this Body1. # noqa: E501 - :return: The invite_token of this InviteBody. # noqa: E501 + :return: The invite_token of this Body1. # noqa: E501 :rtype: str """ return self._invite_token @invite_token.setter def invite_token(self, invite_token): - """Sets the invite_token of this InviteBody. + """Sets the invite_token of this Body1. - :param invite_token: The invite_token of this InviteBody. # noqa: E501 + :param invite_token: The invite_token of this Body1. # noqa: E501 :type: str """ @@ -110,7 +120,7 @@ class InviteBody(object): )) else: result[attr] = value - if issubclass(InviteBody, dict): + if issubclass(Body1, dict): for key, value in self.items(): result[key] = value @@ -126,11 +136,14 @@ class InviteBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InviteBody): + if not isinstance(other, Body1): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body1): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py b/sdk/python/sdk/zrok/zrok_api/models/body10.py similarity index 63% rename from sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py rename to sdk/python/sdk/zrok/zrok_api/models/body10.py index 356d155a..4c2c524b 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body10.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class InlineResponse2007(object): +from zrok_api.configuration import Configuration + + +class Body10(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -28,40 +33,45 @@ class InlineResponse2007(object): and the value is json key in definition. """ swagger_types = { - 'controller_version': 'str' + 'frontend_token': 'str' } attribute_map = { - 'controller_version': 'controllerVersion' + 'frontend_token': 'frontendToken' } - def __init__(self, controller_version=None): # noqa: E501 - """InlineResponse2007 - a model defined in Swagger""" # noqa: E501 - self._controller_version = None + def __init__(self, frontend_token=None, _configuration=None): # noqa: E501 + """Body10 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._frontend_token = None self.discriminator = None - if controller_version is not None: - self.controller_version = controller_version + + if frontend_token is not None: + self.frontend_token = frontend_token @property - def controller_version(self): - """Gets the controller_version of this InlineResponse2007. # noqa: E501 + def frontend_token(self): + """Gets the frontend_token of this Body10. # noqa: E501 - :return: The controller_version of this InlineResponse2007. # noqa: E501 + :return: The frontend_token of this Body10. # noqa: E501 :rtype: str """ - return self._controller_version + return self._frontend_token - @controller_version.setter - def controller_version(self, controller_version): - """Sets the controller_version of this InlineResponse2007. + @frontend_token.setter + def frontend_token(self, frontend_token): + """Sets the frontend_token of this Body10. - :param controller_version: The controller_version of this InlineResponse2007. # noqa: E501 + :param frontend_token: The frontend_token of this Body10. # noqa: E501 :type: str """ - self._controller_version = controller_version + self._frontend_token = frontend_token def to_dict(self): """Returns the model properties as a dict""" @@ -84,7 +94,7 @@ class InlineResponse2007(object): )) else: result[attr] = value - if issubclass(InlineResponse2007, dict): + if issubclass(Body10, dict): for key, value in self.items(): result[key] = value @@ -100,11 +110,14 @@ class InlineResponse2007(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2007): + if not isinstance(other, Body10): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body10): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body11.py b/sdk/python/sdk/zrok/zrok_api/models/body11.py new file mode 100644 index 00000000..7002c803 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body11.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body11(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'frontend_token': 'str', + 'public_name': 'str', + 'url_template': 'str' + } + + attribute_map = { + 'frontend_token': 'frontendToken', + 'public_name': 'publicName', + 'url_template': 'urlTemplate' + } + + def __init__(self, frontend_token=None, public_name=None, url_template=None, _configuration=None): # noqa: E501 + """Body11 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._frontend_token = None + self._public_name = None + self._url_template = None + self.discriminator = None + + if frontend_token is not None: + self.frontend_token = frontend_token + if public_name is not None: + self.public_name = public_name + if url_template is not None: + self.url_template = url_template + + @property + def frontend_token(self): + """Gets the frontend_token of this Body11. # noqa: E501 + + + :return: The frontend_token of this Body11. # noqa: E501 + :rtype: str + """ + return self._frontend_token + + @frontend_token.setter + def frontend_token(self, frontend_token): + """Sets the frontend_token of this Body11. + + + :param frontend_token: The frontend_token of this Body11. # noqa: E501 + :type: str + """ + + self._frontend_token = frontend_token + + @property + def public_name(self): + """Gets the public_name of this Body11. # noqa: E501 + + + :return: The public_name of this Body11. # noqa: E501 + :rtype: str + """ + return self._public_name + + @public_name.setter + def public_name(self, public_name): + """Sets the public_name of this Body11. + + + :param public_name: The public_name of this Body11. # noqa: E501 + :type: str + """ + + self._public_name = public_name + + @property + def url_template(self): + """Gets the url_template of this Body11. # noqa: E501 + + + :return: The url_template of this Body11. # noqa: E501 + :rtype: str + """ + return self._url_template + + @url_template.setter + def url_template(self, url_template): + """Sets the url_template of this Body11. + + + :param url_template: The url_template of this Body11. # noqa: E501 + :type: str + """ + + self._url_template = url_template + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body11, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body11): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body11): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body12.py b/sdk/python/sdk/zrok/zrok_api/models/body12.py new file mode 100644 index 00000000..8740741c --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body12.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body12(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str' + } + + attribute_map = { + 'email': 'email' + } + + def __init__(self, email=None, _configuration=None): # noqa: E501 + """Body12 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email = None + self.discriminator = None + + if email is not None: + self.email = email + + @property + def email(self): + """Gets the email of this Body12. # noqa: E501 + + + :return: The email of this Body12. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Body12. + + + :param email: The email of this Body12. # noqa: E501 + :type: str + """ + + self._email = email + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body12, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body12): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body12): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body13.py b/sdk/python/sdk/zrok/zrok_api/models/body13.py new file mode 100644 index 00000000..0607b626 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body13.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body13(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None, _configuration=None): # noqa: E501 + """Body13 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self.discriminator = None + + if name is not None: + self.name = name + + @property + def name(self): + """Gets the name of this Body13. # noqa: E501 + + + :return: The name of this Body13. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Body13. + + + :param name: The name of this Body13. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body13, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body13): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body13): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py b/sdk/python/sdk/zrok/zrok_api/models/body14.py similarity index 74% rename from sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py rename to sdk/python/sdk/zrok/zrok_api/models/body14.py index 0aaa2468..36b8a41e 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body14.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class TokenGenerateBody(object): +from zrok_api.configuration import Configuration + + +class Body14(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -35,29 +40,34 @@ class TokenGenerateBody(object): 'invite_tokens': 'inviteTokens' } - def __init__(self, invite_tokens=None): # noqa: E501 - """TokenGenerateBody - a model defined in Swagger""" # noqa: E501 + def __init__(self, invite_tokens=None, _configuration=None): # noqa: E501 + """Body14 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._invite_tokens = None self.discriminator = None + if invite_tokens is not None: self.invite_tokens = invite_tokens @property def invite_tokens(self): - """Gets the invite_tokens of this TokenGenerateBody. # noqa: E501 + """Gets the invite_tokens of this Body14. # noqa: E501 - :return: The invite_tokens of this TokenGenerateBody. # noqa: E501 + :return: The invite_tokens of this Body14. # noqa: E501 :rtype: list[str] """ return self._invite_tokens @invite_tokens.setter def invite_tokens(self, invite_tokens): - """Sets the invite_tokens of this TokenGenerateBody. + """Sets the invite_tokens of this Body14. - :param invite_tokens: The invite_tokens of this TokenGenerateBody. # noqa: E501 + :param invite_tokens: The invite_tokens of this Body14. # noqa: E501 :type: list[str] """ @@ -84,7 +94,7 @@ class TokenGenerateBody(object): )) else: result[attr] = value - if issubclass(TokenGenerateBody, dict): + if issubclass(Body14, dict): for key, value in self.items(): result[key] = value @@ -100,11 +110,14 @@ class TokenGenerateBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, TokenGenerateBody): + if not isinstance(other, Body14): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body14): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body15.py b/sdk/python/sdk/zrok/zrok_api/models/body15.py new file mode 100644 index 00000000..665896c3 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body15.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body15(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str' + } + + attribute_map = { + 'description': 'description' + } + + def __init__(self, description=None, _configuration=None): # noqa: E501 + """Body15 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self.discriminator = None + + if description is not None: + self.description = description + + @property + def description(self): + """Gets the description of this Body15. # noqa: E501 + + + :return: The description of this Body15. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Body15. + + + :param description: The description of this Body15. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body15, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body15): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body15): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py b/sdk/python/sdk/zrok/zrok_api/models/body16.py similarity index 76% rename from sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py rename to sdk/python/sdk/zrok/zrok_api/models/body16.py index dee97a61..bddb54cf 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body16.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class InlineResponse2012(object): +from zrok_api.configuration import Configuration + + +class Body16(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -35,29 +40,34 @@ class InlineResponse2012(object): 'organization_token': 'organizationToken' } - def __init__(self, organization_token=None): # noqa: E501 - """InlineResponse2012 - a model defined in Swagger""" # noqa: E501 + def __init__(self, organization_token=None, _configuration=None): # noqa: E501 + """Body16 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._organization_token = None self.discriminator = None + if organization_token is not None: self.organization_token = organization_token @property def organization_token(self): - """Gets the organization_token of this InlineResponse2012. # noqa: E501 + """Gets the organization_token of this Body16. # noqa: E501 - :return: The organization_token of this InlineResponse2012. # noqa: E501 + :return: The organization_token of this Body16. # noqa: E501 :rtype: str """ return self._organization_token @organization_token.setter def organization_token(self, organization_token): - """Sets the organization_token of this InlineResponse2012. + """Sets the organization_token of this Body16. - :param organization_token: The organization_token of this InlineResponse2012. # noqa: E501 + :param organization_token: The organization_token of this Body16. # noqa: E501 :type: str """ @@ -84,7 +94,7 @@ class InlineResponse2012(object): )) else: result[attr] = value - if issubclass(InlineResponse2012, dict): + if issubclass(Body16, dict): for key, value in self.items(): result[key] = value @@ -100,11 +110,14 @@ class InlineResponse2012(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2012): + if not isinstance(other, Body16): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body16): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body17.py b/sdk/python/sdk/zrok/zrok_api/models/body17.py new file mode 100644 index 00000000..c3f6a8c8 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body17.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body17(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'organization_token': 'str', + 'email': 'str', + 'admin': 'bool' + } + + attribute_map = { + 'organization_token': 'organizationToken', + 'email': 'email', + 'admin': 'admin' + } + + def __init__(self, organization_token=None, email=None, admin=None, _configuration=None): # noqa: E501 + """Body17 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._organization_token = None + self._email = None + self._admin = None + self.discriminator = None + + if organization_token is not None: + self.organization_token = organization_token + if email is not None: + self.email = email + if admin is not None: + self.admin = admin + + @property + def organization_token(self): + """Gets the organization_token of this Body17. # noqa: E501 + + + :return: The organization_token of this Body17. # noqa: E501 + :rtype: str + """ + return self._organization_token + + @organization_token.setter + def organization_token(self, organization_token): + """Sets the organization_token of this Body17. + + + :param organization_token: The organization_token of this Body17. # noqa: E501 + :type: str + """ + + self._organization_token = organization_token + + @property + def email(self): + """Gets the email of this Body17. # noqa: E501 + + + :return: The email of this Body17. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Body17. + + + :param email: The email of this Body17. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def admin(self): + """Gets the admin of this Body17. # noqa: E501 + + + :return: The admin of this Body17. # noqa: E501 + :rtype: bool + """ + return self._admin + + @admin.setter + def admin(self, admin): + """Sets the admin of this Body17. + + + :param admin: The admin of this Body17. # noqa: E501 + :type: bool + """ + + self._admin = admin + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body17, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body17): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body17): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body18.py b/sdk/python/sdk/zrok/zrok_api/models/body18.py new file mode 100644 index 00000000..24264efd --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body18.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body18(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'organization_token': 'str' + } + + attribute_map = { + 'organization_token': 'organizationToken' + } + + def __init__(self, organization_token=None, _configuration=None): # noqa: E501 + """Body18 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._organization_token = None + self.discriminator = None + + if organization_token is not None: + self.organization_token = organization_token + + @property + def organization_token(self): + """Gets the organization_token of this Body18. # noqa: E501 + + + :return: The organization_token of this Body18. # noqa: E501 + :rtype: str + """ + return self._organization_token + + @organization_token.setter + def organization_token(self, organization_token): + """Sets the organization_token of this Body18. + + + :param organization_token: The organization_token of this Body18. # noqa: E501 + :type: str + """ + + self._organization_token = organization_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body18, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body18): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body18): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body19.py b/sdk/python/sdk/zrok/zrok_api/models/body19.py new file mode 100644 index 00000000..1ca823ed --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body19.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body19(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'organization_token': 'str', + 'email': 'str' + } + + attribute_map = { + 'organization_token': 'organizationToken', + 'email': 'email' + } + + def __init__(self, organization_token=None, email=None, _configuration=None): # noqa: E501 + """Body19 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._organization_token = None + self._email = None + self.discriminator = None + + if organization_token is not None: + self.organization_token = organization_token + if email is not None: + self.email = email + + @property + def organization_token(self): + """Gets the organization_token of this Body19. # noqa: E501 + + + :return: The organization_token of this Body19. # noqa: E501 + :rtype: str + """ + return self._organization_token + + @organization_token.setter + def organization_token(self, organization_token): + """Sets the organization_token of this Body19. + + + :param organization_token: The organization_token of this Body19. # noqa: E501 + :type: str + """ + + self._organization_token = organization_token + + @property + def email(self): + """Gets the email of this Body19. # noqa: E501 + + + :return: The email of this Body19. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Body19. + + + :param email: The email of this Body19. # noqa: E501 + :type: str + """ + + self._email = email + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body19, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body19): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body19): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body2.py b/sdk/python/sdk/zrok/zrok_api/models/body2.py new file mode 100644 index 00000000..65befe3f --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body2.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'password': 'str' + } + + attribute_map = { + 'email': 'email', + 'password': 'password' + } + + def __init__(self, email=None, password=None, _configuration=None): # noqa: E501 + """Body2 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email = None + self._password = None + self.discriminator = None + + if email is not None: + self.email = email + if password is not None: + self.password = password + + @property + def email(self): + """Gets the email of this Body2. # noqa: E501 + + + :return: The email of this Body2. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Body2. + + + :param email: The email of this Body2. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def password(self): + """Gets the password of this Body2. # noqa: E501 + + + :return: The password of this Body2. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this Body2. + + + :param password: The password of this Body2. # noqa: E501 + :type: str + """ + + self._password = password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body2): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body2): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body20.py b/sdk/python/sdk/zrok/zrok_api/models/body20.py new file mode 100644 index 00000000..af02cdc4 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body20.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body20(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'host': 'str' + } + + attribute_map = { + 'description': 'description', + 'host': 'host' + } + + def __init__(self, description=None, host=None, _configuration=None): # noqa: E501 + """Body20 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._description = None + self._host = None + self.discriminator = None + + if description is not None: + self.description = description + if host is not None: + self.host = host + + @property + def description(self): + """Gets the description of this Body20. # noqa: E501 + + + :return: The description of this Body20. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Body20. + + + :param description: The description of this Body20. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def host(self): + """Gets the host of this Body20. # noqa: E501 + + + :return: The host of this Body20. # noqa: E501 + :rtype: str + """ + return self._host + + @host.setter + def host(self, host): + """Sets the host of this Body20. + + + :param host: The host of this Body20. # noqa: E501 + :type: str + """ + + self._host = host + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body20, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body20): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body20): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body21.py b/sdk/python/sdk/zrok/zrok_api/models/body21.py new file mode 100644 index 00000000..4096aa16 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body21.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body21(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'identity': 'str' + } + + attribute_map = { + 'identity': 'identity' + } + + def __init__(self, identity=None, _configuration=None): # noqa: E501 + """Body21 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._identity = None + self.discriminator = None + + if identity is not None: + self.identity = identity + + @property + def identity(self): + """Gets the identity of this Body21. # noqa: E501 + + + :return: The identity of this Body21. # noqa: E501 + :rtype: str + """ + return self._identity + + @identity.setter + def identity(self, identity): + """Sets the identity of this Body21. + + + :param identity: The identity of this Body21. # noqa: E501 + :type: str + """ + + self._identity = identity + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body21, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body21): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body21): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py b/sdk/python/sdk/zrok/zrok_api/models/body22.py similarity index 74% rename from sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py rename to sdk/python/sdk/zrok/zrok_api/models/body22.py index 9aae0f54..f4b1e9b4 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body22.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class ClientVersionCheckBody(object): +from zrok_api.configuration import Configuration + + +class Body22(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -35,29 +40,34 @@ class ClientVersionCheckBody(object): 'client_version': 'clientVersion' } - def __init__(self, client_version=None): # noqa: E501 - """ClientVersionCheckBody - a model defined in Swagger""" # noqa: E501 + def __init__(self, client_version=None, _configuration=None): # noqa: E501 + """Body22 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._client_version = None self.discriminator = None + if client_version is not None: self.client_version = client_version @property def client_version(self): - """Gets the client_version of this ClientVersionCheckBody. # noqa: E501 + """Gets the client_version of this Body22. # noqa: E501 - :return: The client_version of this ClientVersionCheckBody. # noqa: E501 + :return: The client_version of this Body22. # noqa: E501 :rtype: str """ return self._client_version @client_version.setter def client_version(self, client_version): - """Sets the client_version of this ClientVersionCheckBody. + """Sets the client_version of this Body22. - :param client_version: The client_version of this ClientVersionCheckBody. # noqa: E501 + :param client_version: The client_version of this Body22. # noqa: E501 :type: str """ @@ -84,7 +94,7 @@ class ClientVersionCheckBody(object): )) else: result[attr] = value - if issubclass(ClientVersionCheckBody, dict): + if issubclass(Body22, dict): for key, value in self.items(): result[key] = value @@ -100,11 +110,14 @@ class ClientVersionCheckBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, ClientVersionCheckBody): + if not isinstance(other, Body22): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body22): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py b/sdk/python/sdk/zrok/zrok_api/models/body23.py similarity index 72% rename from sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py rename to sdk/python/sdk/zrok/zrok_api/models/body23.py index fd84ff20..03a151cf 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body23.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class SparklinesBody(object): +from zrok_api.configuration import Configuration + + +class Body23(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -39,12 +44,17 @@ class SparklinesBody(object): 'shares': 'shares' } - def __init__(self, account=None, environments=None, shares=None): # noqa: E501 - """SparklinesBody - a model defined in Swagger""" # noqa: E501 + def __init__(self, account=None, environments=None, shares=None, _configuration=None): # noqa: E501 + """Body23 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._account = None self._environments = None self._shares = None self.discriminator = None + if account is not None: self.account = account if environments is not None: @@ -54,20 +64,20 @@ class SparklinesBody(object): @property def account(self): - """Gets the account of this SparklinesBody. # noqa: E501 + """Gets the account of this Body23. # noqa: E501 - :return: The account of this SparklinesBody. # noqa: E501 + :return: The account of this Body23. # noqa: E501 :rtype: bool """ return self._account @account.setter def account(self, account): - """Sets the account of this SparklinesBody. + """Sets the account of this Body23. - :param account: The account of this SparklinesBody. # noqa: E501 + :param account: The account of this Body23. # noqa: E501 :type: bool """ @@ -75,20 +85,20 @@ class SparklinesBody(object): @property def environments(self): - """Gets the environments of this SparklinesBody. # noqa: E501 + """Gets the environments of this Body23. # noqa: E501 - :return: The environments of this SparklinesBody. # noqa: E501 + :return: The environments of this Body23. # noqa: E501 :rtype: list[str] """ return self._environments @environments.setter def environments(self, environments): - """Sets the environments of this SparklinesBody. + """Sets the environments of this Body23. - :param environments: The environments of this SparklinesBody. # noqa: E501 + :param environments: The environments of this Body23. # noqa: E501 :type: list[str] """ @@ -96,20 +106,20 @@ class SparklinesBody(object): @property def shares(self): - """Gets the shares of this SparklinesBody. # noqa: E501 + """Gets the shares of this Body23. # noqa: E501 - :return: The shares of this SparklinesBody. # noqa: E501 + :return: The shares of this Body23. # noqa: E501 :rtype: list[str] """ return self._shares @shares.setter def shares(self, shares): - """Sets the shares of this SparklinesBody. + """Sets the shares of this Body23. - :param shares: The shares of this SparklinesBody. # noqa: E501 + :param shares: The shares of this Body23. # noqa: E501 :type: list[str] """ @@ -136,7 +146,7 @@ class SparklinesBody(object): )) else: result[attr] = value - if issubclass(SparklinesBody, dict): + if issubclass(Body23, dict): for key, value in self.items(): result[key] = value @@ -152,11 +162,14 @@ class SparklinesBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, SparklinesBody): + if not isinstance(other, Body23): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body23): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_body.py b/sdk/python/sdk/zrok/zrok_api/models/body24.py similarity index 70% rename from sdk/python/sdk/zrok/zrok_api/models/access_body.py rename to sdk/python/sdk/zrok/zrok_api/models/body24.py index ca0ded7f..fdbb8713 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/access_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body24.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class AccessBody(object): +from zrok_api.configuration import Configuration + + +class Body24(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -41,13 +46,18 @@ class AccessBody(object): 'description': 'description' } - def __init__(self, env_zid=None, share_token=None, bind_address=None, description=None): # noqa: E501 - """AccessBody - a model defined in Swagger""" # noqa: E501 + def __init__(self, env_zid=None, share_token=None, bind_address=None, description=None, _configuration=None): # noqa: E501 + """Body24 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._env_zid = None self._share_token = None self._bind_address = None self._description = None self.discriminator = None + if env_zid is not None: self.env_zid = env_zid if share_token is not None: @@ -59,20 +69,20 @@ class AccessBody(object): @property def env_zid(self): - """Gets the env_zid of this AccessBody. # noqa: E501 + """Gets the env_zid of this Body24. # noqa: E501 - :return: The env_zid of this AccessBody. # noqa: E501 + :return: The env_zid of this Body24. # noqa: E501 :rtype: str """ return self._env_zid @env_zid.setter def env_zid(self, env_zid): - """Sets the env_zid of this AccessBody. + """Sets the env_zid of this Body24. - :param env_zid: The env_zid of this AccessBody. # noqa: E501 + :param env_zid: The env_zid of this Body24. # noqa: E501 :type: str """ @@ -80,20 +90,20 @@ class AccessBody(object): @property def share_token(self): - """Gets the share_token of this AccessBody. # noqa: E501 + """Gets the share_token of this Body24. # noqa: E501 - :return: The share_token of this AccessBody. # noqa: E501 + :return: The share_token of this Body24. # noqa: E501 :rtype: str """ return self._share_token @share_token.setter def share_token(self, share_token): - """Sets the share_token of this AccessBody. + """Sets the share_token of this Body24. - :param share_token: The share_token of this AccessBody. # noqa: E501 + :param share_token: The share_token of this Body24. # noqa: E501 :type: str """ @@ -101,20 +111,20 @@ class AccessBody(object): @property def bind_address(self): - """Gets the bind_address of this AccessBody. # noqa: E501 + """Gets the bind_address of this Body24. # noqa: E501 - :return: The bind_address of this AccessBody. # noqa: E501 + :return: The bind_address of this Body24. # noqa: E501 :rtype: str """ return self._bind_address @bind_address.setter def bind_address(self, bind_address): - """Sets the bind_address of this AccessBody. + """Sets the bind_address of this Body24. - :param bind_address: The bind_address of this AccessBody. # noqa: E501 + :param bind_address: The bind_address of this Body24. # noqa: E501 :type: str """ @@ -122,20 +132,20 @@ class AccessBody(object): @property def description(self): - """Gets the description of this AccessBody. # noqa: E501 + """Gets the description of this Body24. # noqa: E501 - :return: The description of this AccessBody. # noqa: E501 + :return: The description of this Body24. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): - """Sets the description of this AccessBody. + """Sets the description of this Body24. - :param description: The description of this AccessBody. # noqa: E501 + :param description: The description of this Body24. # noqa: E501 :type: str """ @@ -162,7 +172,7 @@ class AccessBody(object): )) else: result[attr] = value - if issubclass(AccessBody, dict): + if issubclass(Body24, dict): for key, value in self.items(): result[key] = value @@ -178,11 +188,14 @@ class AccessBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, AccessBody): + if not isinstance(other, Body24): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body24): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_body1.py b/sdk/python/sdk/zrok/zrok_api/models/body25.py similarity index 72% rename from sdk/python/sdk/zrok/zrok_api/models/access_body1.py rename to sdk/python/sdk/zrok/zrok_api/models/body25.py index 97855ec4..c325ac35 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/access_body1.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body25.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class AccessBody1(object): +from zrok_api.configuration import Configuration + + +class Body25(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -39,12 +44,17 @@ class AccessBody1(object): 'description': 'description' } - def __init__(self, frontend_token=None, bind_address=None, description=None): # noqa: E501 - """AccessBody1 - a model defined in Swagger""" # noqa: E501 + def __init__(self, frontend_token=None, bind_address=None, description=None, _configuration=None): # noqa: E501 + """Body25 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._frontend_token = None self._bind_address = None self._description = None self.discriminator = None + if frontend_token is not None: self.frontend_token = frontend_token if bind_address is not None: @@ -54,20 +64,20 @@ class AccessBody1(object): @property def frontend_token(self): - """Gets the frontend_token of this AccessBody1. # noqa: E501 + """Gets the frontend_token of this Body25. # noqa: E501 - :return: The frontend_token of this AccessBody1. # noqa: E501 + :return: The frontend_token of this Body25. # noqa: E501 :rtype: str """ return self._frontend_token @frontend_token.setter def frontend_token(self, frontend_token): - """Sets the frontend_token of this AccessBody1. + """Sets the frontend_token of this Body25. - :param frontend_token: The frontend_token of this AccessBody1. # noqa: E501 + :param frontend_token: The frontend_token of this Body25. # noqa: E501 :type: str """ @@ -75,20 +85,20 @@ class AccessBody1(object): @property def bind_address(self): - """Gets the bind_address of this AccessBody1. # noqa: E501 + """Gets the bind_address of this Body25. # noqa: E501 - :return: The bind_address of this AccessBody1. # noqa: E501 + :return: The bind_address of this Body25. # noqa: E501 :rtype: str """ return self._bind_address @bind_address.setter def bind_address(self, bind_address): - """Sets the bind_address of this AccessBody1. + """Sets the bind_address of this Body25. - :param bind_address: The bind_address of this AccessBody1. # noqa: E501 + :param bind_address: The bind_address of this Body25. # noqa: E501 :type: str """ @@ -96,20 +106,20 @@ class AccessBody1(object): @property def description(self): - """Gets the description of this AccessBody1. # noqa: E501 + """Gets the description of this Body25. # noqa: E501 - :return: The description of this AccessBody1. # noqa: E501 + :return: The description of this Body25. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): - """Sets the description of this AccessBody1. + """Sets the description of this Body25. - :param description: The description of this AccessBody1. # noqa: E501 + :param description: The description of this Body25. # noqa: E501 :type: str """ @@ -136,7 +146,7 @@ class AccessBody1(object): )) else: result[attr] = value - if issubclass(AccessBody1, dict): + if issubclass(Body25, dict): for key, value in self.items(): result[key] = value @@ -152,11 +162,14 @@ class AccessBody1(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, AccessBody1): + if not isinstance(other, Body25): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body25): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_body.py b/sdk/python/sdk/zrok/zrok_api/models/body26.py similarity index 74% rename from sdk/python/sdk/zrok/zrok_api/models/share_body.py rename to sdk/python/sdk/zrok/zrok_api/models/body26.py index f8398b70..05eb4fa1 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body26.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class ShareBody(object): +from zrok_api.configuration import Configuration + + +class Body26(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -41,13 +46,18 @@ class ShareBody(object): 'remove_access_grants': 'removeAccessGrants' } - def __init__(self, share_token=None, backend_proxy_endpoint=None, add_access_grants=None, remove_access_grants=None): # noqa: E501 - """ShareBody - a model defined in Swagger""" # noqa: E501 + def __init__(self, share_token=None, backend_proxy_endpoint=None, add_access_grants=None, remove_access_grants=None, _configuration=None): # noqa: E501 + """Body26 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._share_token = None self._backend_proxy_endpoint = None self._add_access_grants = None self._remove_access_grants = None self.discriminator = None + if share_token is not None: self.share_token = share_token if backend_proxy_endpoint is not None: @@ -59,20 +69,20 @@ class ShareBody(object): @property def share_token(self): - """Gets the share_token of this ShareBody. # noqa: E501 + """Gets the share_token of this Body26. # noqa: E501 - :return: The share_token of this ShareBody. # noqa: E501 + :return: The share_token of this Body26. # noqa: E501 :rtype: str """ return self._share_token @share_token.setter def share_token(self, share_token): - """Sets the share_token of this ShareBody. + """Sets the share_token of this Body26. - :param share_token: The share_token of this ShareBody. # noqa: E501 + :param share_token: The share_token of this Body26. # noqa: E501 :type: str """ @@ -80,20 +90,20 @@ class ShareBody(object): @property def backend_proxy_endpoint(self): - """Gets the backend_proxy_endpoint of this ShareBody. # noqa: E501 + """Gets the backend_proxy_endpoint of this Body26. # noqa: E501 - :return: The backend_proxy_endpoint of this ShareBody. # noqa: E501 + :return: The backend_proxy_endpoint of this Body26. # noqa: E501 :rtype: str """ return self._backend_proxy_endpoint @backend_proxy_endpoint.setter def backend_proxy_endpoint(self, backend_proxy_endpoint): - """Sets the backend_proxy_endpoint of this ShareBody. + """Sets the backend_proxy_endpoint of this Body26. - :param backend_proxy_endpoint: The backend_proxy_endpoint of this ShareBody. # noqa: E501 + :param backend_proxy_endpoint: The backend_proxy_endpoint of this Body26. # noqa: E501 :type: str """ @@ -101,20 +111,20 @@ class ShareBody(object): @property def add_access_grants(self): - """Gets the add_access_grants of this ShareBody. # noqa: E501 + """Gets the add_access_grants of this Body26. # noqa: E501 - :return: The add_access_grants of this ShareBody. # noqa: E501 + :return: The add_access_grants of this Body26. # noqa: E501 :rtype: list[str] """ return self._add_access_grants @add_access_grants.setter def add_access_grants(self, add_access_grants): - """Sets the add_access_grants of this ShareBody. + """Sets the add_access_grants of this Body26. - :param add_access_grants: The add_access_grants of this ShareBody. # noqa: E501 + :param add_access_grants: The add_access_grants of this Body26. # noqa: E501 :type: list[str] """ @@ -122,20 +132,20 @@ class ShareBody(object): @property def remove_access_grants(self): - """Gets the remove_access_grants of this ShareBody. # noqa: E501 + """Gets the remove_access_grants of this Body26. # noqa: E501 - :return: The remove_access_grants of this ShareBody. # noqa: E501 + :return: The remove_access_grants of this Body26. # noqa: E501 :rtype: list[str] """ return self._remove_access_grants @remove_access_grants.setter def remove_access_grants(self, remove_access_grants): - """Sets the remove_access_grants of this ShareBody. + """Sets the remove_access_grants of this Body26. - :param remove_access_grants: The remove_access_grants of this ShareBody. # noqa: E501 + :param remove_access_grants: The remove_access_grants of this Body26. # noqa: E501 :type: list[str] """ @@ -162,7 +172,7 @@ class ShareBody(object): )) else: result[attr] = value - if issubclass(ShareBody, dict): + if issubclass(Body26, dict): for key, value in self.items(): result[key] = value @@ -178,11 +188,14 @@ class ShareBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, ShareBody): + if not isinstance(other, Body26): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body26): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py b/sdk/python/sdk/zrok/zrok_api/models/body27.py similarity index 72% rename from sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py rename to sdk/python/sdk/zrok/zrok_api/models/body27.py index 77321334..4c0ea84f 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body27.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class UnaccessBody(object): +from zrok_api.configuration import Configuration + + +class Body27(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -39,12 +44,17 @@ class UnaccessBody(object): 'share_token': 'shareToken' } - def __init__(self, frontend_token=None, env_zid=None, share_token=None): # noqa: E501 - """UnaccessBody - a model defined in Swagger""" # noqa: E501 + def __init__(self, frontend_token=None, env_zid=None, share_token=None, _configuration=None): # noqa: E501 + """Body27 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._frontend_token = None self._env_zid = None self._share_token = None self.discriminator = None + if frontend_token is not None: self.frontend_token = frontend_token if env_zid is not None: @@ -54,20 +64,20 @@ class UnaccessBody(object): @property def frontend_token(self): - """Gets the frontend_token of this UnaccessBody. # noqa: E501 + """Gets the frontend_token of this Body27. # noqa: E501 - :return: The frontend_token of this UnaccessBody. # noqa: E501 + :return: The frontend_token of this Body27. # noqa: E501 :rtype: str """ return self._frontend_token @frontend_token.setter def frontend_token(self, frontend_token): - """Sets the frontend_token of this UnaccessBody. + """Sets the frontend_token of this Body27. - :param frontend_token: The frontend_token of this UnaccessBody. # noqa: E501 + :param frontend_token: The frontend_token of this Body27. # noqa: E501 :type: str """ @@ -75,20 +85,20 @@ class UnaccessBody(object): @property def env_zid(self): - """Gets the env_zid of this UnaccessBody. # noqa: E501 + """Gets the env_zid of this Body27. # noqa: E501 - :return: The env_zid of this UnaccessBody. # noqa: E501 + :return: The env_zid of this Body27. # noqa: E501 :rtype: str """ return self._env_zid @env_zid.setter def env_zid(self, env_zid): - """Sets the env_zid of this UnaccessBody. + """Sets the env_zid of this Body27. - :param env_zid: The env_zid of this UnaccessBody. # noqa: E501 + :param env_zid: The env_zid of this Body27. # noqa: E501 :type: str """ @@ -96,20 +106,20 @@ class UnaccessBody(object): @property def share_token(self): - """Gets the share_token of this UnaccessBody. # noqa: E501 + """Gets the share_token of this Body27. # noqa: E501 - :return: The share_token of this UnaccessBody. # noqa: E501 + :return: The share_token of this Body27. # noqa: E501 :rtype: str """ return self._share_token @share_token.setter def share_token(self, share_token): - """Sets the share_token of this UnaccessBody. + """Sets the share_token of this Body27. - :param share_token: The share_token of this UnaccessBody. # noqa: E501 + :param share_token: The share_token of this Body27. # noqa: E501 :type: str """ @@ -136,7 +146,7 @@ class UnaccessBody(object): )) else: result[attr] = value - if issubclass(UnaccessBody, dict): + if issubclass(Body27, dict): for key, value in self.items(): result[key] = value @@ -152,11 +162,14 @@ class UnaccessBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, UnaccessBody): + if not isinstance(other, Body27): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body27): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/unshare_body.py b/sdk/python/sdk/zrok/zrok_api/models/body28.py similarity index 72% rename from sdk/python/sdk/zrok/zrok_api/models/unshare_body.py rename to sdk/python/sdk/zrok/zrok_api/models/body28.py index e6463475..567c40f0 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/unshare_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body28.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class UnshareBody(object): +from zrok_api.configuration import Configuration + + +class Body28(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -39,12 +44,17 @@ class UnshareBody(object): 'reserved': 'reserved' } - def __init__(self, env_zid=None, share_token=None, reserved=None): # noqa: E501 - """UnshareBody - a model defined in Swagger""" # noqa: E501 + def __init__(self, env_zid=None, share_token=None, reserved=None, _configuration=None): # noqa: E501 + """Body28 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._env_zid = None self._share_token = None self._reserved = None self.discriminator = None + if env_zid is not None: self.env_zid = env_zid if share_token is not None: @@ -54,20 +64,20 @@ class UnshareBody(object): @property def env_zid(self): - """Gets the env_zid of this UnshareBody. # noqa: E501 + """Gets the env_zid of this Body28. # noqa: E501 - :return: The env_zid of this UnshareBody. # noqa: E501 + :return: The env_zid of this Body28. # noqa: E501 :rtype: str """ return self._env_zid @env_zid.setter def env_zid(self, env_zid): - """Sets the env_zid of this UnshareBody. + """Sets the env_zid of this Body28. - :param env_zid: The env_zid of this UnshareBody. # noqa: E501 + :param env_zid: The env_zid of this Body28. # noqa: E501 :type: str """ @@ -75,20 +85,20 @@ class UnshareBody(object): @property def share_token(self): - """Gets the share_token of this UnshareBody. # noqa: E501 + """Gets the share_token of this Body28. # noqa: E501 - :return: The share_token of this UnshareBody. # noqa: E501 + :return: The share_token of this Body28. # noqa: E501 :rtype: str """ return self._share_token @share_token.setter def share_token(self, share_token): - """Sets the share_token of this UnshareBody. + """Sets the share_token of this Body28. - :param share_token: The share_token of this UnshareBody. # noqa: E501 + :param share_token: The share_token of this Body28. # noqa: E501 :type: str """ @@ -96,20 +106,20 @@ class UnshareBody(object): @property def reserved(self): - """Gets the reserved of this UnshareBody. # noqa: E501 + """Gets the reserved of this Body28. # noqa: E501 - :return: The reserved of this UnshareBody. # noqa: E501 + :return: The reserved of this Body28. # noqa: E501 :rtype: bool """ return self._reserved @reserved.setter def reserved(self, reserved): - """Sets the reserved of this UnshareBody. + """Sets the reserved of this Body28. - :param reserved: The reserved of this UnshareBody. # noqa: E501 + :param reserved: The reserved of this Body28. # noqa: E501 :type: bool """ @@ -136,7 +146,7 @@ class UnshareBody(object): )) else: result[attr] = value - if issubclass(UnshareBody, dict): + if issubclass(Body28, dict): for key, value in self.items(): result[key] = value @@ -152,11 +162,14 @@ class UnshareBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, UnshareBody): + if not isinstance(other, Body28): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body28): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body3.py b/sdk/python/sdk/zrok/zrok_api/models/body3.py new file mode 100644 index 00000000..f878a09a --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body3.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body3(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email_address': 'str' + } + + attribute_map = { + 'email_address': 'emailAddress' + } + + def __init__(self, email_address=None, _configuration=None): # noqa: E501 + """Body3 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email_address = None + self.discriminator = None + + if email_address is not None: + self.email_address = email_address + + @property + def email_address(self): + """Gets the email_address of this Body3. # noqa: E501 + + + :return: The email_address of this Body3. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this Body3. + + + :param email_address: The email_address of this Body3. # noqa: E501 + :type: str + """ + + self._email_address = email_address + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body3, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body3): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body3): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/register_body.py b/sdk/python/sdk/zrok/zrok_api/models/body4.py similarity index 72% rename from sdk/python/sdk/zrok/zrok_api/models/register_body.py rename to sdk/python/sdk/zrok/zrok_api/models/body4.py index 80549446..3e9edac8 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/register_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body4.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class RegisterBody(object): +from zrok_api.configuration import Configuration + + +class Body4(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -37,11 +42,16 @@ class RegisterBody(object): 'password': 'password' } - def __init__(self, register_token=None, password=None): # noqa: E501 - """RegisterBody - a model defined in Swagger""" # noqa: E501 + def __init__(self, register_token=None, password=None, _configuration=None): # noqa: E501 + """Body4 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._register_token = None self._password = None self.discriminator = None + if register_token is not None: self.register_token = register_token if password is not None: @@ -49,20 +59,20 @@ class RegisterBody(object): @property def register_token(self): - """Gets the register_token of this RegisterBody. # noqa: E501 + """Gets the register_token of this Body4. # noqa: E501 - :return: The register_token of this RegisterBody. # noqa: E501 + :return: The register_token of this Body4. # noqa: E501 :rtype: str """ return self._register_token @register_token.setter def register_token(self, register_token): - """Sets the register_token of this RegisterBody. + """Sets the register_token of this Body4. - :param register_token: The register_token of this RegisterBody. # noqa: E501 + :param register_token: The register_token of this Body4. # noqa: E501 :type: str """ @@ -70,20 +80,20 @@ class RegisterBody(object): @property def password(self): - """Gets the password of this RegisterBody. # noqa: E501 + """Gets the password of this Body4. # noqa: E501 - :return: The password of this RegisterBody. # noqa: E501 + :return: The password of this Body4. # noqa: E501 :rtype: str """ return self._password @password.setter def password(self, password): - """Sets the password of this RegisterBody. + """Sets the password of this Body4. - :param password: The password of this RegisterBody. # noqa: E501 + :param password: The password of this Body4. # noqa: E501 :type: str """ @@ -110,7 +120,7 @@ class RegisterBody(object): )) else: result[attr] = value - if issubclass(RegisterBody, dict): + if issubclass(Body4, dict): for key, value in self.items(): result[key] = value @@ -126,11 +136,14 @@ class RegisterBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RegisterBody): + if not isinstance(other, Body4): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body4): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py b/sdk/python/sdk/zrok/zrok_api/models/body5.py similarity index 73% rename from sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py rename to sdk/python/sdk/zrok/zrok_api/models/body5.py index 0dbc086a..49b80ca3 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body5.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class ResetPasswordBody(object): +from zrok_api.configuration import Configuration + + +class Body5(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -37,11 +42,16 @@ class ResetPasswordBody(object): 'password': 'password' } - def __init__(self, reset_token=None, password=None): # noqa: E501 - """ResetPasswordBody - a model defined in Swagger""" # noqa: E501 + def __init__(self, reset_token=None, password=None, _configuration=None): # noqa: E501 + """Body5 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._reset_token = None self._password = None self.discriminator = None + if reset_token is not None: self.reset_token = reset_token if password is not None: @@ -49,20 +59,20 @@ class ResetPasswordBody(object): @property def reset_token(self): - """Gets the reset_token of this ResetPasswordBody. # noqa: E501 + """Gets the reset_token of this Body5. # noqa: E501 - :return: The reset_token of this ResetPasswordBody. # noqa: E501 + :return: The reset_token of this Body5. # noqa: E501 :rtype: str """ return self._reset_token @reset_token.setter def reset_token(self, reset_token): - """Sets the reset_token of this ResetPasswordBody. + """Sets the reset_token of this Body5. - :param reset_token: The reset_token of this ResetPasswordBody. # noqa: E501 + :param reset_token: The reset_token of this Body5. # noqa: E501 :type: str """ @@ -70,20 +80,20 @@ class ResetPasswordBody(object): @property def password(self): - """Gets the password of this ResetPasswordBody. # noqa: E501 + """Gets the password of this Body5. # noqa: E501 - :return: The password of this ResetPasswordBody. # noqa: E501 + :return: The password of this Body5. # noqa: E501 :rtype: str """ return self._password @password.setter def password(self, password): - """Sets the password of this ResetPasswordBody. + """Sets the password of this Body5. - :param password: The password of this ResetPasswordBody. # noqa: E501 + :param password: The password of this Body5. # noqa: E501 :type: str """ @@ -110,7 +120,7 @@ class ResetPasswordBody(object): )) else: result[attr] = value - if issubclass(ResetPasswordBody, dict): + if issubclass(Body5, dict): for key, value in self.items(): result[key] = value @@ -126,11 +136,14 @@ class ResetPasswordBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, ResetPasswordBody): + if not isinstance(other, Body5): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body5): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body6.py b/sdk/python/sdk/zrok/zrok_api/models/body6.py new file mode 100644 index 00000000..bfbfe86a --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body6.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body6(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email_address': 'str' + } + + attribute_map = { + 'email_address': 'emailAddress' + } + + def __init__(self, email_address=None, _configuration=None): # noqa: E501 + """Body6 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email_address = None + self.discriminator = None + + if email_address is not None: + self.email_address = email_address + + @property + def email_address(self): + """Gets the email_address of this Body6. # noqa: E501 + + + :return: The email_address of this Body6. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this Body6. + + + :param email_address: The email_address of this Body6. # noqa: E501 + :type: str + """ + + self._email_address = email_address + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body6, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body6): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body6): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify_body.py b/sdk/python/sdk/zrok/zrok_api/models/body7.py similarity index 74% rename from sdk/python/sdk/zrok/zrok_api/models/verify_body.py rename to sdk/python/sdk/zrok/zrok_api/models/body7.py index 26acf208..27643139 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/verify_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/body7.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six -class VerifyBody(object): +from zrok_api.configuration import Configuration + + +class Body7(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -35,29 +40,34 @@ class VerifyBody(object): 'register_token': 'registerToken' } - def __init__(self, register_token=None): # noqa: E501 - """VerifyBody - a model defined in Swagger""" # noqa: E501 + def __init__(self, register_token=None, _configuration=None): # noqa: E501 + """Body7 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._register_token = None self.discriminator = None + if register_token is not None: self.register_token = register_token @property def register_token(self): - """Gets the register_token of this VerifyBody. # noqa: E501 + """Gets the register_token of this Body7. # noqa: E501 - :return: The register_token of this VerifyBody. # noqa: E501 + :return: The register_token of this Body7. # noqa: E501 :rtype: str """ return self._register_token @register_token.setter def register_token(self, register_token): - """Sets the register_token of this VerifyBody. + """Sets the register_token of this Body7. - :param register_token: The register_token of this VerifyBody. # noqa: E501 + :param register_token: The register_token of this Body7. # noqa: E501 :type: str """ @@ -84,7 +94,7 @@ class VerifyBody(object): )) else: result[attr] = value - if issubclass(VerifyBody, dict): + if issubclass(Body7, dict): for key, value in self.items(): result[key] = value @@ -100,11 +110,14 @@ class VerifyBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, VerifyBody): + if not isinstance(other, Body7): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Body7): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body8.py b/sdk/python/sdk/zrok/zrok_api/models/body8.py new file mode 100644 index 00000000..e107a0d9 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body8.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body8(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'password': 'str' + } + + attribute_map = { + 'email': 'email', + 'password': 'password' + } + + def __init__(self, email=None, password=None, _configuration=None): # noqa: E501 + """Body8 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email = None + self._password = None + self.discriminator = None + + if email is not None: + self.email = email + if password is not None: + self.password = password + + @property + def email(self): + """Gets the email of this Body8. # noqa: E501 + + + :return: The email of this Body8. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this Body8. + + + :param email: The email of this Body8. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def password(self): + """Gets the password of this Body8. # noqa: E501 + + + :return: The password of this Body8. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this Body8. + + + :param password: The password of this Body8. # noqa: E501 + :type: str + """ + + self._password = password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body8, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body8): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body8): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body9.py b/sdk/python/sdk/zrok/zrok_api/models/body9.py new file mode 100644 index 00000000..9da87bc7 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/body9.py @@ -0,0 +1,208 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from zrok_api.configuration import Configuration + + +class Body9(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'z_id': 'str', + 'url_template': 'str', + 'public_name': 'str', + 'permission_mode': 'str' + } + + attribute_map = { + 'z_id': 'zId', + 'url_template': 'url_template', + 'public_name': 'public_name', + 'permission_mode': 'permissionMode' + } + + def __init__(self, z_id=None, url_template=None, public_name=None, permission_mode=None, _configuration=None): # noqa: E501 + """Body9 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._z_id = None + self._url_template = None + self._public_name = None + self._permission_mode = None + self.discriminator = None + + if z_id is not None: + self.z_id = z_id + if url_template is not None: + self.url_template = url_template + if public_name is not None: + self.public_name = public_name + if permission_mode is not None: + self.permission_mode = permission_mode + + @property + def z_id(self): + """Gets the z_id of this Body9. # noqa: E501 + + + :return: The z_id of this Body9. # noqa: E501 + :rtype: str + """ + return self._z_id + + @z_id.setter + def z_id(self, z_id): + """Sets the z_id of this Body9. + + + :param z_id: The z_id of this Body9. # noqa: E501 + :type: str + """ + + self._z_id = z_id + + @property + def url_template(self): + """Gets the url_template of this Body9. # noqa: E501 + + + :return: The url_template of this Body9. # noqa: E501 + :rtype: str + """ + return self._url_template + + @url_template.setter + def url_template(self, url_template): + """Sets the url_template of this Body9. + + + :param url_template: The url_template of this Body9. # noqa: E501 + :type: str + """ + + self._url_template = url_template + + @property + def public_name(self): + """Gets the public_name of this Body9. # noqa: E501 + + + :return: The public_name of this Body9. # noqa: E501 + :rtype: str + """ + return self._public_name + + @public_name.setter + def public_name(self, public_name): + """Sets the public_name of this Body9. + + + :param public_name: The public_name of this Body9. # noqa: E501 + :type: str + """ + + self._public_name = public_name + + @property + def permission_mode(self): + """Gets the permission_mode of this Body9. # noqa: E501 + + + :return: The permission_mode of this Body9. # noqa: E501 + :rtype: str + """ + return self._permission_mode + + @permission_mode.setter + def permission_mode(self, permission_mode): + """Sets the permission_mode of this Body9. + + + :param permission_mode: The permission_mode of this Body9. # noqa: E501 + :type: str + """ + allowed_values = ["open", "closed"] # noqa: E501 + if (self._configuration.client_side_validation and + permission_mode not in allowed_values): + raise ValueError( + "Invalid value for `permission_mode` ({0}), must be one of {1}" # noqa: E501 + .format(permission_mode, allowed_values) + ) + + self._permission_mode = permission_mode + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Body9, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body9): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Body9): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/change_password_body.py b/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py similarity index 77% rename from sdk/python/sdk/zrok/zrok_api/models/change_password_body.py rename to sdk/python/sdk/zrok/zrok_api/models/change_password_request.py index 8c12afb1..fe3f4862 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/change_password_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class ChangePasswordBody(object): +class ChangePasswordRequest(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -40,7 +40,7 @@ class ChangePasswordBody(object): } def __init__(self, email=None, old_password=None, new_password=None): # noqa: E501 - """ChangePasswordBody - a model defined in Swagger""" # noqa: E501 + """ChangePasswordRequest - a model defined in Swagger""" # noqa: E501 self._email = None self._old_password = None self._new_password = None @@ -54,20 +54,20 @@ class ChangePasswordBody(object): @property def email(self): - """Gets the email of this ChangePasswordBody. # noqa: E501 + """Gets the email of this ChangePasswordRequest. # noqa: E501 - :return: The email of this ChangePasswordBody. # noqa: E501 + :return: The email of this ChangePasswordRequest. # noqa: E501 :rtype: str """ return self._email @email.setter def email(self, email): - """Sets the email of this ChangePasswordBody. + """Sets the email of this ChangePasswordRequest. - :param email: The email of this ChangePasswordBody. # noqa: E501 + :param email: The email of this ChangePasswordRequest. # noqa: E501 :type: str """ @@ -75,20 +75,20 @@ class ChangePasswordBody(object): @property def old_password(self): - """Gets the old_password of this ChangePasswordBody. # noqa: E501 + """Gets the old_password of this ChangePasswordRequest. # noqa: E501 - :return: The old_password of this ChangePasswordBody. # noqa: E501 + :return: The old_password of this ChangePasswordRequest. # noqa: E501 :rtype: str """ return self._old_password @old_password.setter def old_password(self, old_password): - """Sets the old_password of this ChangePasswordBody. + """Sets the old_password of this ChangePasswordRequest. - :param old_password: The old_password of this ChangePasswordBody. # noqa: E501 + :param old_password: The old_password of this ChangePasswordRequest. # noqa: E501 :type: str """ @@ -96,20 +96,20 @@ class ChangePasswordBody(object): @property def new_password(self): - """Gets the new_password of this ChangePasswordBody. # noqa: E501 + """Gets the new_password of this ChangePasswordRequest. # noqa: E501 - :return: The new_password of this ChangePasswordBody. # noqa: E501 + :return: The new_password of this ChangePasswordRequest. # noqa: E501 :rtype: str """ return self._new_password @new_password.setter def new_password(self, new_password): - """Sets the new_password of this ChangePasswordBody. + """Sets the new_password of this ChangePasswordRequest. - :param new_password: The new_password of this ChangePasswordBody. # noqa: E501 + :param new_password: The new_password of this ChangePasswordRequest. # noqa: E501 :type: str """ @@ -136,7 +136,7 @@ class ChangePasswordBody(object): )) else: result[attr] = value - if issubclass(ChangePasswordBody, dict): + if issubclass(ChangePasswordRequest, dict): for key, value in self.items(): result[key] = value @@ -152,7 +152,7 @@ class ChangePasswordBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, ChangePasswordBody): + if not isinstance(other, ChangePasswordRequest): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/configuration.py b/sdk/python/sdk/zrok/zrok_api/models/configuration.py index 6f1f70b5..287e5e3b 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/configuration.py +++ b/sdk/python/sdk/zrok/zrok_api/models/configuration.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class Configuration(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -43,14 +48,19 @@ class Configuration(object): 'invite_token_contact': 'inviteTokenContact' } - def __init__(self, version=None, tou_link=None, invites_open=None, requires_invite_token=None, invite_token_contact=None): # noqa: E501 + def __init__(self, version=None, tou_link=None, invites_open=None, requires_invite_token=None, invite_token_contact=None, _configuration=None): # noqa: E501 """Configuration - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._version = None self._tou_link = None self._invites_open = None self._requires_invite_token = None self._invite_token_contact = None self.discriminator = None + if version is not None: self.version = version if tou_link is not None: @@ -207,8 +217,11 @@ class Configuration(object): if not isinstance(other, Configuration): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Configuration): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body.py b/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py similarity index 74% rename from sdk/python/sdk/zrok/zrok_api/models/frontend_body.py rename to sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py index 22f06aac..f6a0cf01 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class FrontendBody(object): +class CreateFrontendRequest(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -42,7 +42,7 @@ class FrontendBody(object): } def __init__(self, z_id=None, url_template=None, public_name=None, permission_mode=None): # noqa: E501 - """FrontendBody - a model defined in Swagger""" # noqa: E501 + """CreateFrontendRequest - a model defined in Swagger""" # noqa: E501 self._z_id = None self._url_template = None self._public_name = None @@ -59,20 +59,20 @@ class FrontendBody(object): @property def z_id(self): - """Gets the z_id of this FrontendBody. # noqa: E501 + """Gets the z_id of this CreateFrontendRequest. # noqa: E501 - :return: The z_id of this FrontendBody. # noqa: E501 + :return: The z_id of this CreateFrontendRequest. # noqa: E501 :rtype: str """ return self._z_id @z_id.setter def z_id(self, z_id): - """Sets the z_id of this FrontendBody. + """Sets the z_id of this CreateFrontendRequest. - :param z_id: The z_id of this FrontendBody. # noqa: E501 + :param z_id: The z_id of this CreateFrontendRequest. # noqa: E501 :type: str """ @@ -80,20 +80,20 @@ class FrontendBody(object): @property def url_template(self): - """Gets the url_template of this FrontendBody. # noqa: E501 + """Gets the url_template of this CreateFrontendRequest. # noqa: E501 - :return: The url_template of this FrontendBody. # noqa: E501 + :return: The url_template of this CreateFrontendRequest. # noqa: E501 :rtype: str """ return self._url_template @url_template.setter def url_template(self, url_template): - """Sets the url_template of this FrontendBody. + """Sets the url_template of this CreateFrontendRequest. - :param url_template: The url_template of this FrontendBody. # noqa: E501 + :param url_template: The url_template of this CreateFrontendRequest. # noqa: E501 :type: str """ @@ -101,20 +101,20 @@ class FrontendBody(object): @property def public_name(self): - """Gets the public_name of this FrontendBody. # noqa: E501 + """Gets the public_name of this CreateFrontendRequest. # noqa: E501 - :return: The public_name of this FrontendBody. # noqa: E501 + :return: The public_name of this CreateFrontendRequest. # noqa: E501 :rtype: str """ return self._public_name @public_name.setter def public_name(self, public_name): - """Sets the public_name of this FrontendBody. + """Sets the public_name of this CreateFrontendRequest. - :param public_name: The public_name of this FrontendBody. # noqa: E501 + :param public_name: The public_name of this CreateFrontendRequest. # noqa: E501 :type: str """ @@ -122,20 +122,20 @@ class FrontendBody(object): @property def permission_mode(self): - """Gets the permission_mode of this FrontendBody. # noqa: E501 + """Gets the permission_mode of this CreateFrontendRequest. # noqa: E501 - :return: The permission_mode of this FrontendBody. # noqa: E501 + :return: The permission_mode of this CreateFrontendRequest. # noqa: E501 :rtype: str """ return self._permission_mode @permission_mode.setter def permission_mode(self, permission_mode): - """Sets the permission_mode of this FrontendBody. + """Sets the permission_mode of this CreateFrontendRequest. - :param permission_mode: The permission_mode of this FrontendBody. # noqa: E501 + :param permission_mode: The permission_mode of this CreateFrontendRequest. # noqa: E501 :type: str """ allowed_values = ["open", "closed"] # noqa: E501 @@ -168,7 +168,7 @@ class FrontendBody(object): )) else: result[attr] = value - if issubclass(FrontendBody, dict): + if issubclass(CreateFrontendRequest, dict): for key, value in self.items(): result[key] = value @@ -184,7 +184,7 @@ class FrontendBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, FrontendBody): + if not isinstance(other, CreateFrontendRequest): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_frontend_response.py b/sdk/python/sdk/zrok/zrok_api/models/create_frontend_response.py new file mode 100644 index 00000000..d93e99ed --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/create_frontend_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class CreateFrontendResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'token': 'str' + } + + attribute_map = { + 'token': 'token' + } + + def __init__(self, token=None): # noqa: E501 + """CreateFrontendResponse - a model defined in Swagger""" # noqa: E501 + self._token = None + self.discriminator = None + if token is not None: + self.token = token + + @property + def token(self): + """Gets the token of this CreateFrontendResponse. # noqa: E501 + + + :return: The token of this CreateFrontendResponse. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this CreateFrontendResponse. + + + :param token: The token of this CreateFrontendResponse. # noqa: E501 + :type: str + """ + + self._token = token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateFrontendResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateFrontendResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py b/sdk/python/sdk/zrok/zrok_api/models/delete_frontend_request.py similarity index 81% rename from sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py rename to sdk/python/sdk/zrok/zrok_api/models/delete_frontend_request.py index 192f6785..c9b92bad 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py +++ b/sdk/python/sdk/zrok/zrok_api/models/delete_frontend_request.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class FrontendBody1(object): +class DeleteFrontendRequest(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -36,7 +36,7 @@ class FrontendBody1(object): } def __init__(self, frontend_token=None): # noqa: E501 - """FrontendBody1 - a model defined in Swagger""" # noqa: E501 + """DeleteFrontendRequest - a model defined in Swagger""" # noqa: E501 self._frontend_token = None self.discriminator = None if frontend_token is not None: @@ -44,20 +44,20 @@ class FrontendBody1(object): @property def frontend_token(self): - """Gets the frontend_token of this FrontendBody1. # noqa: E501 + """Gets the frontend_token of this DeleteFrontendRequest. # noqa: E501 - :return: The frontend_token of this FrontendBody1. # noqa: E501 + :return: The frontend_token of this DeleteFrontendRequest. # noqa: E501 :rtype: str """ return self._frontend_token @frontend_token.setter def frontend_token(self, frontend_token): - """Sets the frontend_token of this FrontendBody1. + """Sets the frontend_token of this DeleteFrontendRequest. - :param frontend_token: The frontend_token of this FrontendBody1. # noqa: E501 + :param frontend_token: The frontend_token of this DeleteFrontendRequest. # noqa: E501 :type: str """ @@ -84,7 +84,7 @@ class FrontendBody1(object): )) else: result[attr] = value - if issubclass(FrontendBody1, dict): + if issubclass(DeleteFrontendRequest, dict): for key, value in self.items(): result[key] = value @@ -100,7 +100,7 @@ class FrontendBody1(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, FrontendBody1): + if not isinstance(other, DeleteFrontendRequest): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/disable_body.py b/sdk/python/sdk/zrok/zrok_api/models/disable_request.py similarity index 83% rename from sdk/python/sdk/zrok/zrok_api/models/disable_body.py rename to sdk/python/sdk/zrok/zrok_api/models/disable_request.py index bfb40a4a..c0450256 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/disable_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/disable_request.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class DisableBody(object): +class DisableRequest(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -36,7 +36,7 @@ class DisableBody(object): } def __init__(self, identity=None): # noqa: E501 - """DisableBody - a model defined in Swagger""" # noqa: E501 + """DisableRequest - a model defined in Swagger""" # noqa: E501 self._identity = None self.discriminator = None if identity is not None: @@ -44,20 +44,20 @@ class DisableBody(object): @property def identity(self): - """Gets the identity of this DisableBody. # noqa: E501 + """Gets the identity of this DisableRequest. # noqa: E501 - :return: The identity of this DisableBody. # noqa: E501 + :return: The identity of this DisableRequest. # noqa: E501 :rtype: str """ return self._identity @identity.setter def identity(self, identity): - """Sets the identity of this DisableBody. + """Sets the identity of this DisableRequest. - :param identity: The identity of this DisableBody. # noqa: E501 + :param identity: The identity of this DisableRequest. # noqa: E501 :type: str """ @@ -84,7 +84,7 @@ class DisableBody(object): )) else: result[attr] = value - if issubclass(DisableBody, dict): + if issubclass(DisableRequest, dict): for key, value in self.items(): result[key] = value @@ -100,7 +100,7 @@ class DisableBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, DisableBody): + if not isinstance(other, DisableRequest): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/enable_body.py b/sdk/python/sdk/zrok/zrok_api/models/enable_request.py similarity index 79% rename from sdk/python/sdk/zrok/zrok_api/models/enable_body.py rename to sdk/python/sdk/zrok/zrok_api/models/enable_request.py index 49ac0279..6d35968f 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/enable_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/enable_request.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class EnableBody(object): +class EnableRequest(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -38,7 +38,7 @@ class EnableBody(object): } def __init__(self, description=None, host=None): # noqa: E501 - """EnableBody - a model defined in Swagger""" # noqa: E501 + """EnableRequest - a model defined in Swagger""" # noqa: E501 self._description = None self._host = None self.discriminator = None @@ -49,20 +49,20 @@ class EnableBody(object): @property def description(self): - """Gets the description of this EnableBody. # noqa: E501 + """Gets the description of this EnableRequest. # noqa: E501 - :return: The description of this EnableBody. # noqa: E501 + :return: The description of this EnableRequest. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): - """Sets the description of this EnableBody. + """Sets the description of this EnableRequest. - :param description: The description of this EnableBody. # noqa: E501 + :param description: The description of this EnableRequest. # noqa: E501 :type: str """ @@ -70,20 +70,20 @@ class EnableBody(object): @property def host(self): - """Gets the host of this EnableBody. # noqa: E501 + """Gets the host of this EnableRequest. # noqa: E501 - :return: The host of this EnableBody. # noqa: E501 + :return: The host of this EnableRequest. # noqa: E501 :rtype: str """ return self._host @host.setter def host(self, host): - """Sets the host of this EnableBody. + """Sets the host of this EnableRequest. - :param host: The host of this EnableBody. # noqa: E501 + :param host: The host of this EnableRequest. # noqa: E501 :type: str """ @@ -110,7 +110,7 @@ class EnableBody(object): )) else: result[attr] = value - if issubclass(EnableBody, dict): + if issubclass(EnableRequest, dict): for key, value in self.items(): result[key] = value @@ -126,7 +126,7 @@ class EnableBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, EnableBody): + if not isinstance(other, EnableRequest): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py b/sdk/python/sdk/zrok/zrok_api/models/enable_response.py similarity index 79% rename from sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py rename to sdk/python/sdk/zrok/zrok_api/models/enable_response.py index 9d80730a..66c8af2f 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py +++ b/sdk/python/sdk/zrok/zrok_api/models/enable_response.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class InlineResponse2011(object): +class EnableResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -38,7 +38,7 @@ class InlineResponse2011(object): } def __init__(self, identity=None, cfg=None): # noqa: E501 - """InlineResponse2011 - a model defined in Swagger""" # noqa: E501 + """EnableResponse - a model defined in Swagger""" # noqa: E501 self._identity = None self._cfg = None self.discriminator = None @@ -49,20 +49,20 @@ class InlineResponse2011(object): @property def identity(self): - """Gets the identity of this InlineResponse2011. # noqa: E501 + """Gets the identity of this EnableResponse. # noqa: E501 - :return: The identity of this InlineResponse2011. # noqa: E501 + :return: The identity of this EnableResponse. # noqa: E501 :rtype: str """ return self._identity @identity.setter def identity(self, identity): - """Sets the identity of this InlineResponse2011. + """Sets the identity of this EnableResponse. - :param identity: The identity of this InlineResponse2011. # noqa: E501 + :param identity: The identity of this EnableResponse. # noqa: E501 :type: str """ @@ -70,20 +70,20 @@ class InlineResponse2011(object): @property def cfg(self): - """Gets the cfg of this InlineResponse2011. # noqa: E501 + """Gets the cfg of this EnableResponse. # noqa: E501 - :return: The cfg of this InlineResponse2011. # noqa: E501 + :return: The cfg of this EnableResponse. # noqa: E501 :rtype: str """ return self._cfg @cfg.setter def cfg(self, cfg): - """Sets the cfg of this InlineResponse2011. + """Sets the cfg of this EnableResponse. - :param cfg: The cfg of this InlineResponse2011. # noqa: E501 + :param cfg: The cfg of this EnableResponse. # noqa: E501 :type: str """ @@ -110,7 +110,7 @@ class InlineResponse2011(object): )) else: result[attr] = value - if issubclass(InlineResponse2011, dict): + if issubclass(EnableResponse, dict): for key, value in self.items(): result[key] = value @@ -126,7 +126,7 @@ class InlineResponse2011(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2011): + if not isinstance(other, EnableResponse): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment.py b/sdk/python/sdk/zrok/zrok_api/models/environment.py index 53c85559..c62eae4d 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/environment.py +++ b/sdk/python/sdk/zrok/zrok_api/models/environment.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class Environment(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -49,8 +54,12 @@ class Environment(object): 'updated_at': 'updatedAt' } - def __init__(self, description=None, host=None, address=None, z_id=None, activity=None, limited=None, created_at=None, updated_at=None): # noqa: E501 + def __init__(self, description=None, host=None, address=None, z_id=None, activity=None, limited=None, created_at=None, updated_at=None, _configuration=None): # noqa: E501 """Environment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._description = None self._host = None self._address = None @@ -60,6 +69,7 @@ class Environment(object): self._created_at = None self._updated_at = None self.discriminator = None + if description is not None: self.description = description if host is not None: @@ -285,8 +295,11 @@ class Environment(object): if not isinstance(other, Environment): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Environment): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py b/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py index 12c466bb..08993437 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py +++ b/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class EnvironmentAndResources(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -39,12 +44,17 @@ class EnvironmentAndResources(object): 'shares': 'shares' } - def __init__(self, environment=None, frontends=None, shares=None): # noqa: E501 + def __init__(self, environment=None, frontends=None, shares=None, _configuration=None): # noqa: E501 """EnvironmentAndResources - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._environment = None self._frontends = None self._shares = None self.discriminator = None + if environment is not None: self.environment = environment if frontends is not None: @@ -155,8 +165,11 @@ class EnvironmentAndResources(object): if not isinstance(other, EnvironmentAndResources): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, EnvironmentAndResources): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/environments.py b/sdk/python/sdk/zrok/zrok_api/models/environments.py index e6d72d56..eb9d952b 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/environments.py +++ b/sdk/python/sdk/zrok/zrok_api/models/environments.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class Environments(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -33,8 +38,11 @@ class Environments(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, _configuration=None): # noqa: E501 """Environments - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -77,8 +85,11 @@ class Environments(object): if not isinstance(other, Environments): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Environments): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/error_message.py b/sdk/python/sdk/zrok/zrok_api/models/error_message.py index 19325187..2ab5490f 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/error_message.py +++ b/sdk/python/sdk/zrok/zrok_api/models/error_message.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class ErrorMessage(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -33,8 +38,11 @@ class ErrorMessage(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, _configuration=None): # noqa: E501 """ErrorMessage - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -77,8 +85,11 @@ class ErrorMessage(object): if not isinstance(other, ErrorMessage): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorMessage): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend.py b/sdk/python/sdk/zrok/zrok_api/models/frontend.py index 46cf93eb..2d344c7b 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend.py +++ b/sdk/python/sdk/zrok/zrok_api/models/frontend.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class Frontend(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -51,8 +56,12 @@ class Frontend(object): 'updated_at': 'updatedAt' } - def __init__(self, id=None, frontend_token=None, share_token=None, backend_mode=None, bind_address=None, description=None, z_id=None, created_at=None, updated_at=None): # noqa: E501 + def __init__(self, id=None, frontend_token=None, share_token=None, backend_mode=None, bind_address=None, description=None, z_id=None, created_at=None, updated_at=None, _configuration=None): # noqa: E501 """Frontend - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._id = None self._frontend_token = None self._share_token = None @@ -63,6 +72,7 @@ class Frontend(object): self._created_at = None self._updated_at = None self.discriminator = None + if id is not None: self.id = id if frontend_token is not None: @@ -311,8 +321,11 @@ class Frontend(object): if not isinstance(other, Frontend): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Frontend): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontends.py b/sdk/python/sdk/zrok/zrok_api/models/frontends.py index 3c00604a..3012e603 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/frontends.py +++ b/sdk/python/sdk/zrok/zrok_api/models/frontends.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class Frontends(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -33,8 +38,11 @@ class Frontends(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, _configuration=None): # noqa: E501 """Frontends - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -77,8 +85,11 @@ class Frontends(object): if not isinstance(other, Frontends): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Frontends): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/grants_body.py b/sdk/python/sdk/zrok/zrok_api/models/grants_body.py index 78e7d53a..e61ea02d 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/grants_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/grants_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/sdk/zrok/zrok_api/models/identity_body.py b/sdk/python/sdk/zrok/zrok_api/models/identity_body.py index 4be3f8e5..8da98c33 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/identity_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/identity_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py index edb95aa5..408b1d20 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class InlineResponse200(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -28,40 +33,175 @@ class InlineResponse200(object): and the value is json key in definition. """ swagger_types = { - 'account_token': 'str' + 'frontend_token': 'str', + 'z_id': 'str', + 'url_template': 'str', + 'public_name': 'str', + 'created_at': 'int', + 'updated_at': 'int' } attribute_map = { - 'account_token': 'accountToken' + 'frontend_token': 'frontendToken', + 'z_id': 'zId', + 'url_template': 'urlTemplate', + 'public_name': 'publicName', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' } - def __init__(self, account_token=None): # noqa: E501 + def __init__(self, frontend_token=None, z_id=None, url_template=None, public_name=None, created_at=None, updated_at=None, _configuration=None): # noqa: E501 """InlineResponse200 - a model defined in Swagger""" # noqa: E501 - self._account_token = None + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._frontend_token = None + self._z_id = None + self._url_template = None + self._public_name = None + self._created_at = None + self._updated_at = None self.discriminator = None - if account_token is not None: - self.account_token = account_token + + if frontend_token is not None: + self.frontend_token = frontend_token + if z_id is not None: + self.z_id = z_id + if url_template is not None: + self.url_template = url_template + if public_name is not None: + self.public_name = public_name + if created_at is not None: + self.created_at = created_at + if updated_at is not None: + self.updated_at = updated_at @property - def account_token(self): - """Gets the account_token of this InlineResponse200. # noqa: E501 + def frontend_token(self): + """Gets the frontend_token of this InlineResponse200. # noqa: E501 - :return: The account_token of this InlineResponse200. # noqa: E501 + :return: The frontend_token of this InlineResponse200. # noqa: E501 :rtype: str """ - return self._account_token + return self._frontend_token - @account_token.setter - def account_token(self, account_token): - """Sets the account_token of this InlineResponse200. + @frontend_token.setter + def frontend_token(self, frontend_token): + """Sets the frontend_token of this InlineResponse200. - :param account_token: The account_token of this InlineResponse200. # noqa: E501 + :param frontend_token: The frontend_token of this InlineResponse200. # noqa: E501 :type: str """ - self._account_token = account_token + self._frontend_token = frontend_token + + @property + def z_id(self): + """Gets the z_id of this InlineResponse200. # noqa: E501 + + + :return: The z_id of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._z_id + + @z_id.setter + def z_id(self, z_id): + """Sets the z_id of this InlineResponse200. + + + :param z_id: The z_id of this InlineResponse200. # noqa: E501 + :type: str + """ + + self._z_id = z_id + + @property + def url_template(self): + """Gets the url_template of this InlineResponse200. # noqa: E501 + + + :return: The url_template of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._url_template + + @url_template.setter + def url_template(self, url_template): + """Sets the url_template of this InlineResponse200. + + + :param url_template: The url_template of this InlineResponse200. # noqa: E501 + :type: str + """ + + self._url_template = url_template + + @property + def public_name(self): + """Gets the public_name of this InlineResponse200. # noqa: E501 + + + :return: The public_name of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._public_name + + @public_name.setter + def public_name(self, public_name): + """Sets the public_name of this InlineResponse200. + + + :param public_name: The public_name of this InlineResponse200. # noqa: E501 + :type: str + """ + + self._public_name = public_name + + @property + def created_at(self): + """Gets the created_at of this InlineResponse200. # noqa: E501 + + + :return: The created_at of this InlineResponse200. # noqa: E501 + :rtype: int + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this InlineResponse200. + + + :param created_at: The created_at of this InlineResponse200. # noqa: E501 + :type: int + """ + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this InlineResponse200. # noqa: E501 + + + :return: The updated_at of this InlineResponse200. # noqa: E501 + :rtype: int + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this InlineResponse200. + + + :param updated_at: The updated_at of this InlineResponse200. # noqa: E501 + :type: int + """ + + self._updated_at = updated_at def to_dict(self): """Returns the model properties as a dict""" @@ -103,8 +243,11 @@ class InlineResponse200(object): if not isinstance(other, InlineResponse200): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineResponse200): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py index 32a1818a..214eca09 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,40 +28,40 @@ class InlineResponse2001(object): and the value is json key in definition. """ swagger_types = { - 'email': 'str' + 'members': 'list[InlineResponse2001Members]' } attribute_map = { - 'email': 'email' + 'members': 'members' } - def __init__(self, email=None): # noqa: E501 + def __init__(self, members=None): # noqa: E501 """InlineResponse2001 - a model defined in Swagger""" # noqa: E501 - self._email = None + self._members = None self.discriminator = None - if email is not None: - self.email = email + if members is not None: + self.members = members @property - def email(self): - """Gets the email of this InlineResponse2001. # noqa: E501 + def members(self): + """Gets the members of this InlineResponse2001. # noqa: E501 - :return: The email of this InlineResponse2001. # noqa: E501 - :rtype: str + :return: The members of this InlineResponse2001. # noqa: E501 + :rtype: list[InlineResponse2001Members] """ - return self._email + return self._members - @email.setter - def email(self, email): - """Sets the email of this InlineResponse2001. + @members.setter + def members(self, members): + """Sets the members of this InlineResponse2001. - :param email: The email of this InlineResponse2001. # noqa: E501 - :type: str + :param members: The members of this InlineResponse2001. # noqa: E501 + :type: list[InlineResponse2001Members] """ - self._email = email + self._members = members def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2001_members.py similarity index 79% rename from sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py rename to sdk/python/sdk/zrok/zrok_api/models/inline_response2001_members.py index 359fb898..a5fbc3e6 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2001_members.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class InlineResponse2003Members(object): +class InlineResponse2001Members(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -38,7 +38,7 @@ class InlineResponse2003Members(object): } def __init__(self, email=None, admin=None): # noqa: E501 - """InlineResponse2003Members - a model defined in Swagger""" # noqa: E501 + """InlineResponse2001Members - a model defined in Swagger""" # noqa: E501 self._email = None self._admin = None self.discriminator = None @@ -49,20 +49,20 @@ class InlineResponse2003Members(object): @property def email(self): - """Gets the email of this InlineResponse2003Members. # noqa: E501 + """Gets the email of this InlineResponse2001Members. # noqa: E501 - :return: The email of this InlineResponse2003Members. # noqa: E501 + :return: The email of this InlineResponse2001Members. # noqa: E501 :rtype: str """ return self._email @email.setter def email(self, email): - """Sets the email of this InlineResponse2003Members. + """Sets the email of this InlineResponse2001Members. - :param email: The email of this InlineResponse2003Members. # noqa: E501 + :param email: The email of this InlineResponse2001Members. # noqa: E501 :type: str """ @@ -70,20 +70,20 @@ class InlineResponse2003Members(object): @property def admin(self): - """Gets the admin of this InlineResponse2003Members. # noqa: E501 + """Gets the admin of this InlineResponse2001Members. # noqa: E501 - :return: The admin of this InlineResponse2003Members. # noqa: E501 + :return: The admin of this InlineResponse2001Members. # noqa: E501 :rtype: bool """ return self._admin @admin.setter def admin(self, admin): - """Sets the admin of this InlineResponse2003Members. + """Sets the admin of this InlineResponse2001Members. - :param admin: The admin of this InlineResponse2003Members. # noqa: E501 + :param admin: The admin of this InlineResponse2001Members. # noqa: E501 :type: bool """ @@ -110,7 +110,7 @@ class InlineResponse2003Members(object): )) else: result[attr] = value - if issubclass(InlineResponse2003Members, dict): + if issubclass(InlineResponse2001Members, dict): for key, value in self.items(): result[key] = value @@ -126,7 +126,7 @@ class InlineResponse2003Members(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2003Members): + if not isinstance(other, InlineResponse2001Members): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py index a162bfdc..31aca38e 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,170 +28,40 @@ class InlineResponse2002(object): and the value is json key in definition. """ swagger_types = { - 'frontend_token': 'str', - 'z_id': 'str', - 'url_template': 'str', - 'public_name': 'str', - 'created_at': 'int', - 'updated_at': 'int' + 'organizations': 'list[InlineResponse2002Organizations]' } attribute_map = { - 'frontend_token': 'frontendToken', - 'z_id': 'zId', - 'url_template': 'urlTemplate', - 'public_name': 'publicName', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' + 'organizations': 'organizations' } - def __init__(self, frontend_token=None, z_id=None, url_template=None, public_name=None, created_at=None, updated_at=None): # noqa: E501 + def __init__(self, organizations=None): # noqa: E501 """InlineResponse2002 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._z_id = None - self._url_template = None - self._public_name = None - self._created_at = None - self._updated_at = None + self._organizations = None self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if z_id is not None: - self.z_id = z_id - if url_template is not None: - self.url_template = url_template - if public_name is not None: - self.public_name = public_name - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at + if organizations is not None: + self.organizations = organizations @property - def frontend_token(self): - """Gets the frontend_token of this InlineResponse2002. # noqa: E501 + def organizations(self): + """Gets the organizations of this InlineResponse2002. # noqa: E501 - :return: The frontend_token of this InlineResponse2002. # noqa: E501 - :rtype: str + :return: The organizations of this InlineResponse2002. # noqa: E501 + :rtype: list[InlineResponse2002Organizations] """ - return self._frontend_token + return self._organizations - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this InlineResponse2002. + @organizations.setter + def organizations(self, organizations): + """Sets the organizations of this InlineResponse2002. - :param frontend_token: The frontend_token of this InlineResponse2002. # noqa: E501 - :type: str + :param organizations: The organizations of this InlineResponse2002. # noqa: E501 + :type: list[InlineResponse2002Organizations] """ - self._frontend_token = frontend_token - - @property - def z_id(self): - """Gets the z_id of this InlineResponse2002. # noqa: E501 - - - :return: The z_id of this InlineResponse2002. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this InlineResponse2002. - - - :param z_id: The z_id of this InlineResponse2002. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def url_template(self): - """Gets the url_template of this InlineResponse2002. # noqa: E501 - - - :return: The url_template of this InlineResponse2002. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this InlineResponse2002. - - - :param url_template: The url_template of this InlineResponse2002. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - @property - def public_name(self): - """Gets the public_name of this InlineResponse2002. # noqa: E501 - - - :return: The public_name of this InlineResponse2002. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this InlineResponse2002. - - - :param public_name: The public_name of this InlineResponse2002. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def created_at(self): - """Gets the created_at of this InlineResponse2002. # noqa: E501 - - - :return: The created_at of this InlineResponse2002. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this InlineResponse2002. - - - :param created_at: The created_at of this InlineResponse2002. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this InlineResponse2002. # noqa: E501 - - - :return: The updated_at of this InlineResponse2002. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this InlineResponse2002. - - - :param updated_at: The updated_at of this InlineResponse2002. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at + self._organizations = organizations def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2002_organizations.py similarity index 66% rename from sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py rename to sdk/python/sdk/zrok/zrok_api/models/inline_response2002_organizations.py index 1996b554..b80da9bb 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2002_organizations.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class InlineResponse2004Organizations(object): +class InlineResponse2002Organizations(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -28,62 +28,62 @@ class InlineResponse2004Organizations(object): and the value is json key in definition. """ swagger_types = { - 'organization_token': 'str', + 'token': 'str', 'description': 'str' } attribute_map = { - 'organization_token': 'organizationToken', + 'token': 'token', 'description': 'description' } - def __init__(self, organization_token=None, description=None): # noqa: E501 - """InlineResponse2004Organizations - a model defined in Swagger""" # noqa: E501 - self._organization_token = None + def __init__(self, token=None, description=None): # noqa: E501 + """InlineResponse2002Organizations - a model defined in Swagger""" # noqa: E501 + self._token = None self._description = None self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token + if token is not None: + self.token = token if description is not None: self.description = description @property - def organization_token(self): - """Gets the organization_token of this InlineResponse2004Organizations. # noqa: E501 + def token(self): + """Gets the token of this InlineResponse2002Organizations. # noqa: E501 - :return: The organization_token of this InlineResponse2004Organizations. # noqa: E501 + :return: The token of this InlineResponse2002Organizations. # noqa: E501 :rtype: str """ - return self._organization_token + return self._token - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this InlineResponse2004Organizations. + @token.setter + def token(self, token): + """Sets the token of this InlineResponse2002Organizations. - :param organization_token: The organization_token of this InlineResponse2004Organizations. # noqa: E501 + :param token: The token of this InlineResponse2002Organizations. # noqa: E501 :type: str """ - self._organization_token = organization_token + self._token = token @property def description(self): - """Gets the description of this InlineResponse2004Organizations. # noqa: E501 + """Gets the description of this InlineResponse2002Organizations. # noqa: E501 - :return: The description of this InlineResponse2004Organizations. # noqa: E501 + :return: The description of this InlineResponse2002Organizations. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): - """Sets the description of this InlineResponse2004Organizations. + """Sets the description of this InlineResponse2002Organizations. - :param description: The description of this InlineResponse2004Organizations. # noqa: E501 + :param description: The description of this InlineResponse2002Organizations. # noqa: E501 :type: str """ @@ -110,7 +110,7 @@ class InlineResponse2004Organizations(object): )) else: result[attr] = value - if issubclass(InlineResponse2004Organizations, dict): + if issubclass(InlineResponse2002Organizations, dict): for key, value in self.items(): result[key] = value @@ -126,7 +126,7 @@ class InlineResponse2004Organizations(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2004Organizations): + if not isinstance(other, InlineResponse2002Organizations): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py index 93926054..b92d8287 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,40 +28,40 @@ class InlineResponse2003(object): and the value is json key in definition. """ swagger_types = { - 'members': 'list[InlineResponse2003Members]' + 'memberships': 'list[InlineResponse2003Memberships]' } attribute_map = { - 'members': 'members' + 'memberships': 'memberships' } - def __init__(self, members=None): # noqa: E501 + def __init__(self, memberships=None): # noqa: E501 """InlineResponse2003 - a model defined in Swagger""" # noqa: E501 - self._members = None + self._memberships = None self.discriminator = None - if members is not None: - self.members = members + if memberships is not None: + self.memberships = memberships @property - def members(self): - """Gets the members of this InlineResponse2003. # noqa: E501 + def memberships(self): + """Gets the memberships of this InlineResponse2003. # noqa: E501 - :return: The members of this InlineResponse2003. # noqa: E501 - :rtype: list[InlineResponse2003Members] + :return: The memberships of this InlineResponse2003. # noqa: E501 + :rtype: list[InlineResponse2003Memberships] """ - return self._members + return self._memberships - @members.setter - def members(self, members): - """Sets the members of this InlineResponse2003. + @memberships.setter + def memberships(self, memberships): + """Sets the memberships of this InlineResponse2003. - :param members: The members of this InlineResponse2003. # noqa: E501 - :type: list[InlineResponse2003Members] + :param memberships: The memberships of this InlineResponse2003. # noqa: E501 + :type: list[InlineResponse2003Memberships] """ - self._members = members + self._memberships = memberships def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_memberships.py similarity index 65% rename from sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py rename to sdk/python/sdk/zrok/zrok_api/models/inline_response2003_memberships.py index 915fa44e..e7d293af 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_memberships.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class InlineResponse2005Memberships(object): +class InlineResponse2003Memberships(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -28,67 +28,67 @@ class InlineResponse2005Memberships(object): and the value is json key in definition. """ swagger_types = { - 'organization_token': 'str', + 'token': 'str', 'description': 'str', 'admin': 'bool' } attribute_map = { - 'organization_token': 'organizationToken', + 'token': 'token', 'description': 'description', 'admin': 'admin' } - def __init__(self, organization_token=None, description=None, admin=None): # noqa: E501 - """InlineResponse2005Memberships - a model defined in Swagger""" # noqa: E501 - self._organization_token = None + def __init__(self, token=None, description=None, admin=None): # noqa: E501 + """InlineResponse2003Memberships - a model defined in Swagger""" # noqa: E501 + self._token = None self._description = None self._admin = None self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token + if token is not None: + self.token = token if description is not None: self.description = description if admin is not None: self.admin = admin @property - def organization_token(self): - """Gets the organization_token of this InlineResponse2005Memberships. # noqa: E501 + def token(self): + """Gets the token of this InlineResponse2003Memberships. # noqa: E501 - :return: The organization_token of this InlineResponse2005Memberships. # noqa: E501 + :return: The token of this InlineResponse2003Memberships. # noqa: E501 :rtype: str """ - return self._organization_token + return self._token - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this InlineResponse2005Memberships. + @token.setter + def token(self, token): + """Sets the token of this InlineResponse2003Memberships. - :param organization_token: The organization_token of this InlineResponse2005Memberships. # noqa: E501 + :param token: The token of this InlineResponse2003Memberships. # noqa: E501 :type: str """ - self._organization_token = organization_token + self._token = token @property def description(self): - """Gets the description of this InlineResponse2005Memberships. # noqa: E501 + """Gets the description of this InlineResponse2003Memberships. # noqa: E501 - :return: The description of this InlineResponse2005Memberships. # noqa: E501 + :return: The description of this InlineResponse2003Memberships. # noqa: E501 :rtype: str """ return self._description @description.setter def description(self, description): - """Sets the description of this InlineResponse2005Memberships. + """Sets the description of this InlineResponse2003Memberships. - :param description: The description of this InlineResponse2005Memberships. # noqa: E501 + :param description: The description of this InlineResponse2003Memberships. # noqa: E501 :type: str """ @@ -96,20 +96,20 @@ class InlineResponse2005Memberships(object): @property def admin(self): - """Gets the admin of this InlineResponse2005Memberships. # noqa: E501 + """Gets the admin of this InlineResponse2003Memberships. # noqa: E501 - :return: The admin of this InlineResponse2005Memberships. # noqa: E501 + :return: The admin of this InlineResponse2003Memberships. # noqa: E501 :rtype: bool """ return self._admin @admin.setter def admin(self, admin): - """Sets the admin of this InlineResponse2005Memberships. + """Sets the admin of this InlineResponse2003Memberships. - :param admin: The admin of this InlineResponse2005Memberships. # noqa: E501 + :param admin: The admin of this InlineResponse2003Memberships. # noqa: E501 :type: bool """ @@ -136,7 +136,7 @@ class InlineResponse2005Memberships(object): )) else: result[attr] = value - if issubclass(InlineResponse2005Memberships, dict): + if issubclass(InlineResponse2003Memberships, dict): for key, value in self.items(): result[key] = value @@ -152,7 +152,7 @@ class InlineResponse2005Memberships(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2005Memberships): + if not isinstance(other, InlineResponse2003Memberships): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py deleted file mode 100644 index d0a55eb0..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2004(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organizations': 'list[InlineResponse2004Organizations]' - } - - attribute_map = { - 'organizations': 'organizations' - } - - def __init__(self, organizations=None): # noqa: E501 - """InlineResponse2004 - a model defined in Swagger""" # noqa: E501 - self._organizations = None - self.discriminator = None - if organizations is not None: - self.organizations = organizations - - @property - def organizations(self): - """Gets the organizations of this InlineResponse2004. # noqa: E501 - - - :return: The organizations of this InlineResponse2004. # noqa: E501 - :rtype: list[InlineResponse2004Organizations] - """ - return self._organizations - - @organizations.setter - def organizations(self, organizations): - """Sets the organizations of this InlineResponse2004. - - - :param organizations: The organizations of this InlineResponse2004. # noqa: E501 - :type: list[InlineResponse2004Organizations] - """ - - self._organizations = organizations - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2004, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2004): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py deleted file mode 100644 index 3fa22e9d..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2005(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'memberships': 'list[InlineResponse2005Memberships]' - } - - attribute_map = { - 'memberships': 'memberships' - } - - def __init__(self, memberships=None): # noqa: E501 - """InlineResponse2005 - a model defined in Swagger""" # noqa: E501 - self._memberships = None - self.discriminator = None - if memberships is not None: - self.memberships = memberships - - @property - def memberships(self): - """Gets the memberships of this InlineResponse2005. # noqa: E501 - - - :return: The memberships of this InlineResponse2005. # noqa: E501 - :rtype: list[InlineResponse2005Memberships] - """ - return self._memberships - - @memberships.setter - def memberships(self, memberships): - """Sets the memberships of this InlineResponse2005. - - - :param memberships: The memberships of this InlineResponse2005. # noqa: E501 - :type: list[InlineResponse2005Memberships] - """ - - self._memberships = memberships - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2005, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2005): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py index 2cc96e64..4b493cb3 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class InlineResponse201(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -35,10 +40,15 @@ class InlineResponse201(object): 'frontend_token': 'frontendToken' } - def __init__(self, frontend_token=None): # noqa: E501 + def __init__(self, frontend_token=None, _configuration=None): # noqa: E501 """InlineResponse201 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._frontend_token = None self.discriminator = None + if frontend_token is not None: self.frontend_token = frontend_token @@ -103,8 +113,11 @@ class InlineResponse201(object): if not isinstance(other, InlineResponse201): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, InlineResponse201): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_request.py b/sdk/python/sdk/zrok/zrok_api/models/invite_request.py new file mode 100644 index 00000000..cd4a2d92 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/invite_request.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InviteRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'token': 'str' + } + + attribute_map = { + 'email': 'email', + 'token': 'token' + } + + def __init__(self, email=None, token=None): # noqa: E501 + """InviteRequest - a model defined in Swagger""" # noqa: E501 + self._email = None + self._token = None + self.discriminator = None + if email is not None: + self.email = email + if token is not None: + self.token = token + + @property + def email(self): + """Gets the email of this InviteRequest. # noqa: E501 + + + :return: The email of this InviteRequest. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this InviteRequest. + + + :param email: The email of this InviteRequest. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def token(self): + """Gets the token of this InviteRequest. # noqa: E501 + + + :return: The token of this InviteRequest. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this InviteRequest. + + + :param token: The token of this InviteRequest. # noqa: E501 + :type: str + """ + + self._token = token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InviteRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InviteRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py b/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py new file mode 100644 index 00000000..6cc198d9 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InviteTokenGenerateRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'tokens': 'list[str]' + } + + attribute_map = { + 'tokens': 'tokens' + } + + def __init__(self, tokens=None): # noqa: E501 + """InviteTokenGenerateRequest - a model defined in Swagger""" # noqa: E501 + self._tokens = None + self.discriminator = None + if tokens is not None: + self.tokens = tokens + + @property + def tokens(self): + """Gets the tokens of this InviteTokenGenerateRequest. # noqa: E501 + + + :return: The tokens of this InviteTokenGenerateRequest. # noqa: E501 + :rtype: list[str] + """ + return self._tokens + + @tokens.setter + def tokens(self, tokens): + """Sets the tokens of this InviteTokenGenerateRequest. + + + :param tokens: The tokens of this InviteTokenGenerateRequest. # noqa: E501 + :type: list[str] + """ + + self._tokens = tokens + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InviteTokenGenerateRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InviteTokenGenerateRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/login_body.py b/sdk/python/sdk/zrok/zrok_api/models/login_request.py similarity index 80% rename from sdk/python/sdk/zrok/zrok_api/models/login_body.py rename to sdk/python/sdk/zrok/zrok_api/models/login_request.py index 127672ca..c91bcc2b 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/login_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/login_request.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class LoginBody(object): +class LoginRequest(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -38,7 +38,7 @@ class LoginBody(object): } def __init__(self, email=None, password=None): # noqa: E501 - """LoginBody - a model defined in Swagger""" # noqa: E501 + """LoginRequest - a model defined in Swagger""" # noqa: E501 self._email = None self._password = None self.discriminator = None @@ -49,20 +49,20 @@ class LoginBody(object): @property def email(self): - """Gets the email of this LoginBody. # noqa: E501 + """Gets the email of this LoginRequest. # noqa: E501 - :return: The email of this LoginBody. # noqa: E501 + :return: The email of this LoginRequest. # noqa: E501 :rtype: str """ return self._email @email.setter def email(self, email): - """Sets the email of this LoginBody. + """Sets the email of this LoginRequest. - :param email: The email of this LoginBody. # noqa: E501 + :param email: The email of this LoginRequest. # noqa: E501 :type: str """ @@ -70,20 +70,20 @@ class LoginBody(object): @property def password(self): - """Gets the password of this LoginBody. # noqa: E501 + """Gets the password of this LoginRequest. # noqa: E501 - :return: The password of this LoginBody. # noqa: E501 + :return: The password of this LoginRequest. # noqa: E501 :rtype: str """ return self._password @password.setter def password(self, password): - """Sets the password of this LoginBody. + """Sets the password of this LoginRequest. - :param password: The password of this LoginBody. # noqa: E501 + :param password: The password of this LoginRequest. # noqa: E501 :type: str """ @@ -110,7 +110,7 @@ class LoginBody(object): )) else: result[attr] = value - if issubclass(LoginBody, dict): + if issubclass(LoginRequest, dict): for key, value in self.items(): result[key] = value @@ -126,7 +126,7 @@ class LoginBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, LoginBody): + if not isinstance(other, LoginRequest): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/login_response.py b/sdk/python/sdk/zrok/zrok_api/models/login_response.py new file mode 100644 index 00000000..65178a79 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/login_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class LoginResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """LoginResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LoginResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LoginResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics.py b/sdk/python/sdk/zrok/zrok_api/models/metrics.py index d7dd52f8..ee839634 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/metrics.py +++ b/sdk/python/sdk/zrok/zrok_api/models/metrics.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class Metrics(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -41,13 +46,18 @@ class Metrics(object): 'samples': 'samples' } - def __init__(self, scope=None, id=None, period=None, samples=None): # noqa: E501 + def __init__(self, scope=None, id=None, period=None, samples=None, _configuration=None): # noqa: E501 """Metrics - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._scope = None self._id = None self._period = None self._samples = None self.discriminator = None + if scope is not None: self.scope = scope if id is not None: @@ -181,8 +191,11 @@ class Metrics(object): if not isinstance(other, Metrics): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Metrics): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py b/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py index 8e297c43..312c2bc0 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py +++ b/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class MetricsSample(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -39,12 +44,17 @@ class MetricsSample(object): 'timestamp': 'timestamp' } - def __init__(self, rx=None, tx=None, timestamp=None): # noqa: E501 + def __init__(self, rx=None, tx=None, timestamp=None, _configuration=None): # noqa: E501 """MetricsSample - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._rx = None self._tx = None self._timestamp = None self.discriminator = None + if rx is not None: self.rx = rx if tx is not None: @@ -155,8 +165,11 @@ class MetricsSample(object): if not isinstance(other, MetricsSample): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MetricsSample): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py index 48fd06da..918758ab 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,50 +28,50 @@ class OrganizationAddBody(object): and the value is json key in definition. """ swagger_types = { - 'organization_token': 'str', + 'token': 'str', 'email': 'str', 'admin': 'bool' } attribute_map = { - 'organization_token': 'organizationToken', + 'token': 'token', 'email': 'email', 'admin': 'admin' } - def __init__(self, organization_token=None, email=None, admin=None): # noqa: E501 + def __init__(self, token=None, email=None, admin=None): # noqa: E501 """OrganizationAddBody - a model defined in Swagger""" # noqa: E501 - self._organization_token = None + self._token = None self._email = None self._admin = None self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token + if token is not None: + self.token = token if email is not None: self.email = email if admin is not None: self.admin = admin @property - def organization_token(self): - """Gets the organization_token of this OrganizationAddBody. # noqa: E501 + def token(self): + """Gets the token of this OrganizationAddBody. # noqa: E501 - :return: The organization_token of this OrganizationAddBody. # noqa: E501 + :return: The token of this OrganizationAddBody. # noqa: E501 :rtype: str """ - return self._organization_token + return self._token - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationAddBody. + @token.setter + def token(self, token): + """Sets the token of this OrganizationAddBody. - :param organization_token: The organization_token of this OrganizationAddBody. # noqa: E501 + :param token: The token of this OrganizationAddBody. # noqa: E501 :type: str """ - self._organization_token = organization_token + self._token = token @property def email(self): diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_body.py index 8133f0ff..0875eadb 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py b/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py index 45a5afde..a605af16 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,40 +28,40 @@ class OrganizationBody1(object): and the value is json key in definition. """ swagger_types = { - 'organization_token': 'str' + 'token': 'str' } attribute_map = { - 'organization_token': 'organizationToken' + 'token': 'token' } - def __init__(self, organization_token=None): # noqa: E501 + def __init__(self, token=None): # noqa: E501 """OrganizationBody1 - a model defined in Swagger""" # noqa: E501 - self._organization_token = None + self._token = None self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token + if token is not None: + self.token = token @property - def organization_token(self): - """Gets the organization_token of this OrganizationBody1. # noqa: E501 + def token(self): + """Gets the token of this OrganizationBody1. # noqa: E501 - :return: The organization_token of this OrganizationBody1. # noqa: E501 + :return: The token of this OrganizationBody1. # noqa: E501 :rtype: str """ - return self._organization_token + return self._token - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationBody1. + @token.setter + def token(self, token): + """Sets the token of this OrganizationBody1. - :param organization_token: The organization_token of this OrganizationBody1. # noqa: E501 + :param token: The token of this OrganizationBody1. # noqa: E501 :type: str """ - self._organization_token = organization_token + self._token = token def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py index 167a9fe9..4b783851 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,40 +28,40 @@ class OrganizationListBody(object): and the value is json key in definition. """ swagger_types = { - 'organization_token': 'str' + 'token': 'str' } attribute_map = { - 'organization_token': 'organizationToken' + 'token': 'token' } - def __init__(self, organization_token=None): # noqa: E501 + def __init__(self, token=None): # noqa: E501 """OrganizationListBody - a model defined in Swagger""" # noqa: E501 - self._organization_token = None + self._token = None self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token + if token is not None: + self.token = token @property - def organization_token(self): - """Gets the organization_token of this OrganizationListBody. # noqa: E501 + def token(self): + """Gets the token of this OrganizationListBody. # noqa: E501 - :return: The organization_token of this OrganizationListBody. # noqa: E501 + :return: The token of this OrganizationListBody. # noqa: E501 :rtype: str """ - return self._organization_token + return self._token - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationListBody. + @token.setter + def token(self, token): + """Sets the token of this OrganizationListBody. - :param organization_token: The organization_token of this OrganizationListBody. # noqa: E501 + :param token: The token of this OrganizationListBody. # noqa: E501 :type: str """ - self._organization_token = organization_token + self._token = token def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py b/sdk/python/sdk/zrok/zrok_api/models/organization_members_body.py similarity index 69% rename from sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py rename to sdk/python/sdk/zrok/zrok_api/models/organization_members_body.py index 5757905a..354d3f46 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_members_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class InlineResponse2006(object): +class OrganizationMembersBody(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -28,40 +28,40 @@ class InlineResponse2006(object): and the value is json key in definition. """ swagger_types = { - 'sparklines': 'list[Metrics]' + 'token': 'str' } attribute_map = { - 'sparklines': 'sparklines' + 'token': 'token' } - def __init__(self, sparklines=None): # noqa: E501 - """InlineResponse2006 - a model defined in Swagger""" # noqa: E501 - self._sparklines = None + def __init__(self, token=None): # noqa: E501 + """OrganizationMembersBody - a model defined in Swagger""" # noqa: E501 + self._token = None self.discriminator = None - if sparklines is not None: - self.sparklines = sparklines + if token is not None: + self.token = token @property - def sparklines(self): - """Gets the sparklines of this InlineResponse2006. # noqa: E501 + def token(self): + """Gets the token of this OrganizationMembersBody. # noqa: E501 - :return: The sparklines of this InlineResponse2006. # noqa: E501 - :rtype: list[Metrics] + :return: The token of this OrganizationMembersBody. # noqa: E501 + :rtype: str """ - return self._sparklines + return self._token - @sparklines.setter - def sparklines(self, sparklines): - """Sets the sparklines of this InlineResponse2006. + @token.setter + def token(self, token): + """Sets the token of this OrganizationMembersBody. - :param sparklines: The sparklines of this InlineResponse2006. # noqa: E501 - :type: list[Metrics] + :param token: The token of this OrganizationMembersBody. # noqa: E501 + :type: str """ - self._sparklines = sparklines + self._token = token def to_dict(self): """Returns the model properties as a dict""" @@ -84,7 +84,7 @@ class InlineResponse2006(object): )) else: result[attr] = value - if issubclass(InlineResponse2006, dict): + if issubclass(OrganizationMembersBody, dict): for key, value in self.items(): result[key] = value @@ -100,7 +100,7 @@ class InlineResponse2006(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2006): + if not isinstance(other, OrganizationMembersBody): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py index c4a9374d..4600d47f 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,45 +28,45 @@ class OrganizationRemoveBody(object): and the value is json key in definition. """ swagger_types = { - 'organization_token': 'str', + 'token': 'str', 'email': 'str' } attribute_map = { - 'organization_token': 'organizationToken', + 'token': 'token', 'email': 'email' } - def __init__(self, organization_token=None, email=None): # noqa: E501 + def __init__(self, token=None, email=None): # noqa: E501 """OrganizationRemoveBody - a model defined in Swagger""" # noqa: E501 - self._organization_token = None + self._token = None self._email = None self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token + if token is not None: + self.token = token if email is not None: self.email = email @property - def organization_token(self): - """Gets the organization_token of this OrganizationRemoveBody. # noqa: E501 + def token(self): + """Gets the token of this OrganizationRemoveBody. # noqa: E501 - :return: The organization_token of this OrganizationRemoveBody. # noqa: E501 + :return: The token of this OrganizationRemoveBody. # noqa: E501 :rtype: str """ - return self._organization_token + return self._token - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationRemoveBody. + @token.setter + def token(self, token): + """Sets the token of this OrganizationRemoveBody. - :param organization_token: The organization_token of this OrganizationRemoveBody. # noqa: E501 + :param token: The token of this OrganizationRemoveBody. # noqa: E501 :type: str """ - self._organization_token = organization_token + self._token = token @property def email(self): diff --git a/sdk/python/sdk/zrok/zrok_api/models/organizationremove_organizations.py b/sdk/python/sdk/zrok/zrok_api/models/organizationremove_organizations.py new file mode 100644 index 00000000..017ed6bb --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/organizationremove_organizations.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class OrganizationremoveOrganizations(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'token': 'str', + 'email': 'str' + } + + attribute_map = { + 'token': 'token', + 'email': 'email' + } + + def __init__(self, token=None, email=None): # noqa: E501 + """OrganizationremoveOrganizations - a model defined in Swagger""" # noqa: E501 + self._token = None + self._email = None + self.discriminator = None + if token is not None: + self.token = token + if email is not None: + self.email = email + + @property + def token(self): + """Gets the token of this OrganizationremoveOrganizations. # noqa: E501 + + + :return: The token of this OrganizationremoveOrganizations. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this OrganizationremoveOrganizations. + + + :param token: The token of this OrganizationremoveOrganizations. # noqa: E501 + :type: str + """ + + self._token = token + + @property + def email(self): + """Gets the email of this OrganizationremoveOrganizations. # noqa: E501 + + + :return: The email of this OrganizationremoveOrganizations. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this OrganizationremoveOrganizations. + + + :param email: The email of this OrganizationremoveOrganizations. # noqa: E501 + :type: str + """ + + self._email = email + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OrganizationremoveOrganizations, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrganizationremoveOrganizations): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/overview.py b/sdk/python/sdk/zrok/zrok_api/models/overview.py index 7ef8aac4..7c944cb4 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/overview.py +++ b/sdk/python/sdk/zrok/zrok_api/models/overview.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class Overview(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -37,11 +42,16 @@ class Overview(object): 'environments': 'environments' } - def __init__(self, account_limited=None, environments=None): # noqa: E501 + def __init__(self, account_limited=None, environments=None, _configuration=None): # noqa: E501 """Overview - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._account_limited = None self._environments = None self.discriminator = None + if account_limited is not None: self.account_limited = account_limited if environments is not None: @@ -129,8 +139,11 @@ class Overview(object): if not isinstance(other, Overview): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Overview): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/password_requirements.py b/sdk/python/sdk/zrok/zrok_api/models/password_requirements.py new file mode 100644 index 00000000..8589a8b8 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/password_requirements.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PasswordRequirements(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'length': 'int', + 'require_capital': 'bool', + 'require_numeric': 'bool', + 'require_special': 'bool', + 'valid_special_characters': 'str' + } + + attribute_map = { + 'length': 'length', + 'require_capital': 'requireCapital', + 'require_numeric': 'requireNumeric', + 'require_special': 'requireSpecial', + 'valid_special_characters': 'validSpecialCharacters' + } + + def __init__(self, length=None, require_capital=None, require_numeric=None, require_special=None, valid_special_characters=None): # noqa: E501 + """PasswordRequirements - a model defined in Swagger""" # noqa: E501 + self._length = None + self._require_capital = None + self._require_numeric = None + self._require_special = None + self._valid_special_characters = None + self.discriminator = None + if length is not None: + self.length = length + if require_capital is not None: + self.require_capital = require_capital + if require_numeric is not None: + self.require_numeric = require_numeric + if require_special is not None: + self.require_special = require_special + if valid_special_characters is not None: + self.valid_special_characters = valid_special_characters + + @property + def length(self): + """Gets the length of this PasswordRequirements. # noqa: E501 + + + :return: The length of this PasswordRequirements. # noqa: E501 + :rtype: int + """ + return self._length + + @length.setter + def length(self, length): + """Sets the length of this PasswordRequirements. + + + :param length: The length of this PasswordRequirements. # noqa: E501 + :type: int + """ + + self._length = length + + @property + def require_capital(self): + """Gets the require_capital of this PasswordRequirements. # noqa: E501 + + + :return: The require_capital of this PasswordRequirements. # noqa: E501 + :rtype: bool + """ + return self._require_capital + + @require_capital.setter + def require_capital(self, require_capital): + """Sets the require_capital of this PasswordRequirements. + + + :param require_capital: The require_capital of this PasswordRequirements. # noqa: E501 + :type: bool + """ + + self._require_capital = require_capital + + @property + def require_numeric(self): + """Gets the require_numeric of this PasswordRequirements. # noqa: E501 + + + :return: The require_numeric of this PasswordRequirements. # noqa: E501 + :rtype: bool + """ + return self._require_numeric + + @require_numeric.setter + def require_numeric(self, require_numeric): + """Sets the require_numeric of this PasswordRequirements. + + + :param require_numeric: The require_numeric of this PasswordRequirements. # noqa: E501 + :type: bool + """ + + self._require_numeric = require_numeric + + @property + def require_special(self): + """Gets the require_special of this PasswordRequirements. # noqa: E501 + + + :return: The require_special of this PasswordRequirements. # noqa: E501 + :rtype: bool + """ + return self._require_special + + @require_special.setter + def require_special(self, require_special): + """Sets the require_special of this PasswordRequirements. + + + :param require_special: The require_special of this PasswordRequirements. # noqa: E501 + :type: bool + """ + + self._require_special = require_special + + @property + def valid_special_characters(self): + """Gets the valid_special_characters of this PasswordRequirements. # noqa: E501 + + + :return: The valid_special_characters of this PasswordRequirements. # noqa: E501 + :rtype: str + """ + return self._valid_special_characters + + @valid_special_characters.setter + def valid_special_characters(self, valid_special_characters): + """Sets the valid_special_characters of this PasswordRequirements. + + + :param valid_special_characters: The valid_special_characters of this PasswordRequirements. # noqa: E501 + :type: str + """ + + self._valid_special_characters = valid_special_characters + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PasswordRequirements, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PasswordRequirements): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/principal.py b/sdk/python/sdk/zrok/zrok_api/models/principal.py index 0f1c6ff4..24392610 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/principal.py +++ b/sdk/python/sdk/zrok/zrok_api/models/principal.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class Principal(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -43,14 +48,19 @@ class Principal(object): 'admin': 'admin' } - def __init__(self, id=None, email=None, token=None, limitless=None, admin=None): # noqa: E501 + def __init__(self, id=None, email=None, token=None, limitless=None, admin=None, _configuration=None): # noqa: E501 """Principal - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._id = None self._email = None self._token = None self._limitless = None self._admin = None self.discriminator = None + if id is not None: self.id = id if email is not None: @@ -207,8 +217,11 @@ class Principal(object): if not isinstance(other, Principal): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Principal): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/public_frontend.py b/sdk/python/sdk/zrok/zrok_api/models/public_frontend.py new file mode 100644 index 00000000..d2873403 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/public_frontend.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PublicFrontend(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'token': 'str', + 'z_id': 'str', + 'url_template': 'str', + 'public_name': 'str', + 'created_at': 'int', + 'updated_at': 'int' + } + + attribute_map = { + 'token': 'token', + 'z_id': 'zId', + 'url_template': 'urlTemplate', + 'public_name': 'publicName', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, token=None, z_id=None, url_template=None, public_name=None, created_at=None, updated_at=None): # noqa: E501 + """PublicFrontend - a model defined in Swagger""" # noqa: E501 + self._token = None + self._z_id = None + self._url_template = None + self._public_name = None + self._created_at = None + self._updated_at = None + self.discriminator = None + if token is not None: + self.token = token + if z_id is not None: + self.z_id = z_id + if url_template is not None: + self.url_template = url_template + if public_name is not None: + self.public_name = public_name + if created_at is not None: + self.created_at = created_at + if updated_at is not None: + self.updated_at = updated_at + + @property + def token(self): + """Gets the token of this PublicFrontend. # noqa: E501 + + + :return: The token of this PublicFrontend. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this PublicFrontend. + + + :param token: The token of this PublicFrontend. # noqa: E501 + :type: str + """ + + self._token = token + + @property + def z_id(self): + """Gets the z_id of this PublicFrontend. # noqa: E501 + + + :return: The z_id of this PublicFrontend. # noqa: E501 + :rtype: str + """ + return self._z_id + + @z_id.setter + def z_id(self, z_id): + """Sets the z_id of this PublicFrontend. + + + :param z_id: The z_id of this PublicFrontend. # noqa: E501 + :type: str + """ + + self._z_id = z_id + + @property + def url_template(self): + """Gets the url_template of this PublicFrontend. # noqa: E501 + + + :return: The url_template of this PublicFrontend. # noqa: E501 + :rtype: str + """ + return self._url_template + + @url_template.setter + def url_template(self, url_template): + """Sets the url_template of this PublicFrontend. + + + :param url_template: The url_template of this PublicFrontend. # noqa: E501 + :type: str + """ + + self._url_template = url_template + + @property + def public_name(self): + """Gets the public_name of this PublicFrontend. # noqa: E501 + + + :return: The public_name of this PublicFrontend. # noqa: E501 + :rtype: str + """ + return self._public_name + + @public_name.setter + def public_name(self, public_name): + """Sets the public_name of this PublicFrontend. + + + :param public_name: The public_name of this PublicFrontend. # noqa: E501 + :type: str + """ + + self._public_name = public_name + + @property + def created_at(self): + """Gets the created_at of this PublicFrontend. # noqa: E501 + + + :return: The created_at of this PublicFrontend. # noqa: E501 + :rtype: int + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PublicFrontend. + + + :param created_at: The created_at of this PublicFrontend. # noqa: E501 + :type: int + """ + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this PublicFrontend. # noqa: E501 + + + :return: The updated_at of this PublicFrontend. # noqa: E501 + :rtype: int + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this PublicFrontend. + + + :param updated_at: The updated_at of this PublicFrontend. # noqa: E501 + :type: int + """ + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PublicFrontend, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PublicFrontend): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/public_frontend_list.py b/sdk/python/sdk/zrok/zrok_api/models/public_frontend_list.py new file mode 100644 index 00000000..abbe9bd3 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/public_frontend_list.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PublicFrontendList(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """PublicFrontendList - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PublicFrontendList, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PublicFrontendList): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py b/sdk/python/sdk/zrok/zrok_api/models/regenerate_token_body.py similarity index 82% rename from sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py rename to sdk/python/sdk/zrok/zrok_api/models/regenerate_token_body.py index 61513276..0b1e532c 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/regenerate_token_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class RegenerateAccountTokenBody(object): +class RegenerateTokenBody(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -36,7 +36,7 @@ class RegenerateAccountTokenBody(object): } def __init__(self, email_address=None): # noqa: E501 - """RegenerateAccountTokenBody - a model defined in Swagger""" # noqa: E501 + """RegenerateTokenBody - a model defined in Swagger""" # noqa: E501 self._email_address = None self.discriminator = None if email_address is not None: @@ -44,20 +44,20 @@ class RegenerateAccountTokenBody(object): @property def email_address(self): - """Gets the email_address of this RegenerateAccountTokenBody. # noqa: E501 + """Gets the email_address of this RegenerateTokenBody. # noqa: E501 - :return: The email_address of this RegenerateAccountTokenBody. # noqa: E501 + :return: The email_address of this RegenerateTokenBody. # noqa: E501 :rtype: str """ return self._email_address @email_address.setter def email_address(self, email_address): - """Sets the email_address of this RegenerateAccountTokenBody. + """Sets the email_address of this RegenerateTokenBody. - :param email_address: The email_address of this RegenerateAccountTokenBody. # noqa: E501 + :param email_address: The email_address of this RegenerateTokenBody. # noqa: E501 :type: str """ @@ -84,7 +84,7 @@ class RegenerateAccountTokenBody(object): )) else: result[attr] = value - if issubclass(RegenerateAccountTokenBody, dict): + if issubclass(RegenerateTokenBody, dict): for key, value in self.items(): result[key] = value @@ -100,7 +100,7 @@ class RegenerateAccountTokenBody(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RegenerateAccountTokenBody): + if not isinstance(other, RegenerateTokenBody): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/register_request.py b/sdk/python/sdk/zrok/zrok_api/models/register_request.py new file mode 100644 index 00000000..cfb274a8 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/register_request.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class RegisterRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'token': 'str', + 'password': 'str' + } + + attribute_map = { + 'token': 'token', + 'password': 'password' + } + + def __init__(self, token=None, password=None): # noqa: E501 + """RegisterRequest - a model defined in Swagger""" # noqa: E501 + self._token = None + self._password = None + self.discriminator = None + if token is not None: + self.token = token + if password is not None: + self.password = password + + @property + def token(self): + """Gets the token of this RegisterRequest. # noqa: E501 + + + :return: The token of this RegisterRequest. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this RegisterRequest. + + + :param token: The token of this RegisterRequest. # noqa: E501 + :type: str + """ + + self._token = token + + @property + def password(self): + """Gets the password of this RegisterRequest. # noqa: E501 + + + :return: The password of this RegisterRequest. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this RegisterRequest. + + + :param password: The password of this RegisterRequest. # noqa: E501 + :type: str + """ + + self._password = password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RegisterRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RegisterRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/register_response.py b/sdk/python/sdk/zrok/zrok_api/models/register_response.py new file mode 100644 index 00000000..a0b7ac03 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/register_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class RegisterResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'token': 'str' + } + + attribute_map = { + 'token': 'token' + } + + def __init__(self, token=None): # noqa: E501 + """RegisterResponse - a model defined in Swagger""" # noqa: E501 + self._token = None + self.discriminator = None + if token is not None: + self.token = token + + @property + def token(self): + """Gets the token of this RegisterResponse. # noqa: E501 + + + :return: The token of this RegisterResponse. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this RegisterResponse. + + + :param token: The token of this RegisterResponse. # noqa: E501 + :type: str + """ + + self._token = token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RegisterResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RegisterResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py new file mode 100644 index 00000000..cf52cc88 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ResetPasswordRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'token': 'str', + 'password': 'str' + } + + attribute_map = { + 'token': 'token', + 'password': 'password' + } + + def __init__(self, token=None, password=None): # noqa: E501 + """ResetPasswordRequest - a model defined in Swagger""" # noqa: E501 + self._token = None + self._password = None + self.discriminator = None + if token is not None: + self.token = token + if password is not None: + self.password = password + + @property + def token(self): + """Gets the token of this ResetPasswordRequest. # noqa: E501 + + + :return: The token of this ResetPasswordRequest. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this ResetPasswordRequest. + + + :param token: The token of this ResetPasswordRequest. # noqa: E501 + :type: str + """ + + self._token = token + + @property + def password(self): + """Gets the password of this ResetPasswordRequest. # noqa: E501 + + + :return: The password of this ResetPasswordRequest. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this ResetPasswordRequest. + + + :param password: The password of this ResetPasswordRequest. # noqa: E501 + :type: str + """ + + self._password = password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResetPasswordRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetPasswordRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py index 2d0bd614..44e975ec 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/sdk/zrok/zrok_api/models/share.py b/sdk/python/sdk/zrok/zrok_api/models/share.py index abdb66af..478deb76 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class Share(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -57,8 +62,12 @@ class Share(object): 'updated_at': 'updatedAt' } - def __init__(self, share_token=None, z_id=None, share_mode=None, backend_mode=None, frontend_selection=None, frontend_endpoint=None, backend_proxy_endpoint=None, reserved=None, activity=None, limited=None, created_at=None, updated_at=None): # noqa: E501 + def __init__(self, share_token=None, z_id=None, share_mode=None, backend_mode=None, frontend_selection=None, frontend_endpoint=None, backend_proxy_endpoint=None, reserved=None, activity=None, limited=None, created_at=None, updated_at=None, _configuration=None): # noqa: E501 """Share - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._share_token = None self._z_id = None self._share_mode = None @@ -72,6 +81,7 @@ class Share(object): self._created_at = None self._updated_at = None self.discriminator = None + if share_token is not None: self.share_token = share_token if z_id is not None: @@ -389,8 +399,11 @@ class Share(object): if not isinstance(other, Share): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Share): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_request.py b/sdk/python/sdk/zrok/zrok_api/models/share_request.py index ee9a08b1..99849586 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share_request.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share_request.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class ShareRequest(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -61,8 +66,12 @@ class ShareRequest(object): 'unique_name': 'uniqueName' } - def __init__(self, env_zid=None, share_mode=None, frontend_selection=None, backend_mode=None, backend_proxy_endpoint=None, auth_scheme=None, auth_users=None, oauth_provider=None, oauth_email_domains=None, oauth_authorization_check_interval=None, reserved=None, permission_mode=None, access_grants=None, unique_name=None): # noqa: E501 + def __init__(self, env_zid=None, share_mode=None, frontend_selection=None, backend_mode=None, backend_proxy_endpoint=None, auth_scheme=None, auth_users=None, oauth_provider=None, oauth_email_domains=None, oauth_authorization_check_interval=None, reserved=None, permission_mode=None, access_grants=None, unique_name=None, _configuration=None): # noqa: E501 """ShareRequest - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._env_zid = None self._share_mode = None self._frontend_selection = None @@ -78,6 +87,7 @@ class ShareRequest(object): self._access_grants = None self._unique_name = None self.discriminator = None + if env_zid is not None: self.env_zid = env_zid if share_mode is not None: @@ -147,7 +157,8 @@ class ShareRequest(object): :type: str """ allowed_values = ["public", "private"] # noqa: E501 - if share_mode not in allowed_values: + if (self._configuration.client_side_validation and + share_mode not in allowed_values): raise ValueError( "Invalid value for `share_mode` ({0}), must be one of {1}" # noqa: E501 .format(share_mode, allowed_values) @@ -195,7 +206,8 @@ class ShareRequest(object): :type: str """ allowed_values = ["proxy", "web", "tcpTunnel", "udpTunnel", "caddy", "drive", "socks", "vpn"] # noqa: E501 - if backend_mode not in allowed_values: + if (self._configuration.client_side_validation and + backend_mode not in allowed_values): raise ValueError( "Invalid value for `backend_mode` ({0}), must be one of {1}" # noqa: E501 .format(backend_mode, allowed_values) @@ -285,7 +297,8 @@ class ShareRequest(object): :type: str """ allowed_values = ["github", "google"] # noqa: E501 - if oauth_provider not in allowed_values: + if (self._configuration.client_side_validation and + oauth_provider not in allowed_values): raise ValueError( "Invalid value for `oauth_provider` ({0}), must be one of {1}" # noqa: E501 .format(oauth_provider, allowed_values) @@ -375,7 +388,8 @@ class ShareRequest(object): :type: str """ allowed_values = ["open", "closed"] # noqa: E501 - if permission_mode not in allowed_values: + if (self._configuration.client_side_validation and + permission_mode not in allowed_values): raise ValueError( "Invalid value for `permission_mode` ({0}), must be one of {1}" # noqa: E501 .format(permission_mode, allowed_values) @@ -465,8 +479,11 @@ class ShareRequest(object): if not isinstance(other, ShareRequest): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ShareRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_response.py b/sdk/python/sdk/zrok/zrok_api/models/share_response.py index dcb30e38..f6fbdc81 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share_response.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share_response.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class ShareResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -37,11 +42,16 @@ class ShareResponse(object): 'share_token': 'shareToken' } - def __init__(self, frontend_proxy_endpoints=None, share_token=None): # noqa: E501 + def __init__(self, frontend_proxy_endpoints=None, share_token=None, _configuration=None): # noqa: E501 """ShareResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._frontend_proxy_endpoints = None self._share_token = None self.discriminator = None + if frontend_proxy_endpoints is not None: self.frontend_proxy_endpoints = frontend_proxy_endpoints if share_token is not None: @@ -129,8 +139,11 @@ class ShareResponse(object): if not isinstance(other, ShareResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ShareResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/shares.py b/sdk/python/sdk/zrok/zrok_api/models/shares.py index c1ce3f4d..4944ac1e 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/shares.py +++ b/sdk/python/sdk/zrok/zrok_api/models/shares.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class Shares(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -33,8 +38,11 @@ class Shares(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, _configuration=None): # noqa: E501 """Shares - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -77,8 +85,11 @@ class Shares(object): if not isinstance(other, Shares): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Shares): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/spark_data.py b/sdk/python/sdk/zrok/zrok_api/models/spark_data.py index 9ed04dfe..00ecc378 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/spark_data.py +++ b/sdk/python/sdk/zrok/zrok_api/models/spark_data.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class SparkData(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -33,8 +38,11 @@ class SparkData(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, _configuration=None): # noqa: E501 """SparkData - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -77,8 +85,11 @@ class SparkData(object): if not isinstance(other, SparkData): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SparkData): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py b/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py index 52a1c1fd..14997b8e 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py +++ b/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class SparkDataSample(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -37,11 +42,16 @@ class SparkDataSample(object): 'tx': 'tx' } - def __init__(self, rx=None, tx=None): # noqa: E501 + def __init__(self, rx=None, tx=None, _configuration=None): # noqa: E501 """SparkDataSample - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self._rx = None self._tx = None self.discriminator = None + if rx is not None: self.rx = rx if tx is not None: @@ -129,8 +139,11 @@ class SparkDataSample(object): if not isinstance(other, SparkDataSample): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SparkDataSample): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py b/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py new file mode 100644 index 00000000..75158673 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UnaccessRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'frontend_token': 'str', + 'env_zid': 'str', + 'shr_token': 'str' + } + + attribute_map = { + 'frontend_token': 'frontendToken', + 'env_zid': 'envZId', + 'shr_token': 'shrToken' + } + + def __init__(self, frontend_token=None, env_zid=None, shr_token=None): # noqa: E501 + """UnaccessRequest - a model defined in Swagger""" # noqa: E501 + self._frontend_token = None + self._env_zid = None + self._shr_token = None + self.discriminator = None + if frontend_token is not None: + self.frontend_token = frontend_token + if env_zid is not None: + self.env_zid = env_zid + if shr_token is not None: + self.shr_token = shr_token + + @property + def frontend_token(self): + """Gets the frontend_token of this UnaccessRequest. # noqa: E501 + + + :return: The frontend_token of this UnaccessRequest. # noqa: E501 + :rtype: str + """ + return self._frontend_token + + @frontend_token.setter + def frontend_token(self, frontend_token): + """Sets the frontend_token of this UnaccessRequest. + + + :param frontend_token: The frontend_token of this UnaccessRequest. # noqa: E501 + :type: str + """ + + self._frontend_token = frontend_token + + @property + def env_zid(self): + """Gets the env_zid of this UnaccessRequest. # noqa: E501 + + + :return: The env_zid of this UnaccessRequest. # noqa: E501 + :rtype: str + """ + return self._env_zid + + @env_zid.setter + def env_zid(self, env_zid): + """Sets the env_zid of this UnaccessRequest. + + + :param env_zid: The env_zid of this UnaccessRequest. # noqa: E501 + :type: str + """ + + self._env_zid = env_zid + + @property + def shr_token(self): + """Gets the shr_token of this UnaccessRequest. # noqa: E501 + + + :return: The shr_token of this UnaccessRequest. # noqa: E501 + :rtype: str + """ + return self._shr_token + + @shr_token.setter + def shr_token(self, shr_token): + """Sets the shr_token of this UnaccessRequest. + + + :param shr_token: The shr_token of this UnaccessRequest. # noqa: E501 + :type: str + """ + + self._shr_token = shr_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UnaccessRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnaccessRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py b/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py new file mode 100644 index 00000000..ecfc9e3c --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UnshareRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'env_zid': 'str', + 'shr_token': 'str', + 'reserved': 'bool' + } + + attribute_map = { + 'env_zid': 'envZId', + 'shr_token': 'shrToken', + 'reserved': 'reserved' + } + + def __init__(self, env_zid=None, shr_token=None, reserved=None): # noqa: E501 + """UnshareRequest - a model defined in Swagger""" # noqa: E501 + self._env_zid = None + self._shr_token = None + self._reserved = None + self.discriminator = None + if env_zid is not None: + self.env_zid = env_zid + if shr_token is not None: + self.shr_token = shr_token + if reserved is not None: + self.reserved = reserved + + @property + def env_zid(self): + """Gets the env_zid of this UnshareRequest. # noqa: E501 + + + :return: The env_zid of this UnshareRequest. # noqa: E501 + :rtype: str + """ + return self._env_zid + + @env_zid.setter + def env_zid(self, env_zid): + """Sets the env_zid of this UnshareRequest. + + + :param env_zid: The env_zid of this UnshareRequest. # noqa: E501 + :type: str + """ + + self._env_zid = env_zid + + @property + def shr_token(self): + """Gets the shr_token of this UnshareRequest. # noqa: E501 + + + :return: The shr_token of this UnshareRequest. # noqa: E501 + :rtype: str + """ + return self._shr_token + + @shr_token.setter + def shr_token(self, shr_token): + """Sets the shr_token of this UnshareRequest. + + + :param shr_token: The shr_token of this UnshareRequest. # noqa: E501 + :type: str + """ + + self._shr_token = shr_token + + @property + def reserved(self): + """Gets the reserved of this UnshareRequest. # noqa: E501 + + + :return: The reserved of this UnshareRequest. # noqa: E501 + :rtype: bool + """ + return self._reserved + + @reserved.setter + def reserved(self, reserved): + """Sets the reserved of this UnshareRequest. + + + :param reserved: The reserved of this UnshareRequest. # noqa: E501 + :type: bool + """ + + self._reserved = reserved + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UnshareRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnshareRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py b/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py similarity index 74% rename from sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py rename to sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py index aed451e3..41554390 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py +++ b/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 1.0.0 + OpenAPI spec version: 0.3.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class FrontendBody2(object): +class UpdateFrontendRequest(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -40,7 +40,7 @@ class FrontendBody2(object): } def __init__(self, frontend_token=None, public_name=None, url_template=None): # noqa: E501 - """FrontendBody2 - a model defined in Swagger""" # noqa: E501 + """UpdateFrontendRequest - a model defined in Swagger""" # noqa: E501 self._frontend_token = None self._public_name = None self._url_template = None @@ -54,20 +54,20 @@ class FrontendBody2(object): @property def frontend_token(self): - """Gets the frontend_token of this FrontendBody2. # noqa: E501 + """Gets the frontend_token of this UpdateFrontendRequest. # noqa: E501 - :return: The frontend_token of this FrontendBody2. # noqa: E501 + :return: The frontend_token of this UpdateFrontendRequest. # noqa: E501 :rtype: str """ return self._frontend_token @frontend_token.setter def frontend_token(self, frontend_token): - """Sets the frontend_token of this FrontendBody2. + """Sets the frontend_token of this UpdateFrontendRequest. - :param frontend_token: The frontend_token of this FrontendBody2. # noqa: E501 + :param frontend_token: The frontend_token of this UpdateFrontendRequest. # noqa: E501 :type: str """ @@ -75,20 +75,20 @@ class FrontendBody2(object): @property def public_name(self): - """Gets the public_name of this FrontendBody2. # noqa: E501 + """Gets the public_name of this UpdateFrontendRequest. # noqa: E501 - :return: The public_name of this FrontendBody2. # noqa: E501 + :return: The public_name of this UpdateFrontendRequest. # noqa: E501 :rtype: str """ return self._public_name @public_name.setter def public_name(self, public_name): - """Sets the public_name of this FrontendBody2. + """Sets the public_name of this UpdateFrontendRequest. - :param public_name: The public_name of this FrontendBody2. # noqa: E501 + :param public_name: The public_name of this UpdateFrontendRequest. # noqa: E501 :type: str """ @@ -96,20 +96,20 @@ class FrontendBody2(object): @property def url_template(self): - """Gets the url_template of this FrontendBody2. # noqa: E501 + """Gets the url_template of this UpdateFrontendRequest. # noqa: E501 - :return: The url_template of this FrontendBody2. # noqa: E501 + :return: The url_template of this UpdateFrontendRequest. # noqa: E501 :rtype: str """ return self._url_template @url_template.setter def url_template(self, url_template): - """Sets the url_template of this FrontendBody2. + """Sets the url_template of this UpdateFrontendRequest. - :param url_template: The url_template of this FrontendBody2. # noqa: E501 + :param url_template: The url_template of this UpdateFrontendRequest. # noqa: E501 :type: str """ @@ -136,7 +136,7 @@ class FrontendBody2(object): )) else: result[attr] = value - if issubclass(FrontendBody2, dict): + if issubclass(UpdateFrontendRequest, dict): for key, value in self.items(): result[key] = value @@ -152,7 +152,7 @@ class FrontendBody2(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, FrontendBody2): + if not isinstance(other, UpdateFrontendRequest): return False return self.__dict__ == other.__dict__ diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py new file mode 100644 index 00000000..3548c101 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UpdateShareRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'shr_token': 'str', + 'backend_proxy_endpoint': 'str', + 'add_access_grants': 'list[str]', + 'remove_access_grants': 'list[str]' + } + + attribute_map = { + 'shr_token': 'shrToken', + 'backend_proxy_endpoint': 'backendProxyEndpoint', + 'add_access_grants': 'addAccessGrants', + 'remove_access_grants': 'removeAccessGrants' + } + + def __init__(self, shr_token=None, backend_proxy_endpoint=None, add_access_grants=None, remove_access_grants=None): # noqa: E501 + """UpdateShareRequest - a model defined in Swagger""" # noqa: E501 + self._shr_token = None + self._backend_proxy_endpoint = None + self._add_access_grants = None + self._remove_access_grants = None + self.discriminator = None + if shr_token is not None: + self.shr_token = shr_token + if backend_proxy_endpoint is not None: + self.backend_proxy_endpoint = backend_proxy_endpoint + if add_access_grants is not None: + self.add_access_grants = add_access_grants + if remove_access_grants is not None: + self.remove_access_grants = remove_access_grants + + @property + def shr_token(self): + """Gets the shr_token of this UpdateShareRequest. # noqa: E501 + + + :return: The shr_token of this UpdateShareRequest. # noqa: E501 + :rtype: str + """ + return self._shr_token + + @shr_token.setter + def shr_token(self, shr_token): + """Sets the shr_token of this UpdateShareRequest. + + + :param shr_token: The shr_token of this UpdateShareRequest. # noqa: E501 + :type: str + """ + + self._shr_token = shr_token + + @property + def backend_proxy_endpoint(self): + """Gets the backend_proxy_endpoint of this UpdateShareRequest. # noqa: E501 + + + :return: The backend_proxy_endpoint of this UpdateShareRequest. # noqa: E501 + :rtype: str + """ + return self._backend_proxy_endpoint + + @backend_proxy_endpoint.setter + def backend_proxy_endpoint(self, backend_proxy_endpoint): + """Sets the backend_proxy_endpoint of this UpdateShareRequest. + + + :param backend_proxy_endpoint: The backend_proxy_endpoint of this UpdateShareRequest. # noqa: E501 + :type: str + """ + + self._backend_proxy_endpoint = backend_proxy_endpoint + + @property + def add_access_grants(self): + """Gets the add_access_grants of this UpdateShareRequest. # noqa: E501 + + + :return: The add_access_grants of this UpdateShareRequest. # noqa: E501 + :rtype: list[str] + """ + return self._add_access_grants + + @add_access_grants.setter + def add_access_grants(self, add_access_grants): + """Sets the add_access_grants of this UpdateShareRequest. + + + :param add_access_grants: The add_access_grants of this UpdateShareRequest. # noqa: E501 + :type: list[str] + """ + + self._add_access_grants = add_access_grants + + @property + def remove_access_grants(self): + """Gets the remove_access_grants of this UpdateShareRequest. # noqa: E501 + + + :return: The remove_access_grants of this UpdateShareRequest. # noqa: E501 + :rtype: list[str] + """ + return self._remove_access_grants + + @remove_access_grants.setter + def remove_access_grants(self, remove_access_grants): + """Sets the remove_access_grants of this UpdateShareRequest. + + + :param remove_access_grants: The remove_access_grants of this UpdateShareRequest. # noqa: E501 + :type: list[str] + """ + + self._remove_access_grants = remove_access_grants + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateShareRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateShareRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify_request.py b/sdk/python/sdk/zrok/zrok_api/models/verify_request.py new file mode 100644 index 00000000..8089bc9b --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/verify_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class VerifyRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'token': 'str' + } + + attribute_map = { + 'token': 'token' + } + + def __init__(self, token=None): # noqa: E501 + """VerifyRequest - a model defined in Swagger""" # noqa: E501 + self._token = None + self.discriminator = None + if token is not None: + self.token = token + + @property + def token(self): + """Gets the token of this VerifyRequest. # noqa: E501 + + + :return: The token of this VerifyRequest. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this VerifyRequest. + + + :param token: The token of this VerifyRequest. # noqa: E501 + :type: str + """ + + self._token = token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VerifyRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VerifyRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify_response.py b/sdk/python/sdk/zrok/zrok_api/models/verify_response.py new file mode 100644 index 00000000..d6b9a617 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/verify_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 0.3.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class VerifyResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str' + } + + attribute_map = { + 'email': 'email' + } + + def __init__(self, email=None): # noqa: E501 + """VerifyResponse - a model defined in Swagger""" # noqa: E501 + self._email = None + self.discriminator = None + if email is not None: + self.email = email + + @property + def email(self): + """Gets the email of this VerifyResponse. # noqa: E501 + + + :return: The email of this VerifyResponse. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this VerifyResponse. + + + :param email: The email of this VerifyResponse. # noqa: E501 + :type: str + """ + + self._email = email + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VerifyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VerifyResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/version.py b/sdk/python/sdk/zrok/zrok_api/models/version.py index 98e90760..bdf42e3f 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/version.py +++ b/sdk/python/sdk/zrok/zrok_api/models/version.py @@ -10,16 +10,21 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + import pprint import re # noqa: F401 import six +from zrok_api.configuration import Configuration + + class Version(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ Attributes: swagger_types (dict): The key is attribute name @@ -33,8 +38,11 @@ class Version(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, _configuration=None): # noqa: E501 """Version - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -77,8 +85,11 @@ class Version(object): if not isinstance(other, Version): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Version): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/rest.py b/sdk/python/sdk/zrok/zrok_api/rest.py index a2c54065..da85f5cf 100644 --- a/sdk/python/sdk/zrok/zrok_api/rest.py +++ b/sdk/python/sdk/zrok/zrok_api/rest.py @@ -10,6 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ + from __future__ import absolute_import import io @@ -42,11 +43,11 @@ class RESTResponse(io.IOBase): def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.urllib3_response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.urllib3_response.headers.get(name, default) class RESTClientObject(object): @@ -215,6 +216,11 @@ class RESTClientObject(object): if _preload_content: r = RESTResponse(r) + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + # log response body logger.debug("response body: %s", r.data) From 7545eeadb3f4fab253e63109b49a397dee92135a Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 27 Feb 2025 15:07:37 -0500 Subject: [PATCH 02/56] start adapting py sdk to v1.0 --- sdk/python/examples/pastebin/README.md | 2 +- sdk/python/examples/proxy/requirements.txt | 3 + sdk/python/sdk/zrok/.swagger-codegen-ignore | 2 +- sdk/python/sdk/zrok/README.md | 275 ++++++++++++++++++ sdk/python/sdk/zrok/setup.py | 2 +- sdk/python/sdk/zrok/zrok/access.py | 3 +- sdk/python/sdk/zrok/zrok/environment/root.py | 26 +- sdk/python/sdk/zrok/zrok/share.py | 10 +- .../sdk/zrok/zrok_api/api/metadata_api.py | 3 +- 9 files changed, 309 insertions(+), 17 deletions(-) create mode 100644 sdk/python/examples/proxy/requirements.txt create mode 100644 sdk/python/sdk/zrok/README.md diff --git a/sdk/python/examples/pastebin/README.md b/sdk/python/examples/pastebin/README.md index be016135..18cbef8d 100644 --- a/sdk/python/examples/pastebin/README.md +++ b/sdk/python/examples/pastebin/README.md @@ -4,7 +4,7 @@ This example shows the use of the zrok SDK spinning up a simple pastebin command ## Self-hosting Setup :wrench: -You don't need this section if you're using hosted zrok from NetFoundry (https://api.zrok.io/). +You don't need this section if you're using hosted zrok from NetFoundry (https://api-v1.zrok.io/). Refer to the [setup guide](../../../docs/guides/self-hosting/self_hosting_guide.md) for details on setting up your zrok environment if you're self-hosting zrok. diff --git a/sdk/python/examples/proxy/requirements.txt b/sdk/python/examples/proxy/requirements.txt new file mode 100644 index 00000000..3db45633 --- /dev/null +++ b/sdk/python/examples/proxy/requirements.txt @@ -0,0 +1,3 @@ +flask +requests +waitress diff --git a/sdk/python/sdk/zrok/.swagger-codegen-ignore b/sdk/python/sdk/zrok/.swagger-codegen-ignore index cbe3e7fe..f86cf33f 100644 --- a/sdk/python/sdk/zrok/.swagger-codegen-ignore +++ b/sdk/python/sdk/zrok/.swagger-codegen-ignore @@ -29,4 +29,4 @@ test-requirements.txt test/ docs/ README.md -setup.py \ No newline at end of file +setup.py diff --git a/sdk/python/sdk/zrok/README.md b/sdk/python/sdk/zrok/README.md new file mode 100644 index 00000000..1ec5f374 --- /dev/null +++ b/sdk/python/sdk/zrok/README.md @@ -0,0 +1,275 @@ +# zrok_sdk + +zrok client access + +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on Github, you can install directly from Github + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import zrok_api +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import zrok_api +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) +body = zrok_api.ChangePasswordBody() # ChangePasswordBody | (optional) + +try: + api_instance.change_password(body=body) +except ApiException as e: + print("Exception when calling AccountApi->change_password: %s\n" % e) + +# create an instance of the API class +api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) +body = zrok_api.InviteBody() # InviteBody | (optional) + +try: + api_instance.invite(body=body) +except ApiException as e: + print("Exception when calling AccountApi->invite: %s\n" % e) + +# create an instance of the API class +api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) +body = zrok_api.LoginBody() # LoginBody | (optional) + +try: + api_response = api_instance.login(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountApi->login: %s\n" % e) + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) +body = zrok_api.RegenerateAccountTokenBody() # RegenerateAccountTokenBody | (optional) + +try: + api_response = api_instance.regenerate_account_token(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) + +# create an instance of the API class +api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) +body = zrok_api.RegisterBody() # RegisterBody | (optional) + +try: + api_response = api_instance.register(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountApi->register: %s\n" % e) + +# create an instance of the API class +api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) +body = zrok_api.ResetPasswordBody() # ResetPasswordBody | (optional) + +try: + api_instance.reset_password(body=body) +except ApiException as e: + print("Exception when calling AccountApi->reset_password: %s\n" % e) + +# create an instance of the API class +api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) +body = zrok_api.ResetPasswordRequestBody() # ResetPasswordRequestBody | (optional) + +try: + api_instance.reset_password_request(body=body) +except ApiException as e: + print("Exception when calling AccountApi->reset_password_request: %s\n" % e) + +# create an instance of the API class +api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) +body = zrok_api.VerifyBody() # VerifyBody | (optional) + +try: + api_response = api_instance.verify(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountApi->verify: %s\n" % e) +``` + +## Documentation for API Endpoints + +All URIs are relative to */api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccountApi* | [**change_password**](docs/AccountApi.md#change_password) | **POST** /changePassword | +*AccountApi* | [**invite**](docs/AccountApi.md#invite) | **POST** /invite | +*AccountApi* | [**login**](docs/AccountApi.md#login) | **POST** /login | +*AccountApi* | [**regenerate_account_token**](docs/AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | +*AccountApi* | [**register**](docs/AccountApi.md#register) | **POST** /register | +*AccountApi* | [**reset_password**](docs/AccountApi.md#reset_password) | **POST** /resetPassword | +*AccountApi* | [**reset_password_request**](docs/AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | +*AccountApi* | [**verify**](docs/AccountApi.md#verify) | **POST** /verify | +*AdminApi* | [**add_organization_member**](docs/AdminApi.md#add_organization_member) | **POST** /organization/add | +*AdminApi* | [**create_account**](docs/AdminApi.md#create_account) | **POST** /account | +*AdminApi* | [**create_frontend**](docs/AdminApi.md#create_frontend) | **POST** /frontend | +*AdminApi* | [**create_identity**](docs/AdminApi.md#create_identity) | **POST** /identity | +*AdminApi* | [**create_organization**](docs/AdminApi.md#create_organization) | **POST** /organization | +*AdminApi* | [**delete_frontend**](docs/AdminApi.md#delete_frontend) | **DELETE** /frontend | +*AdminApi* | [**delete_organization**](docs/AdminApi.md#delete_organization) | **DELETE** /organization | +*AdminApi* | [**grants**](docs/AdminApi.md#grants) | **POST** /grants | +*AdminApi* | [**invite_token_generate**](docs/AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | +*AdminApi* | [**list_frontends**](docs/AdminApi.md#list_frontends) | **GET** /frontends | +*AdminApi* | [**list_organization_members**](docs/AdminApi.md#list_organization_members) | **POST** /organization/list | +*AdminApi* | [**list_organizations**](docs/AdminApi.md#list_organizations) | **GET** /organizations | +*AdminApi* | [**remove_organization_member**](docs/AdminApi.md#remove_organization_member) | **POST** /organization/remove | +*AdminApi* | [**update_frontend**](docs/AdminApi.md#update_frontend) | **PATCH** /frontend | +*EnvironmentApi* | [**disable**](docs/EnvironmentApi.md#disable) | **POST** /disable | +*EnvironmentApi* | [**enable**](docs/EnvironmentApi.md#enable) | **POST** /enable | +*MetadataApi* | [**client_version_check**](docs/MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | +*MetadataApi* | [**configuration**](docs/MetadataApi.md#configuration) | **GET** /configuration | +*MetadataApi* | [**get_account_detail**](docs/MetadataApi.md#get_account_detail) | **GET** /detail/account | +*MetadataApi* | [**get_account_metrics**](docs/MetadataApi.md#get_account_metrics) | **GET** /metrics/account | +*MetadataApi* | [**get_environment_detail**](docs/MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | +*MetadataApi* | [**get_environment_metrics**](docs/MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | +*MetadataApi* | [**get_frontend_detail**](docs/MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | +*MetadataApi* | [**get_share_detail**](docs/MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | +*MetadataApi* | [**get_share_metrics**](docs/MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | +*MetadataApi* | [**get_sparklines**](docs/MetadataApi.md#get_sparklines) | **POST** /sparklines | +*MetadataApi* | [**list_memberships**](docs/MetadataApi.md#list_memberships) | **GET** /memberships | +*MetadataApi* | [**list_org_members**](docs/MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | +*MetadataApi* | [**org_account_overview**](docs/MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | +*MetadataApi* | [**overview**](docs/MetadataApi.md#overview) | **GET** /overview | +*MetadataApi* | [**version**](docs/MetadataApi.md#version) | **GET** /version | +*MetadataApi* | [**version_inventory**](docs/MetadataApi.md#version_inventory) | **GET** /versions | +*ShareApi* | [**access**](docs/ShareApi.md#access) | **POST** /access | +*ShareApi* | [**share**](docs/ShareApi.md#share) | **POST** /share | +*ShareApi* | [**unaccess**](docs/ShareApi.md#unaccess) | **DELETE** /unaccess | +*ShareApi* | [**unshare**](docs/ShareApi.md#unshare) | **DELETE** /unshare | +*ShareApi* | [**update_access**](docs/ShareApi.md#update_access) | **PATCH** /access | +*ShareApi* | [**update_share**](docs/ShareApi.md#update_share) | **PATCH** /share | + +## Documentation For Models + + - [AccessBody](docs/AccessBody.md) + - [AccessBody1](docs/AccessBody1.md) + - [AccountBody](docs/AccountBody.md) + - [AuthUser](docs/AuthUser.md) + - [ChangePasswordBody](docs/ChangePasswordBody.md) + - [ClientVersionCheckBody](docs/ClientVersionCheckBody.md) + - [Configuration](docs/Configuration.md) + - [DisableBody](docs/DisableBody.md) + - [EnableBody](docs/EnableBody.md) + - [Environment](docs/Environment.md) + - [EnvironmentAndResources](docs/EnvironmentAndResources.md) + - [Environments](docs/Environments.md) + - [ErrorMessage](docs/ErrorMessage.md) + - [Frontend](docs/Frontend.md) + - [FrontendBody](docs/FrontendBody.md) + - [FrontendBody1](docs/FrontendBody1.md) + - [FrontendBody2](docs/FrontendBody2.md) + - [Frontends](docs/Frontends.md) + - [GrantsBody](docs/GrantsBody.md) + - [IdentityBody](docs/IdentityBody.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) + - [InlineResponse2002](docs/InlineResponse2002.md) + - [InlineResponse2003](docs/InlineResponse2003.md) + - [InlineResponse2003Members](docs/InlineResponse2003Members.md) + - [InlineResponse2004](docs/InlineResponse2004.md) + - [InlineResponse2004Organizations](docs/InlineResponse2004Organizations.md) + - [InlineResponse2005](docs/InlineResponse2005.md) + - [InlineResponse2005Memberships](docs/InlineResponse2005Memberships.md) + - [InlineResponse2006](docs/InlineResponse2006.md) + - [InlineResponse2007](docs/InlineResponse2007.md) + - [InlineResponse201](docs/InlineResponse201.md) + - [InlineResponse2011](docs/InlineResponse2011.md) + - [InlineResponse2012](docs/InlineResponse2012.md) + - [InlineResponse2013](docs/InlineResponse2013.md) + - [InviteBody](docs/InviteBody.md) + - [LoginBody](docs/LoginBody.md) + - [Metrics](docs/Metrics.md) + - [MetricsSample](docs/MetricsSample.md) + - [OrganizationAddBody](docs/OrganizationAddBody.md) + - [OrganizationBody](docs/OrganizationBody.md) + - [OrganizationBody1](docs/OrganizationBody1.md) + - [OrganizationListBody](docs/OrganizationListBody.md) + - [OrganizationRemoveBody](docs/OrganizationRemoveBody.md) + - [Overview](docs/Overview.md) + - [Principal](docs/Principal.md) + - [RegenerateAccountTokenBody](docs/RegenerateAccountTokenBody.md) + - [RegisterBody](docs/RegisterBody.md) + - [ResetPasswordBody](docs/ResetPasswordBody.md) + - [ResetPasswordRequestBody](docs/ResetPasswordRequestBody.md) + - [Share](docs/Share.md) + - [ShareBody](docs/ShareBody.md) + - [ShareRequest](docs/ShareRequest.md) + - [ShareResponse](docs/ShareResponse.md) + - [Shares](docs/Shares.md) + - [SparkData](docs/SparkData.md) + - [SparkDataSample](docs/SparkDataSample.md) + - [SparklinesBody](docs/SparklinesBody.md) + - [TokenGenerateBody](docs/TokenGenerateBody.md) + - [UnaccessBody](docs/UnaccessBody.md) + - [UnshareBody](docs/UnshareBody.md) + - [VerifyBody](docs/VerifyBody.md) + - [Version](docs/Version.md) + +## Documentation For Authorization + + +## key + +- **Type**: API key +- **API key parameter name**: x-token +- **Location**: HTTP header + + +## Author + + diff --git a/sdk/python/sdk/zrok/setup.py b/sdk/python/sdk/zrok/setup.py index 801f64a3..a58ce211 100644 --- a/sdk/python/sdk/zrok/setup.py +++ b/sdk/python/sdk/zrok/setup.py @@ -12,7 +12,7 @@ VERSION = "1.0.0" # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil", "openziti >= 0.8.1"] +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil", "openziti >= 1.0.0"] setup( name=NAME, diff --git a/sdk/python/sdk/zrok/zrok/access.py b/sdk/python/sdk/zrok/zrok/access.py index dc3a1dfd..8c91e869 100644 --- a/sdk/python/sdk/zrok/zrok/access.py +++ b/sdk/python/sdk/zrok/zrok/access.py @@ -1,5 +1,6 @@ from zrok.environment.root import Root -from zrok_api.models import AccessRequest, UnaccessRequest +from zrok_api.models.access_request import AccessRequest +from zrok_api.models.unaccess_request import UnaccessRequest from zrok_api.api import ShareApi from zrok import model diff --git a/sdk/python/sdk/zrok/zrok/environment/root.py b/sdk/python/sdk/zrok/zrok/environment/root.py index ad7ae6ef..5ce3026d 100644 --- a/sdk/python/sdk/zrok/zrok/environment/root.py +++ b/sdk/python/sdk/zrok/zrok/environment/root.py @@ -7,8 +7,7 @@ import zrok_api as zrok from zrok_api.configuration import Configuration import re -V = "v0.4" - +V = "v1.0" @dataclass class Metadata: @@ -52,12 +51,7 @@ class Root: cfg.api_key_prefix['Authorization'] = 'Bearer' zrock_client = zrok.ApiClient(configuration=cfg) - v = zrok.MetadataApi(zrock_client).version() - # allow reported version string to be optionally prefixed with - # "refs/heads/" or "refs/tags/" - rxp = re.compile("^(refs/(heads|tags)/)?" + V) - if not rxp.match(v): - raise Exception("expected a '" + V + "' version, received: '" + v + "'") + self.client_version_check(zrock_client) # Perform version check return zrock_client def ApiEndpoint(self) -> ApiEndpoint: @@ -91,6 +85,22 @@ class Root: def ZitiIdentityNamed(self, name: str) -> str: return identityFile(name) + def client_version_check(self, zrock_client): + """Check if the client version is compatible with the API.""" + metadata_api = zrok.MetadataApi(zrock_client) + try: + print(f"Sending client version: {V}") # Log the version being sent + data, status_code, headers = metadata_api.client_version_check_with_http_info(body={"clientVersion": V}) + + # Check if the response status code is 200 OK + if status_code != 200: + raise Exception(f"Client version check failed: Unexpected status code {status_code}") + + # Success case - status code is 200 and empty response body is expected + return + + except Exception as e: + raise Exception(f"Client version check failed: {str(e)}") def Default() -> Root: r = Root() diff --git a/sdk/python/sdk/zrok/zrok/share.py b/sdk/python/sdk/zrok/zrok/share.py index 918f5c6a..4b861bf4 100644 --- a/sdk/python/sdk/zrok/zrok/share.py +++ b/sdk/python/sdk/zrok/zrok/share.py @@ -1,7 +1,9 @@ -from zrok.environment.root import Root -from zrok_api.models import ShareRequest, UnshareRequest, AuthUser -from zrok_api.api import ShareApi from zrok import model +from zrok_api.api import ShareApi +from zrok.environment.root import Root +from zrok_api.models.auth_user import AuthUser +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.unshare_request import UnshareRequest class Share(): @@ -58,7 +60,7 @@ def CreateShare(root: Root, request: model.ShareRequest) -> model.Share: except Exception as e: raise Exception("unable to create share", e) - return model.Share(Token=res.shr_token, + return model.Share(Token=res.share_token, FrontendEndpoints=res.frontend_proxy_endpoints) diff --git a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py index a07654db..4b93eb04 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py @@ -111,7 +111,8 @@ class MetadataApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/clientVersionCheck', 'POST', + # '/clientVersionCheck', 'POST', + '/version', 'POST', path_params, query_params, header_params, From 0074ad8ff518023b531c82eef809984f8bed6917 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 27 Feb 2025 15:46:47 -0500 Subject: [PATCH 03/56] finish v1 py sdk mvp --- bin/python_config.json | 2 +- sdk/python/examples/pastebin/requirements.txt | 5 ++--- sdk/python/examples/proxy/requirements.txt | 1 + sdk/python/sdk/zrok/zrok/access.py | 4 ++-- sdk/python/sdk/zrok/zrok/environment/root.py | 7 +++---- sdk/python/sdk/zrok/zrok_api/models/access_request.py | 2 +- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/bin/python_config.json b/bin/python_config.json index a1829e35..675595b6 100644 --- a/bin/python_config.json +++ b/bin/python_config.json @@ -1,4 +1,4 @@ { "packageName":"zrok_api", "projectName":"zrok_sdk" - } \ No newline at end of file +} diff --git a/sdk/python/examples/pastebin/requirements.txt b/sdk/python/examples/pastebin/requirements.txt index b927021b..94597b74 100644 --- a/sdk/python/examples/pastebin/requirements.txt +++ b/sdk/python/examples/pastebin/requirements.txt @@ -1,3 +1,2 @@ -openziti==0.8.1 -requests==2.31.0 -zrok \ No newline at end of file +zrok +requests \ No newline at end of file diff --git a/sdk/python/examples/proxy/requirements.txt b/sdk/python/examples/proxy/requirements.txt index 3db45633..639cc78b 100644 --- a/sdk/python/examples/proxy/requirements.txt +++ b/sdk/python/examples/proxy/requirements.txt @@ -1,3 +1,4 @@ +zrok flask requests waitress diff --git a/sdk/python/sdk/zrok/zrok/access.py b/sdk/python/sdk/zrok/zrok/access.py index 8c91e869..263bb3cd 100644 --- a/sdk/python/sdk/zrok/zrok/access.py +++ b/sdk/python/sdk/zrok/zrok/access.py @@ -37,9 +37,9 @@ def CreateAccess(root: Root, request: model.AccessRequest) -> model.Access: res = ShareApi(zrok).access(body=out) except Exception as e: raise Exception("unable to create access", e) - return model.Access(Token=res.frontend_token, + return model.Access(Token=res['frontendToken'], ShareToken=request.ShareToken, - BackendMode=res.backend_mode) + BackendMode=res['backendMode']) def DeleteAccess(root: Root, acc: model.Access): diff --git a/sdk/python/sdk/zrok/zrok/environment/root.py b/sdk/python/sdk/zrok/zrok/environment/root.py index 5ce3026d..f12a18ba 100644 --- a/sdk/python/sdk/zrok/zrok/environment/root.py +++ b/sdk/python/sdk/zrok/zrok/environment/root.py @@ -89,16 +89,15 @@ class Root: """Check if the client version is compatible with the API.""" metadata_api = zrok.MetadataApi(zrock_client) try: - print(f"Sending client version: {V}") # Log the version being sent data, status_code, headers = metadata_api.client_version_check_with_http_info(body={"clientVersion": V}) - + # Check if the response status code is 200 OK if status_code != 200: raise Exception(f"Client version check failed: Unexpected status code {status_code}") - + # Success case - status code is 200 and empty response body is expected return - + except Exception as e: raise Exception(f"Client version check failed: {str(e)}") diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_request.py b/sdk/python/sdk/zrok/zrok_api/models/access_request.py index e51ea20a..efb5bfc9 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/access_request.py +++ b/sdk/python/sdk/zrok/zrok_api/models/access_request.py @@ -34,7 +34,7 @@ class AccessRequest(object): attribute_map = { 'env_zid': 'envZId', - 'shr_token': 'shrToken' + 'shr_token': 'shareToken' } def __init__(self, env_zid=None, shr_token=None): # noqa: E501 From 8640a36dd76f6a0018acec2717e75695c8ff0e14 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 27 Feb 2025 16:57:53 -0500 Subject: [PATCH 04/56] regenerate Python api client with swagger-codegen v3 --- sdk/python/sdk/zrok/.swagger-codegen/VERSION | 2 +- sdk/python/sdk/zrok/zrok_api/__init__.py | 73 ++++--- .../sdk/zrok/zrok_api/api/account_api.py | 55 +++-- sdk/python/sdk/zrok/zrok_api/api/admin_api.py | 121 ++++------- .../sdk/zrok/zrok_api/api/environment_api.py | 19 +- .../sdk/zrok/zrok_api/api/metadata_api.py | 124 +++-------- sdk/python/sdk/zrok/zrok_api/api/share_api.py | 39 ++-- sdk/python/sdk/zrok/zrok_api/api_client.py | 32 ++- sdk/python/sdk/zrok/zrok_api/configuration.py | 45 ++-- .../sdk/zrok/zrok_api/models/__init__.py | 72 ++++--- .../sdk/zrok/zrok_api/models/access_body.py | 188 +++++++++++++++++ .../sdk/zrok/zrok_api/models/access_body1.py | 162 +++++++++++++++ .../sdk/zrok/zrok_api/models/account_body.py | 2 +- .../sdk/zrok/zrok_api/models/auth_user.py | 19 +- .../zrok_api/models/change_password_body.py | 162 +++++++++++++++ .../models/client_version_check_body.py | 110 ++++++++++ .../sdk/zrok/zrok_api/models/configuration.py | 19 +- .../sdk/zrok/zrok_api/models/disable_body.py | 110 ++++++++++ .../sdk/zrok/zrok_api/models/enable_body.py | 136 ++++++++++++ .../sdk/zrok/zrok_api/models/environment.py | 19 +- .../models/environment_and_resources.py | 19 +- .../sdk/zrok/zrok_api/models/environments.py | 17 +- .../sdk/zrok/zrok_api/models/error_message.py | 17 +- .../sdk/zrok/zrok_api/models/frontend.py | 19 +- .../sdk/zrok/zrok_api/models/frontend_body.py | 194 ++++++++++++++++++ .../zrok/zrok_api/models/frontend_body1.py | 110 ++++++++++ .../zrok/zrok_api/models/frontend_body2.py | 162 +++++++++++++++ .../sdk/zrok/zrok_api/models/frontends.py | 17 +- .../sdk/zrok/zrok_api/models/grants_body.py | 2 +- .../sdk/zrok/zrok_api/models/identity_body.py | 2 +- .../zrok_api/models/inline_response200.py | 177 ++-------------- .../zrok_api/models/inline_response2001.py | 36 ++-- .../zrok_api/models/inline_response2002.py | 166 +++++++++++++-- .../zrok_api/models/inline_response2003.py | 36 ++-- .../models/inline_response2003_members.py | 136 ++++++++++++ .../zrok_api/models/inline_response2004.py | 110 ++++++++++ .../inline_response2004_organizations.py | 136 ++++++++++++ .../zrok_api/models/inline_response2005.py | 110 ++++++++++ .../models/inline_response2005_memberships.py | 162 +++++++++++++++ .../zrok_api/models/inline_response2006.py | 110 ++++++++++ .../zrok_api/models/inline_response2007.py | 110 ++++++++++ .../zrok_api/models/inline_response201.py | 19 +- .../zrok_api/models/inline_response2011.py | 136 ++++++++++++ .../zrok_api/models/inline_response2012.py | 110 ++++++++++ .../zrok_api/models/inline_response2013.py | 136 ++++++++++++ .../sdk/zrok/zrok_api/models/invite_body.py | 136 ++++++++++++ .../sdk/zrok/zrok_api/models/login_body.py | 136 ++++++++++++ .../sdk/zrok/zrok_api/models/metrics.py | 19 +- .../zrok/zrok_api/models/metrics_sample.py | 19 +- .../zrok_api/models/organization_add_body.py | 32 +-- .../zrok/zrok_api/models/organization_body.py | 2 +- .../zrok_api/models/organization_body1.py | 32 +-- .../zrok_api/models/organization_list_body.py | 32 +-- .../models/organization_remove_body.py | 32 +-- .../sdk/zrok/zrok_api/models/overview.py | 19 +- .../sdk/zrok/zrok_api/models/principal.py | 19 +- .../models/regenerate_account_token_body.py | 110 ++++++++++ .../sdk/zrok/zrok_api/models/register_body.py | 136 ++++++++++++ .../zrok_api/models/reset_password_body.py | 136 ++++++++++++ .../models/reset_password_request_body.py | 2 +- sdk/python/sdk/zrok/zrok_api/models/share.py | 19 +- .../sdk/zrok/zrok_api/models/share_body.py | 188 +++++++++++++++++ .../sdk/zrok/zrok_api/models/share_request.py | 31 +-- .../zrok/zrok_api/models/share_response.py | 19 +- sdk/python/sdk/zrok/zrok_api/models/shares.py | 17 +- .../sdk/zrok/zrok_api/models/spark_data.py | 17 +- .../zrok/zrok_api/models/spark_data_sample.py | 19 +- .../zrok/zrok_api/models/sparklines_body.py | 162 +++++++++++++++ .../zrok_api/models/token_generate_body.py | 110 ++++++++++ .../sdk/zrok/zrok_api/models/unaccess_body.py | 162 +++++++++++++++ .../sdk/zrok/zrok_api/models/unshare_body.py | 162 +++++++++++++++ .../sdk/zrok/zrok_api/models/verify_body.py | 110 ++++++++++ .../sdk/zrok/zrok_api/models/version.py | 17 +- sdk/python/sdk/zrok/zrok_api/rest.py | 10 +- 74 files changed, 4711 insertions(+), 952 deletions(-) create mode 100644 sdk/python/sdk/zrok/zrok_api/models/access_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/access_body1.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/change_password_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/disable_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/enable_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/frontend_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/invite_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/login_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/register_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/share_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/unshare_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/verify_body.py diff --git a/sdk/python/sdk/zrok/.swagger-codegen/VERSION b/sdk/python/sdk/zrok/.swagger-codegen/VERSION index 24ade4ad..b262b4de 100644 --- a/sdk/python/sdk/zrok/.swagger-codegen/VERSION +++ b/sdk/python/sdk/zrok/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.43 \ No newline at end of file +3.0.51 \ No newline at end of file diff --git a/sdk/python/sdk/zrok/zrok_api/__init__.py b/sdk/python/sdk/zrok/zrok_api/__init__.py index 412c46f6..a231330e 100644 --- a/sdk/python/sdk/zrok/zrok_api/__init__.py +++ b/sdk/python/sdk/zrok/zrok_api/__init__.py @@ -12,7 +12,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import # import apis into sdk package @@ -21,58 +20,70 @@ from zrok_api.api.admin_api import AdminApi from zrok_api.api.environment_api import EnvironmentApi from zrok_api.api.metadata_api import MetadataApi from zrok_api.api.share_api import ShareApi - # import ApiClient from zrok_api.api_client import ApiClient from zrok_api.configuration import Configuration # import models into sdk package +from zrok_api.models.access_body import AccessBody +from zrok_api.models.access_body1 import AccessBody1 +from zrok_api.models.account_body import AccountBody from zrok_api.models.auth_user import AuthUser -from zrok_api.models.body import Body -from zrok_api.models.body1 import Body1 -from zrok_api.models.body10 import Body10 -from zrok_api.models.body11 import Body11 -from zrok_api.models.body12 import Body12 -from zrok_api.models.body13 import Body13 -from zrok_api.models.body14 import Body14 -from zrok_api.models.body15 import Body15 -from zrok_api.models.body16 import Body16 -from zrok_api.models.body17 import Body17 -from zrok_api.models.body18 import Body18 -from zrok_api.models.body19 import Body19 -from zrok_api.models.body2 import Body2 -from zrok_api.models.body20 import Body20 -from zrok_api.models.body21 import Body21 -from zrok_api.models.body22 import Body22 -from zrok_api.models.body23 import Body23 -from zrok_api.models.body24 import Body24 -from zrok_api.models.body25 import Body25 -from zrok_api.models.body26 import Body26 -from zrok_api.models.body27 import Body27 -from zrok_api.models.body28 import Body28 -from zrok_api.models.body3 import Body3 -from zrok_api.models.body4 import Body4 -from zrok_api.models.body5 import Body5 -from zrok_api.models.body6 import Body6 -from zrok_api.models.body7 import Body7 -from zrok_api.models.body8 import Body8 -from zrok_api.models.body9 import Body9 +from zrok_api.models.change_password_body import ChangePasswordBody +from zrok_api.models.client_version_check_body import ClientVersionCheckBody from zrok_api.models.configuration import Configuration +from zrok_api.models.disable_body import DisableBody +from zrok_api.models.enable_body import EnableBody from zrok_api.models.environment import Environment from zrok_api.models.environment_and_resources import EnvironmentAndResources from zrok_api.models.environments import Environments from zrok_api.models.error_message import ErrorMessage from zrok_api.models.frontend import Frontend +from zrok_api.models.frontend_body import FrontendBody +from zrok_api.models.frontend_body1 import FrontendBody1 +from zrok_api.models.frontend_body2 import FrontendBody2 from zrok_api.models.frontends import Frontends +from zrok_api.models.grants_body import GrantsBody +from zrok_api.models.identity_body import IdentityBody from zrok_api.models.inline_response200 import InlineResponse200 +from zrok_api.models.inline_response2001 import InlineResponse2001 +from zrok_api.models.inline_response2002 import InlineResponse2002 +from zrok_api.models.inline_response2003 import InlineResponse2003 +from zrok_api.models.inline_response2003_members import InlineResponse2003Members +from zrok_api.models.inline_response2004 import InlineResponse2004 +from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations +from zrok_api.models.inline_response2005 import InlineResponse2005 +from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships +from zrok_api.models.inline_response2006 import InlineResponse2006 +from zrok_api.models.inline_response2007 import InlineResponse2007 from zrok_api.models.inline_response201 import InlineResponse201 +from zrok_api.models.inline_response2011 import InlineResponse2011 +from zrok_api.models.inline_response2012 import InlineResponse2012 +from zrok_api.models.inline_response2013 import InlineResponse2013 +from zrok_api.models.invite_body import InviteBody +from zrok_api.models.login_body import LoginBody from zrok_api.models.metrics import Metrics from zrok_api.models.metrics_sample import MetricsSample +from zrok_api.models.organization_add_body import OrganizationAddBody +from zrok_api.models.organization_body import OrganizationBody +from zrok_api.models.organization_body1 import OrganizationBody1 +from zrok_api.models.organization_list_body import OrganizationListBody +from zrok_api.models.organization_remove_body import OrganizationRemoveBody from zrok_api.models.overview import Overview from zrok_api.models.principal import Principal +from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody +from zrok_api.models.register_body import RegisterBody +from zrok_api.models.reset_password_body import ResetPasswordBody +from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody from zrok_api.models.share import Share +from zrok_api.models.share_body import ShareBody from zrok_api.models.share_request import ShareRequest from zrok_api.models.share_response import ShareResponse from zrok_api.models.shares import Shares from zrok_api.models.spark_data import SparkData from zrok_api.models.spark_data_sample import SparkDataSample +from zrok_api.models.sparklines_body import SparklinesBody +from zrok_api.models.token_generate_body import TokenGenerateBody +from zrok_api.models.unaccess_body import UnaccessBody +from zrok_api.models.unshare_body import UnshareBody +from zrok_api.models.verify_body import VerifyBody from zrok_api.models.version import Version diff --git a/sdk/python/sdk/zrok/zrok_api/api/account_api.py b/sdk/python/sdk/zrok/zrok_api/api/account_api.py index 6166da61..8a85d9e1 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/account_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/account_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -42,7 +41,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body body: + :param ChangePasswordBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -63,7 +62,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body body: + :param ChangePasswordBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -135,7 +134,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body1 body: + :param InviteBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -156,7 +155,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body1 body: + :param InviteBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -228,7 +227,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body2 body: + :param LoginBody body: :return: str If the method is called asynchronously, returns the request thread. @@ -249,7 +248,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body2 body: + :param LoginBody body: :return: str If the method is called asynchronously, returns the request thread. @@ -321,8 +320,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body3 body: - :return: object + :param RegenerateAccountTokenBody body: + :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ @@ -342,8 +341,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body3 body: - :return: object + :param RegenerateAccountTokenBody body: + :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ @@ -397,7 +396,7 @@ class AccountApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse200', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -414,8 +413,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body4 body: - :return: object + :param RegisterBody body: + :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ @@ -435,8 +434,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body4 body: - :return: object + :param RegisterBody body: + :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ @@ -490,7 +489,7 @@ class AccountApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse200', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -507,7 +506,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body5 body: + :param ResetPasswordBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -528,7 +527,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body5 body: + :param ResetPasswordBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -600,7 +599,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body6 body: + :param ResetPasswordRequestBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -621,7 +620,7 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body6 body: + :param ResetPasswordRequestBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -657,10 +656,6 @@ class AccountApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -693,8 +688,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body7 body: - :return: object + :param VerifyBody body: + :return: InlineResponse2001 If the method is called asynchronously, returns the request thread. """ @@ -714,8 +709,8 @@ class AccountApi(object): >>> result = thread.get() :param async_req bool - :param Body7 body: - :return: object + :param VerifyBody body: + :return: InlineResponse2001 If the method is called asynchronously, returns the request thread. """ @@ -769,7 +764,7 @@ class AccountApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse2001', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py index b9649da7..081dbe65 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -42,7 +41,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body17 body: + :param OrganizationAddBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -63,7 +62,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body17 body: + :param OrganizationAddBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -99,10 +98,6 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -135,8 +130,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body8 body: - :return: object + :param AccountBody body: + :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ @@ -156,8 +151,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body8 body: - :return: object + :param AccountBody body: + :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ @@ -211,7 +206,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse200', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -228,7 +223,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body9 body: + :param FrontendBody body: :return: InlineResponse201 If the method is called asynchronously, returns the request thread. @@ -249,7 +244,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body9 body: + :param FrontendBody body: :return: InlineResponse201 If the method is called asynchronously, returns the request thread. @@ -321,8 +316,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body13 body: - :return: object + :param IdentityBody body: + :return: InlineResponse2011 If the method is called asynchronously, returns the request thread. """ @@ -342,8 +337,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body13 body: - :return: object + :param IdentityBody body: + :return: InlineResponse2011 If the method is called asynchronously, returns the request thread. """ @@ -397,7 +392,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse2011', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -414,8 +409,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body15 body: - :return: object + :param OrganizationBody body: + :return: InlineResponse2012 If the method is called asynchronously, returns the request thread. """ @@ -435,8 +430,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body15 body: - :return: object + :param OrganizationBody body: + :return: InlineResponse2012 If the method is called asynchronously, returns the request thread. """ @@ -490,7 +485,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse2012', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -507,7 +502,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body10 body: + :param FrontendBody1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -528,7 +523,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body10 body: + :param FrontendBody1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -564,10 +559,6 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -600,7 +591,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body16 body: + :param OrganizationBody1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -621,7 +612,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body16 body: + :param OrganizationBody1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -657,10 +648,6 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -693,7 +680,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body12 body: + :param GrantsBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -714,7 +701,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body12 body: + :param GrantsBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -750,10 +737,6 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -786,7 +769,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body14 body: + :param TokenGenerateBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -807,7 +790,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body14 body: + :param TokenGenerateBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -843,10 +826,6 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -879,7 +858,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :return: list[InlineResponse200] + :return: list[InlineResponse2002] If the method is called asynchronously, returns the request thread. """ @@ -899,7 +878,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :return: list[InlineResponse200] + :return: list[InlineResponse2002] If the method is called asynchronously, returns the request thread. """ @@ -936,10 +915,6 @@ class AdminApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -951,7 +926,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='list[InlineResponse200]', # noqa: E501 + response_type='list[InlineResponse2002]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -968,8 +943,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body18 body: - :return: object + :param OrganizationListBody body: + :return: InlineResponse2003 If the method is called asynchronously, returns the request thread. """ @@ -989,8 +964,8 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body18 body: - :return: object + :param OrganizationListBody body: + :return: InlineResponse2003 If the method is called asynchronously, returns the request thread. """ @@ -1044,7 +1019,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse2003', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1061,7 +1036,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :return: object + :return: InlineResponse2004 If the method is called asynchronously, returns the request thread. """ @@ -1081,7 +1056,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :return: object + :return: InlineResponse2004 If the method is called asynchronously, returns the request thread. """ @@ -1118,10 +1093,6 @@ class AdminApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -1133,7 +1104,7 @@ class AdminApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse2004', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1150,7 +1121,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body19 body: + :param OrganizationRemoveBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -1171,7 +1142,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body19 body: + :param OrganizationRemoveBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -1207,10 +1178,6 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -1243,7 +1210,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body11 body: + :param FrontendBody2 body: :return: None If the method is called asynchronously, returns the request thread. @@ -1264,7 +1231,7 @@ class AdminApi(object): >>> result = thread.get() :param async_req bool - :param Body11 body: + :param FrontendBody2 body: :return: None If the method is called asynchronously, returns the request thread. @@ -1300,10 +1267,6 @@ class AdminApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 diff --git a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py b/sdk/python/sdk/zrok/zrok_api/api/environment_api.py index a226f6df..16bc987e 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/environment_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -42,7 +41,7 @@ class EnvironmentApi(object): >>> result = thread.get() :param async_req bool - :param Body21 body: + :param DisableBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -63,7 +62,7 @@ class EnvironmentApi(object): >>> result = thread.get() :param async_req bool - :param Body21 body: + :param DisableBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -99,10 +98,6 @@ class EnvironmentApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -135,8 +130,8 @@ class EnvironmentApi(object): >>> result = thread.get() :param async_req bool - :param Body20 body: - :return: object + :param EnableBody body: + :return: InlineResponse2011 If the method is called asynchronously, returns the request thread. """ @@ -156,8 +151,8 @@ class EnvironmentApi(object): >>> result = thread.get() :param async_req bool - :param Body20 body: - :return: object + :param EnableBody body: + :return: InlineResponse2011 If the method is called asynchronously, returns the request thread. """ @@ -211,7 +206,7 @@ class EnvironmentApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse2011', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py index 4b93eb04..1afe9e25 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -42,7 +41,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :param Body22 body: + :param ClientVersionCheckBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -63,7 +62,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :param Body22 body: + :param ClientVersionCheckBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -111,8 +110,7 @@ class MetadataApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - # '/clientVersionCheck', 'POST', - '/version', 'POST', + '/clientVersionCheck', 'POST', path_params, query_params, header_params, @@ -193,10 +191,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 @@ -282,10 +276,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -375,10 +365,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -450,8 +436,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'env_zid' is set - if self.api_client.client_side_validation and ('env_zid' not in params or - params['env_zid'] is None): # noqa: E501 + if ('env_zid' not in params or + params['env_zid'] is None): raise ValueError("Missing the required parameter `env_zid` when calling `get_environment_detail`") # noqa: E501 collection_formats = {} @@ -472,10 +458,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -549,8 +531,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'env_id' is set - if self.api_client.client_side_validation and ('env_id' not in params or - params['env_id'] is None): # noqa: E501 + if ('env_id' not in params or + params['env_id'] is None): raise ValueError("Missing the required parameter `env_id` when calling `get_environment_metrics`") # noqa: E501 collection_formats = {} @@ -573,10 +555,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -648,8 +626,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'frontend_id' is set - if self.api_client.client_side_validation and ('frontend_id' not in params or - params['frontend_id'] is None): # noqa: E501 + if ('frontend_id' not in params or + params['frontend_id'] is None): raise ValueError("Missing the required parameter `frontend_id` when calling `get_frontend_detail`") # noqa: E501 collection_formats = {} @@ -670,10 +648,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -745,8 +719,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'share_token' is set - if self.api_client.client_side_validation and ('share_token' not in params or - params['share_token'] is None): # noqa: E501 + if ('share_token' not in params or + params['share_token'] is None): raise ValueError("Missing the required parameter `share_token` when calling `get_share_detail`") # noqa: E501 collection_formats = {} @@ -767,10 +741,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -844,8 +814,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'share_token' is set - if self.api_client.client_side_validation and ('share_token' not in params or - params['share_token'] is None): # noqa: E501 + if ('share_token' not in params or + params['share_token'] is None): raise ValueError("Missing the required parameter `share_token` when calling `get_share_metrics`") # noqa: E501 collection_formats = {} @@ -868,10 +838,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -900,8 +866,8 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :param Body23 body: - :return: object + :param SparklinesBody body: + :return: InlineResponse2006 If the method is called asynchronously, returns the request thread. """ @@ -921,8 +887,8 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :param Body23 body: - :return: object + :param SparklinesBody body: + :return: InlineResponse2006 If the method is called asynchronously, returns the request thread. """ @@ -976,7 +942,7 @@ class MetadataApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse2006', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -993,7 +959,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :return: object + :return: InlineResponse2005 If the method is called asynchronously, returns the request thread. """ @@ -1013,7 +979,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :return: object + :return: InlineResponse2005 If the method is called asynchronously, returns the request thread. """ @@ -1050,10 +1016,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -1065,7 +1027,7 @@ class MetadataApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse2005', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1083,7 +1045,7 @@ class MetadataApi(object): :param async_req bool :param str organization_token: (required) - :return: object + :return: InlineResponse2003 If the method is called asynchronously, returns the request thread. """ @@ -1104,7 +1066,7 @@ class MetadataApi(object): :param async_req bool :param str organization_token: (required) - :return: object + :return: InlineResponse2003 If the method is called asynchronously, returns the request thread. """ @@ -1125,8 +1087,8 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'organization_token' is set - if self.api_client.client_side_validation and ('organization_token' not in params or - params['organization_token'] is None): # noqa: E501 + if ('organization_token' not in params or + params['organization_token'] is None): raise ValueError("Missing the required parameter `organization_token` when calling `list_org_members`") # noqa: E501 collection_formats = {} @@ -1147,10 +1109,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -1162,7 +1120,7 @@ class MetadataApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse2003', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1224,12 +1182,12 @@ class MetadataApi(object): params[key] = val del params['kwargs'] # verify the required parameter 'organization_token' is set - if self.api_client.client_side_validation and ('organization_token' not in params or - params['organization_token'] is None): # noqa: E501 + if ('organization_token' not in params or + params['organization_token'] is None): raise ValueError("Missing the required parameter `organization_token` when calling `org_account_overview`") # noqa: E501 # verify the required parameter 'account_email' is set - if self.api_client.client_side_validation and ('account_email' not in params or - params['account_email'] is None): # noqa: E501 + if ('account_email' not in params or + params['account_email'] is None): raise ValueError("Missing the required parameter `account_email` when calling `org_account_overview`") # noqa: E501 collection_formats = {} @@ -1252,10 +1210,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -1341,10 +1295,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = ['key'] # noqa: E501 @@ -1430,10 +1380,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 @@ -1462,7 +1408,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :return: object + :return: InlineResponse2007 If the method is called asynchronously, returns the request thread. """ @@ -1482,7 +1428,7 @@ class MetadataApi(object): >>> result = thread.get() :param async_req bool - :return: object + :return: InlineResponse2007 If the method is called asynchronously, returns the request thread. """ @@ -1519,10 +1465,6 @@ class MetadataApi(object): header_params['Accept'] = self.api_client.select_header_accept( ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting auth_settings = [] # noqa: E501 @@ -1534,7 +1476,7 @@ class MetadataApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse2007', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/sdk/python/sdk/zrok/zrok_api/api/share_api.py b/sdk/python/sdk/zrok/zrok_api/api/share_api.py index 63090a4f..49362e17 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/share_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/share_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -42,8 +41,8 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param Body24 body: - :return: object + :param AccessBody body: + :return: InlineResponse2013 If the method is called asynchronously, returns the request thread. """ @@ -63,8 +62,8 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param Body24 body: - :return: object + :param AccessBody body: + :return: InlineResponse2013 If the method is called asynchronously, returns the request thread. """ @@ -118,7 +117,7 @@ class ShareApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_type='InlineResponse2013', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -228,7 +227,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param Body27 body: + :param UnaccessBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -249,7 +248,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param Body27 body: + :param UnaccessBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -285,10 +284,6 @@ class ShareApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -321,7 +316,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param Body28 body: + :param UnshareBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -342,7 +337,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param Body28 body: + :param UnshareBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -414,7 +409,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param Body25 body: + :param AccessBody1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -435,7 +430,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param Body25 body: + :param AccessBody1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -471,10 +466,6 @@ class ShareApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 @@ -507,7 +498,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param Body26 body: + :param ShareBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -528,7 +519,7 @@ class ShareApi(object): >>> result = thread.get() :param async_req bool - :param Body26 body: + :param ShareBody body: :return: None If the method is called asynchronously, returns the request thread. @@ -564,10 +555,6 @@ class ShareApi(object): body_params = None if 'body' in params: body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/zrok.v1+json']) # noqa: E501 diff --git a/sdk/python/sdk/zrok/zrok_api/api_client.py b/sdk/python/sdk/zrok/zrok_api/api_client.py index c8d822a5..e42ff0d2 100644 --- a/sdk/python/sdk/zrok/zrok_api/api_client.py +++ b/sdk/python/sdk/zrok/zrok_api/api_client.py @@ -66,8 +66,7 @@ class ApiClient(object): configuration = Configuration() self.configuration = configuration - # Use the pool property to lazily initialize the ThreadPool. - self._pool = None + self.pool = ThreadPool() self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: @@ -75,18 +74,10 @@ class ApiClient(object): self.cookie = cookie # Set default User-Agent. self.user_agent = 'Swagger-Codegen/1.0.0/python' - self.client_side_validation = configuration.client_side_validation def __del__(self): - if self._pool is not None: - self._pool.close() - self._pool.join() - - @property - def pool(self): - if self._pool is None: - self._pool = ThreadPool() - return self._pool + self.pool.close() + self.pool.join() @property def user_agent(self): @@ -533,10 +524,14 @@ class ApiClient(object): filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) - - with open(path, "w") as f: - f.write(response.data) - + response_data = response.data + with open(path, "wb") as f: + if isinstance(response_data, str): + # change str to bytes so we can write it + response_data = response_data.encode('utf-8') + f.write(response_data) + else: + f.write(response_data) return path def __deserialize_primitive(self, data, klass): @@ -601,7 +596,7 @@ class ApiClient(object): ) def __hasattr(self, object, name): - return name in object.__class__.__dict__ + return name in object.__class__.__dict__ def __deserialize_model(self, data, klass): """Deserializes list or dict to model. @@ -611,8 +606,7 @@ class ApiClient(object): :return: model object. """ - if (not klass.swagger_types and - not self.__hasattr(klass, 'get_real_child_model')): + if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): return data kwargs = {} diff --git a/sdk/python/sdk/zrok/zrok_api/configuration.py b/sdk/python/sdk/zrok/zrok_api/configuration.py index 4b3f8d38..331c27b7 100644 --- a/sdk/python/sdk/zrok/zrok_api/configuration.py +++ b/sdk/python/sdk/zrok/zrok_api/configuration.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import copy @@ -23,24 +22,31 @@ import six from six.moves import http_client as httplib -class Configuration(object): +class TypeWithDefault(type): + def __init__(cls, name, bases, dct): + super(TypeWithDefault, cls).__init__(name, bases, dct) + cls._default = None + + def __call__(cls): + if cls._default is None: + cls._default = type.__call__(cls) + return copy.copy(cls._default) + + def set_default(cls, default): + cls._default = copy.copy(default) + + +class Configuration(six.with_metaclass(TypeWithDefault, object)): """NOTE: This class is auto generated by the swagger code generator program. Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually. """ - _default = None - def __init__(self): """Constructor""" - if self._default: - for key in self._default.__dict__.keys(): - self.__dict__[key] = copy.copy(self._default.__dict__[key]) - return - # Default Base url - self.host = "http://localhost/api/v1" + self.host = "/api/v1" # Temp file folder for downloading files self.temp_folder_path = None @@ -55,7 +61,6 @@ class Configuration(object): self.username = "" # Password for HTTP basic authentication self.password = "" - # Logging Settings self.logger = {} self.logger["package_logger"] = logging.getLogger("zrok_api") @@ -96,13 +101,6 @@ class Configuration(object): # Safe chars for path_param self.safe_chars_for_path_param = '' - # Disable client side validation - self.client_side_validation = True - - @classmethod - def set_default(cls, default): - cls._default = default - @property def logger_file(self): """The logger file. @@ -205,7 +203,6 @@ class Configuration(object): :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ - if self.refresh_api_key_hook: self.refresh_api_key_hook(self) @@ -222,12 +219,9 @@ class Configuration(object): :return: The token for basic HTTP authentication. """ - token = "" - if self.username or self.password: - token = urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - return token + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') def auth_settings(self): """Gets Auth Settings dict for api client. @@ -242,7 +236,6 @@ class Configuration(object): 'key': 'x-token', 'value': self.get_api_key_with_prefix('x-token') }, - } def to_debug_report(self): diff --git a/sdk/python/sdk/zrok/zrok_api/models/__init__.py b/sdk/python/sdk/zrok/zrok_api/models/__init__.py index ead7e734..c59710d3 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/__init__.py +++ b/sdk/python/sdk/zrok/zrok_api/models/__init__.py @@ -11,57 +11,69 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import # import models into model package +from zrok_api.models.access_body import AccessBody +from zrok_api.models.access_body1 import AccessBody1 +from zrok_api.models.account_body import AccountBody from zrok_api.models.auth_user import AuthUser -from zrok_api.models.body import Body -from zrok_api.models.body1 import Body1 -from zrok_api.models.body10 import Body10 -from zrok_api.models.body11 import Body11 -from zrok_api.models.body12 import Body12 -from zrok_api.models.body13 import Body13 -from zrok_api.models.body14 import Body14 -from zrok_api.models.body15 import Body15 -from zrok_api.models.body16 import Body16 -from zrok_api.models.body17 import Body17 -from zrok_api.models.body18 import Body18 -from zrok_api.models.body19 import Body19 -from zrok_api.models.body2 import Body2 -from zrok_api.models.body20 import Body20 -from zrok_api.models.body21 import Body21 -from zrok_api.models.body22 import Body22 -from zrok_api.models.body23 import Body23 -from zrok_api.models.body24 import Body24 -from zrok_api.models.body25 import Body25 -from zrok_api.models.body26 import Body26 -from zrok_api.models.body27 import Body27 -from zrok_api.models.body28 import Body28 -from zrok_api.models.body3 import Body3 -from zrok_api.models.body4 import Body4 -from zrok_api.models.body5 import Body5 -from zrok_api.models.body6 import Body6 -from zrok_api.models.body7 import Body7 -from zrok_api.models.body8 import Body8 -from zrok_api.models.body9 import Body9 +from zrok_api.models.change_password_body import ChangePasswordBody +from zrok_api.models.client_version_check_body import ClientVersionCheckBody from zrok_api.models.configuration import Configuration +from zrok_api.models.disable_body import DisableBody +from zrok_api.models.enable_body import EnableBody from zrok_api.models.environment import Environment from zrok_api.models.environment_and_resources import EnvironmentAndResources from zrok_api.models.environments import Environments from zrok_api.models.error_message import ErrorMessage from zrok_api.models.frontend import Frontend +from zrok_api.models.frontend_body import FrontendBody +from zrok_api.models.frontend_body1 import FrontendBody1 +from zrok_api.models.frontend_body2 import FrontendBody2 from zrok_api.models.frontends import Frontends +from zrok_api.models.grants_body import GrantsBody +from zrok_api.models.identity_body import IdentityBody from zrok_api.models.inline_response200 import InlineResponse200 +from zrok_api.models.inline_response2001 import InlineResponse2001 +from zrok_api.models.inline_response2002 import InlineResponse2002 +from zrok_api.models.inline_response2003 import InlineResponse2003 +from zrok_api.models.inline_response2003_members import InlineResponse2003Members +from zrok_api.models.inline_response2004 import InlineResponse2004 +from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations +from zrok_api.models.inline_response2005 import InlineResponse2005 +from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships +from zrok_api.models.inline_response2006 import InlineResponse2006 +from zrok_api.models.inline_response2007 import InlineResponse2007 from zrok_api.models.inline_response201 import InlineResponse201 +from zrok_api.models.inline_response2011 import InlineResponse2011 +from zrok_api.models.inline_response2012 import InlineResponse2012 +from zrok_api.models.inline_response2013 import InlineResponse2013 +from zrok_api.models.invite_body import InviteBody +from zrok_api.models.login_body import LoginBody from zrok_api.models.metrics import Metrics from zrok_api.models.metrics_sample import MetricsSample +from zrok_api.models.organization_add_body import OrganizationAddBody +from zrok_api.models.organization_body import OrganizationBody +from zrok_api.models.organization_body1 import OrganizationBody1 +from zrok_api.models.organization_list_body import OrganizationListBody +from zrok_api.models.organization_remove_body import OrganizationRemoveBody from zrok_api.models.overview import Overview from zrok_api.models.principal import Principal +from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody +from zrok_api.models.register_body import RegisterBody +from zrok_api.models.reset_password_body import ResetPasswordBody +from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody from zrok_api.models.share import Share +from zrok_api.models.share_body import ShareBody from zrok_api.models.share_request import ShareRequest from zrok_api.models.share_response import ShareResponse from zrok_api.models.shares import Shares from zrok_api.models.spark_data import SparkData from zrok_api.models.spark_data_sample import SparkDataSample +from zrok_api.models.sparklines_body import SparklinesBody +from zrok_api.models.token_generate_body import TokenGenerateBody +from zrok_api.models.unaccess_body import UnaccessBody +from zrok_api.models.unshare_body import UnshareBody +from zrok_api.models.verify_body import VerifyBody from zrok_api.models.version import Version diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_body.py b/sdk/python/sdk/zrok/zrok_api/models/access_body.py new file mode 100644 index 00000000..ca0ded7f --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/access_body.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AccessBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'env_zid': 'str', + 'share_token': 'str', + 'bind_address': 'str', + 'description': 'str' + } + + attribute_map = { + 'env_zid': 'envZId', + 'share_token': 'shareToken', + 'bind_address': 'bindAddress', + 'description': 'description' + } + + def __init__(self, env_zid=None, share_token=None, bind_address=None, description=None): # noqa: E501 + """AccessBody - a model defined in Swagger""" # noqa: E501 + self._env_zid = None + self._share_token = None + self._bind_address = None + self._description = None + self.discriminator = None + if env_zid is not None: + self.env_zid = env_zid + if share_token is not None: + self.share_token = share_token + if bind_address is not None: + self.bind_address = bind_address + if description is not None: + self.description = description + + @property + def env_zid(self): + """Gets the env_zid of this AccessBody. # noqa: E501 + + + :return: The env_zid of this AccessBody. # noqa: E501 + :rtype: str + """ + return self._env_zid + + @env_zid.setter + def env_zid(self, env_zid): + """Sets the env_zid of this AccessBody. + + + :param env_zid: The env_zid of this AccessBody. # noqa: E501 + :type: str + """ + + self._env_zid = env_zid + + @property + def share_token(self): + """Gets the share_token of this AccessBody. # noqa: E501 + + + :return: The share_token of this AccessBody. # noqa: E501 + :rtype: str + """ + return self._share_token + + @share_token.setter + def share_token(self, share_token): + """Sets the share_token of this AccessBody. + + + :param share_token: The share_token of this AccessBody. # noqa: E501 + :type: str + """ + + self._share_token = share_token + + @property + def bind_address(self): + """Gets the bind_address of this AccessBody. # noqa: E501 + + + :return: The bind_address of this AccessBody. # noqa: E501 + :rtype: str + """ + return self._bind_address + + @bind_address.setter + def bind_address(self, bind_address): + """Sets the bind_address of this AccessBody. + + + :param bind_address: The bind_address of this AccessBody. # noqa: E501 + :type: str + """ + + self._bind_address = bind_address + + @property + def description(self): + """Gets the description of this AccessBody. # noqa: E501 + + + :return: The description of this AccessBody. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this AccessBody. + + + :param description: The description of this AccessBody. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AccessBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccessBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_body1.py b/sdk/python/sdk/zrok/zrok_api/models/access_body1.py new file mode 100644 index 00000000..97855ec4 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/access_body1.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AccessBody1(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'frontend_token': 'str', + 'bind_address': 'str', + 'description': 'str' + } + + attribute_map = { + 'frontend_token': 'frontendToken', + 'bind_address': 'bindAddress', + 'description': 'description' + } + + def __init__(self, frontend_token=None, bind_address=None, description=None): # noqa: E501 + """AccessBody1 - a model defined in Swagger""" # noqa: E501 + self._frontend_token = None + self._bind_address = None + self._description = None + self.discriminator = None + if frontend_token is not None: + self.frontend_token = frontend_token + if bind_address is not None: + self.bind_address = bind_address + if description is not None: + self.description = description + + @property + def frontend_token(self): + """Gets the frontend_token of this AccessBody1. # noqa: E501 + + + :return: The frontend_token of this AccessBody1. # noqa: E501 + :rtype: str + """ + return self._frontend_token + + @frontend_token.setter + def frontend_token(self, frontend_token): + """Sets the frontend_token of this AccessBody1. + + + :param frontend_token: The frontend_token of this AccessBody1. # noqa: E501 + :type: str + """ + + self._frontend_token = frontend_token + + @property + def bind_address(self): + """Gets the bind_address of this AccessBody1. # noqa: E501 + + + :return: The bind_address of this AccessBody1. # noqa: E501 + :rtype: str + """ + return self._bind_address + + @bind_address.setter + def bind_address(self, bind_address): + """Sets the bind_address of this AccessBody1. + + + :param bind_address: The bind_address of this AccessBody1. # noqa: E501 + :type: str + """ + + self._bind_address = bind_address + + @property + def description(self): + """Gets the description of this AccessBody1. # noqa: E501 + + + :return: The description of this AccessBody1. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this AccessBody1. + + + :param description: The description of this AccessBody1. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AccessBody1, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccessBody1): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/account_body.py b/sdk/python/sdk/zrok/zrok_api/models/account_body.py index 2447dea1..ea261eb0 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/account_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/account_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py b/sdk/python/sdk/zrok/zrok_api/models/auth_user.py index 71c88cd4..0a04dc10 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py +++ b/sdk/python/sdk/zrok/zrok_api/models/auth_user.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class AuthUser(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -42,16 +37,11 @@ class AuthUser(object): 'password': 'password' } - def __init__(self, username=None, password=None, _configuration=None): # noqa: E501 + def __init__(self, username=None, password=None): # noqa: E501 """AuthUser - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._username = None self._password = None self.discriminator = None - if username is not None: self.username = username if password is not None: @@ -139,11 +129,8 @@ class AuthUser(object): if not isinstance(other, AuthUser): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, AuthUser): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/change_password_body.py b/sdk/python/sdk/zrok/zrok_api/models/change_password_body.py new file mode 100644 index 00000000..8c12afb1 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/change_password_body.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ChangePasswordBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'old_password': 'str', + 'new_password': 'str' + } + + attribute_map = { + 'email': 'email', + 'old_password': 'oldPassword', + 'new_password': 'newPassword' + } + + def __init__(self, email=None, old_password=None, new_password=None): # noqa: E501 + """ChangePasswordBody - a model defined in Swagger""" # noqa: E501 + self._email = None + self._old_password = None + self._new_password = None + self.discriminator = None + if email is not None: + self.email = email + if old_password is not None: + self.old_password = old_password + if new_password is not None: + self.new_password = new_password + + @property + def email(self): + """Gets the email of this ChangePasswordBody. # noqa: E501 + + + :return: The email of this ChangePasswordBody. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this ChangePasswordBody. + + + :param email: The email of this ChangePasswordBody. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def old_password(self): + """Gets the old_password of this ChangePasswordBody. # noqa: E501 + + + :return: The old_password of this ChangePasswordBody. # noqa: E501 + :rtype: str + """ + return self._old_password + + @old_password.setter + def old_password(self, old_password): + """Sets the old_password of this ChangePasswordBody. + + + :param old_password: The old_password of this ChangePasswordBody. # noqa: E501 + :type: str + """ + + self._old_password = old_password + + @property + def new_password(self): + """Gets the new_password of this ChangePasswordBody. # noqa: E501 + + + :return: The new_password of this ChangePasswordBody. # noqa: E501 + :rtype: str + """ + return self._new_password + + @new_password.setter + def new_password(self, new_password): + """Sets the new_password of this ChangePasswordBody. + + + :param new_password: The new_password of this ChangePasswordBody. # noqa: E501 + :type: str + """ + + self._new_password = new_password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ChangePasswordBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ChangePasswordBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py b/sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py new file mode 100644 index 00000000..9aae0f54 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ClientVersionCheckBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'client_version': 'str' + } + + attribute_map = { + 'client_version': 'clientVersion' + } + + def __init__(self, client_version=None): # noqa: E501 + """ClientVersionCheckBody - a model defined in Swagger""" # noqa: E501 + self._client_version = None + self.discriminator = None + if client_version is not None: + self.client_version = client_version + + @property + def client_version(self): + """Gets the client_version of this ClientVersionCheckBody. # noqa: E501 + + + :return: The client_version of this ClientVersionCheckBody. # noqa: E501 + :rtype: str + """ + return self._client_version + + @client_version.setter + def client_version(self, client_version): + """Sets the client_version of this ClientVersionCheckBody. + + + :param client_version: The client_version of this ClientVersionCheckBody. # noqa: E501 + :type: str + """ + + self._client_version = client_version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ClientVersionCheckBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ClientVersionCheckBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/configuration.py b/sdk/python/sdk/zrok/zrok_api/models/configuration.py index 287e5e3b..6f1f70b5 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/configuration.py +++ b/sdk/python/sdk/zrok/zrok_api/models/configuration.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class Configuration(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -48,19 +43,14 @@ class Configuration(object): 'invite_token_contact': 'inviteTokenContact' } - def __init__(self, version=None, tou_link=None, invites_open=None, requires_invite_token=None, invite_token_contact=None, _configuration=None): # noqa: E501 + def __init__(self, version=None, tou_link=None, invites_open=None, requires_invite_token=None, invite_token_contact=None): # noqa: E501 """Configuration - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._version = None self._tou_link = None self._invites_open = None self._requires_invite_token = None self._invite_token_contact = None self.discriminator = None - if version is not None: self.version = version if tou_link is not None: @@ -217,11 +207,8 @@ class Configuration(object): if not isinstance(other, Configuration): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Configuration): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/disable_body.py b/sdk/python/sdk/zrok/zrok_api/models/disable_body.py new file mode 100644 index 00000000..bfb40a4a --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/disable_body.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class DisableBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'identity': 'str' + } + + attribute_map = { + 'identity': 'identity' + } + + def __init__(self, identity=None): # noqa: E501 + """DisableBody - a model defined in Swagger""" # noqa: E501 + self._identity = None + self.discriminator = None + if identity is not None: + self.identity = identity + + @property + def identity(self): + """Gets the identity of this DisableBody. # noqa: E501 + + + :return: The identity of this DisableBody. # noqa: E501 + :rtype: str + """ + return self._identity + + @identity.setter + def identity(self, identity): + """Sets the identity of this DisableBody. + + + :param identity: The identity of this DisableBody. # noqa: E501 + :type: str + """ + + self._identity = identity + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DisableBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DisableBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/enable_body.py b/sdk/python/sdk/zrok/zrok_api/models/enable_body.py new file mode 100644 index 00000000..49ac0279 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/enable_body.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EnableBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'host': 'str' + } + + attribute_map = { + 'description': 'description', + 'host': 'host' + } + + def __init__(self, description=None, host=None): # noqa: E501 + """EnableBody - a model defined in Swagger""" # noqa: E501 + self._description = None + self._host = None + self.discriminator = None + if description is not None: + self.description = description + if host is not None: + self.host = host + + @property + def description(self): + """Gets the description of this EnableBody. # noqa: E501 + + + :return: The description of this EnableBody. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EnableBody. + + + :param description: The description of this EnableBody. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def host(self): + """Gets the host of this EnableBody. # noqa: E501 + + + :return: The host of this EnableBody. # noqa: E501 + :rtype: str + """ + return self._host + + @host.setter + def host(self, host): + """Sets the host of this EnableBody. + + + :param host: The host of this EnableBody. # noqa: E501 + :type: str + """ + + self._host = host + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EnableBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EnableBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment.py b/sdk/python/sdk/zrok/zrok_api/models/environment.py index c62eae4d..53c85559 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/environment.py +++ b/sdk/python/sdk/zrok/zrok_api/models/environment.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class Environment(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -54,12 +49,8 @@ class Environment(object): 'updated_at': 'updatedAt' } - def __init__(self, description=None, host=None, address=None, z_id=None, activity=None, limited=None, created_at=None, updated_at=None, _configuration=None): # noqa: E501 + def __init__(self, description=None, host=None, address=None, z_id=None, activity=None, limited=None, created_at=None, updated_at=None): # noqa: E501 """Environment - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._description = None self._host = None self._address = None @@ -69,7 +60,6 @@ class Environment(object): self._created_at = None self._updated_at = None self.discriminator = None - if description is not None: self.description = description if host is not None: @@ -295,11 +285,8 @@ class Environment(object): if not isinstance(other, Environment): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Environment): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py b/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py index 08993437..12c466bb 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py +++ b/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class EnvironmentAndResources(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -44,17 +39,12 @@ class EnvironmentAndResources(object): 'shares': 'shares' } - def __init__(self, environment=None, frontends=None, shares=None, _configuration=None): # noqa: E501 + def __init__(self, environment=None, frontends=None, shares=None): # noqa: E501 """EnvironmentAndResources - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._environment = None self._frontends = None self._shares = None self.discriminator = None - if environment is not None: self.environment = environment if frontends is not None: @@ -165,11 +155,8 @@ class EnvironmentAndResources(object): if not isinstance(other, EnvironmentAndResources): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, EnvironmentAndResources): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/environments.py b/sdk/python/sdk/zrok/zrok_api/models/environments.py index eb9d952b..e6d72d56 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/environments.py +++ b/sdk/python/sdk/zrok/zrok_api/models/environments.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class Environments(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -38,11 +33,8 @@ class Environments(object): attribute_map = { } - def __init__(self, _configuration=None): # noqa: E501 + def __init__(self): # noqa: E501 """Environments - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -85,11 +77,8 @@ class Environments(object): if not isinstance(other, Environments): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Environments): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/error_message.py b/sdk/python/sdk/zrok/zrok_api/models/error_message.py index 2ab5490f..19325187 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/error_message.py +++ b/sdk/python/sdk/zrok/zrok_api/models/error_message.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class ErrorMessage(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -38,11 +33,8 @@ class ErrorMessage(object): attribute_map = { } - def __init__(self, _configuration=None): # noqa: E501 + def __init__(self): # noqa: E501 """ErrorMessage - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -85,11 +77,8 @@ class ErrorMessage(object): if not isinstance(other, ErrorMessage): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, ErrorMessage): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend.py b/sdk/python/sdk/zrok/zrok_api/models/frontend.py index 2d344c7b..46cf93eb 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend.py +++ b/sdk/python/sdk/zrok/zrok_api/models/frontend.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class Frontend(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -56,12 +51,8 @@ class Frontend(object): 'updated_at': 'updatedAt' } - def __init__(self, id=None, frontend_token=None, share_token=None, backend_mode=None, bind_address=None, description=None, z_id=None, created_at=None, updated_at=None, _configuration=None): # noqa: E501 + def __init__(self, id=None, frontend_token=None, share_token=None, backend_mode=None, bind_address=None, description=None, z_id=None, created_at=None, updated_at=None): # noqa: E501 """Frontend - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._id = None self._frontend_token = None self._share_token = None @@ -72,7 +63,6 @@ class Frontend(object): self._created_at = None self._updated_at = None self.discriminator = None - if id is not None: self.id = id if frontend_token is not None: @@ -321,11 +311,8 @@ class Frontend(object): if not isinstance(other, Frontend): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Frontend): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body.py b/sdk/python/sdk/zrok/zrok_api/models/frontend_body.py new file mode 100644 index 00000000..22f06aac --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/frontend_body.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class FrontendBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'z_id': 'str', + 'url_template': 'str', + 'public_name': 'str', + 'permission_mode': 'str' + } + + attribute_map = { + 'z_id': 'zId', + 'url_template': 'url_template', + 'public_name': 'public_name', + 'permission_mode': 'permissionMode' + } + + def __init__(self, z_id=None, url_template=None, public_name=None, permission_mode=None): # noqa: E501 + """FrontendBody - a model defined in Swagger""" # noqa: E501 + self._z_id = None + self._url_template = None + self._public_name = None + self._permission_mode = None + self.discriminator = None + if z_id is not None: + self.z_id = z_id + if url_template is not None: + self.url_template = url_template + if public_name is not None: + self.public_name = public_name + if permission_mode is not None: + self.permission_mode = permission_mode + + @property + def z_id(self): + """Gets the z_id of this FrontendBody. # noqa: E501 + + + :return: The z_id of this FrontendBody. # noqa: E501 + :rtype: str + """ + return self._z_id + + @z_id.setter + def z_id(self, z_id): + """Sets the z_id of this FrontendBody. + + + :param z_id: The z_id of this FrontendBody. # noqa: E501 + :type: str + """ + + self._z_id = z_id + + @property + def url_template(self): + """Gets the url_template of this FrontendBody. # noqa: E501 + + + :return: The url_template of this FrontendBody. # noqa: E501 + :rtype: str + """ + return self._url_template + + @url_template.setter + def url_template(self, url_template): + """Sets the url_template of this FrontendBody. + + + :param url_template: The url_template of this FrontendBody. # noqa: E501 + :type: str + """ + + self._url_template = url_template + + @property + def public_name(self): + """Gets the public_name of this FrontendBody. # noqa: E501 + + + :return: The public_name of this FrontendBody. # noqa: E501 + :rtype: str + """ + return self._public_name + + @public_name.setter + def public_name(self, public_name): + """Sets the public_name of this FrontendBody. + + + :param public_name: The public_name of this FrontendBody. # noqa: E501 + :type: str + """ + + self._public_name = public_name + + @property + def permission_mode(self): + """Gets the permission_mode of this FrontendBody. # noqa: E501 + + + :return: The permission_mode of this FrontendBody. # noqa: E501 + :rtype: str + """ + return self._permission_mode + + @permission_mode.setter + def permission_mode(self, permission_mode): + """Sets the permission_mode of this FrontendBody. + + + :param permission_mode: The permission_mode of this FrontendBody. # noqa: E501 + :type: str + """ + allowed_values = ["open", "closed"] # noqa: E501 + if permission_mode not in allowed_values: + raise ValueError( + "Invalid value for `permission_mode` ({0}), must be one of {1}" # noqa: E501 + .format(permission_mode, allowed_values) + ) + + self._permission_mode = permission_mode + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FrontendBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FrontendBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py b/sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py new file mode 100644 index 00000000..192f6785 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class FrontendBody1(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'frontend_token': 'str' + } + + attribute_map = { + 'frontend_token': 'frontendToken' + } + + def __init__(self, frontend_token=None): # noqa: E501 + """FrontendBody1 - a model defined in Swagger""" # noqa: E501 + self._frontend_token = None + self.discriminator = None + if frontend_token is not None: + self.frontend_token = frontend_token + + @property + def frontend_token(self): + """Gets the frontend_token of this FrontendBody1. # noqa: E501 + + + :return: The frontend_token of this FrontendBody1. # noqa: E501 + :rtype: str + """ + return self._frontend_token + + @frontend_token.setter + def frontend_token(self, frontend_token): + """Sets the frontend_token of this FrontendBody1. + + + :param frontend_token: The frontend_token of this FrontendBody1. # noqa: E501 + :type: str + """ + + self._frontend_token = frontend_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FrontendBody1, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FrontendBody1): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py b/sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py new file mode 100644 index 00000000..aed451e3 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class FrontendBody2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'frontend_token': 'str', + 'public_name': 'str', + 'url_template': 'str' + } + + attribute_map = { + 'frontend_token': 'frontendToken', + 'public_name': 'publicName', + 'url_template': 'urlTemplate' + } + + def __init__(self, frontend_token=None, public_name=None, url_template=None): # noqa: E501 + """FrontendBody2 - a model defined in Swagger""" # noqa: E501 + self._frontend_token = None + self._public_name = None + self._url_template = None + self.discriminator = None + if frontend_token is not None: + self.frontend_token = frontend_token + if public_name is not None: + self.public_name = public_name + if url_template is not None: + self.url_template = url_template + + @property + def frontend_token(self): + """Gets the frontend_token of this FrontendBody2. # noqa: E501 + + + :return: The frontend_token of this FrontendBody2. # noqa: E501 + :rtype: str + """ + return self._frontend_token + + @frontend_token.setter + def frontend_token(self, frontend_token): + """Sets the frontend_token of this FrontendBody2. + + + :param frontend_token: The frontend_token of this FrontendBody2. # noqa: E501 + :type: str + """ + + self._frontend_token = frontend_token + + @property + def public_name(self): + """Gets the public_name of this FrontendBody2. # noqa: E501 + + + :return: The public_name of this FrontendBody2. # noqa: E501 + :rtype: str + """ + return self._public_name + + @public_name.setter + def public_name(self, public_name): + """Sets the public_name of this FrontendBody2. + + + :param public_name: The public_name of this FrontendBody2. # noqa: E501 + :type: str + """ + + self._public_name = public_name + + @property + def url_template(self): + """Gets the url_template of this FrontendBody2. # noqa: E501 + + + :return: The url_template of this FrontendBody2. # noqa: E501 + :rtype: str + """ + return self._url_template + + @url_template.setter + def url_template(self, url_template): + """Sets the url_template of this FrontendBody2. + + + :param url_template: The url_template of this FrontendBody2. # noqa: E501 + :type: str + """ + + self._url_template = url_template + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FrontendBody2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FrontendBody2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontends.py b/sdk/python/sdk/zrok/zrok_api/models/frontends.py index 3012e603..3c00604a 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/frontends.py +++ b/sdk/python/sdk/zrok/zrok_api/models/frontends.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class Frontends(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -38,11 +33,8 @@ class Frontends(object): attribute_map = { } - def __init__(self, _configuration=None): # noqa: E501 + def __init__(self): # noqa: E501 """Frontends - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -85,11 +77,8 @@ class Frontends(object): if not isinstance(other, Frontends): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Frontends): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/grants_body.py b/sdk/python/sdk/zrok/zrok_api/models/grants_body.py index e61ea02d..78e7d53a 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/grants_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/grants_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/sdk/zrok/zrok_api/models/identity_body.py b/sdk/python/sdk/zrok/zrok_api/models/identity_body.py index 8da98c33..4be3f8e5 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/identity_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/identity_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py index 408b1d20..edb95aa5 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class InlineResponse200(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -33,175 +28,40 @@ class InlineResponse200(object): and the value is json key in definition. """ swagger_types = { - 'frontend_token': 'str', - 'z_id': 'str', - 'url_template': 'str', - 'public_name': 'str', - 'created_at': 'int', - 'updated_at': 'int' + 'account_token': 'str' } attribute_map = { - 'frontend_token': 'frontendToken', - 'z_id': 'zId', - 'url_template': 'urlTemplate', - 'public_name': 'publicName', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' + 'account_token': 'accountToken' } - def __init__(self, frontend_token=None, z_id=None, url_template=None, public_name=None, created_at=None, updated_at=None, _configuration=None): # noqa: E501 + def __init__(self, account_token=None): # noqa: E501 """InlineResponse200 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._frontend_token = None - self._z_id = None - self._url_template = None - self._public_name = None - self._created_at = None - self._updated_at = None + self._account_token = None self.discriminator = None - - if frontend_token is not None: - self.frontend_token = frontend_token - if z_id is not None: - self.z_id = z_id - if url_template is not None: - self.url_template = url_template - if public_name is not None: - self.public_name = public_name - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at + if account_token is not None: + self.account_token = account_token @property - def frontend_token(self): - """Gets the frontend_token of this InlineResponse200. # noqa: E501 + def account_token(self): + """Gets the account_token of this InlineResponse200. # noqa: E501 - :return: The frontend_token of this InlineResponse200. # noqa: E501 + :return: The account_token of this InlineResponse200. # noqa: E501 :rtype: str """ - return self._frontend_token + return self._account_token - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this InlineResponse200. + @account_token.setter + def account_token(self, account_token): + """Sets the account_token of this InlineResponse200. - :param frontend_token: The frontend_token of this InlineResponse200. # noqa: E501 + :param account_token: The account_token of this InlineResponse200. # noqa: E501 :type: str """ - self._frontend_token = frontend_token - - @property - def z_id(self): - """Gets the z_id of this InlineResponse200. # noqa: E501 - - - :return: The z_id of this InlineResponse200. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this InlineResponse200. - - - :param z_id: The z_id of this InlineResponse200. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def url_template(self): - """Gets the url_template of this InlineResponse200. # noqa: E501 - - - :return: The url_template of this InlineResponse200. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this InlineResponse200. - - - :param url_template: The url_template of this InlineResponse200. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - @property - def public_name(self): - """Gets the public_name of this InlineResponse200. # noqa: E501 - - - :return: The public_name of this InlineResponse200. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this InlineResponse200. - - - :param public_name: The public_name of this InlineResponse200. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def created_at(self): - """Gets the created_at of this InlineResponse200. # noqa: E501 - - - :return: The created_at of this InlineResponse200. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this InlineResponse200. - - - :param created_at: The created_at of this InlineResponse200. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this InlineResponse200. # noqa: E501 - - - :return: The updated_at of this InlineResponse200. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this InlineResponse200. - - - :param updated_at: The updated_at of this InlineResponse200. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at + self._account_token = account_token def to_dict(self): """Returns the model properties as a dict""" @@ -243,11 +103,8 @@ class InlineResponse200(object): if not isinstance(other, InlineResponse200): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, InlineResponse200): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py index 214eca09..32a1818a 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,40 +28,40 @@ class InlineResponse2001(object): and the value is json key in definition. """ swagger_types = { - 'members': 'list[InlineResponse2001Members]' + 'email': 'str' } attribute_map = { - 'members': 'members' + 'email': 'email' } - def __init__(self, members=None): # noqa: E501 + def __init__(self, email=None): # noqa: E501 """InlineResponse2001 - a model defined in Swagger""" # noqa: E501 - self._members = None + self._email = None self.discriminator = None - if members is not None: - self.members = members + if email is not None: + self.email = email @property - def members(self): - """Gets the members of this InlineResponse2001. # noqa: E501 + def email(self): + """Gets the email of this InlineResponse2001. # noqa: E501 - :return: The members of this InlineResponse2001. # noqa: E501 - :rtype: list[InlineResponse2001Members] + :return: The email of this InlineResponse2001. # noqa: E501 + :rtype: str """ - return self._members + return self._email - @members.setter - def members(self, members): - """Sets the members of this InlineResponse2001. + @email.setter + def email(self, email): + """Sets the email of this InlineResponse2001. - :param members: The members of this InlineResponse2001. # noqa: E501 - :type: list[InlineResponse2001Members] + :param email: The email of this InlineResponse2001. # noqa: E501 + :type: str """ - self._members = members + self._email = email def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py index 31aca38e..a162bfdc 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,40 +28,170 @@ class InlineResponse2002(object): and the value is json key in definition. """ swagger_types = { - 'organizations': 'list[InlineResponse2002Organizations]' + 'frontend_token': 'str', + 'z_id': 'str', + 'url_template': 'str', + 'public_name': 'str', + 'created_at': 'int', + 'updated_at': 'int' } attribute_map = { - 'organizations': 'organizations' + 'frontend_token': 'frontendToken', + 'z_id': 'zId', + 'url_template': 'urlTemplate', + 'public_name': 'publicName', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' } - def __init__(self, organizations=None): # noqa: E501 + def __init__(self, frontend_token=None, z_id=None, url_template=None, public_name=None, created_at=None, updated_at=None): # noqa: E501 """InlineResponse2002 - a model defined in Swagger""" # noqa: E501 - self._organizations = None + self._frontend_token = None + self._z_id = None + self._url_template = None + self._public_name = None + self._created_at = None + self._updated_at = None self.discriminator = None - if organizations is not None: - self.organizations = organizations + if frontend_token is not None: + self.frontend_token = frontend_token + if z_id is not None: + self.z_id = z_id + if url_template is not None: + self.url_template = url_template + if public_name is not None: + self.public_name = public_name + if created_at is not None: + self.created_at = created_at + if updated_at is not None: + self.updated_at = updated_at @property - def organizations(self): - """Gets the organizations of this InlineResponse2002. # noqa: E501 + def frontend_token(self): + """Gets the frontend_token of this InlineResponse2002. # noqa: E501 - :return: The organizations of this InlineResponse2002. # noqa: E501 - :rtype: list[InlineResponse2002Organizations] + :return: The frontend_token of this InlineResponse2002. # noqa: E501 + :rtype: str """ - return self._organizations + return self._frontend_token - @organizations.setter - def organizations(self, organizations): - """Sets the organizations of this InlineResponse2002. + @frontend_token.setter + def frontend_token(self, frontend_token): + """Sets the frontend_token of this InlineResponse2002. - :param organizations: The organizations of this InlineResponse2002. # noqa: E501 - :type: list[InlineResponse2002Organizations] + :param frontend_token: The frontend_token of this InlineResponse2002. # noqa: E501 + :type: str """ - self._organizations = organizations + self._frontend_token = frontend_token + + @property + def z_id(self): + """Gets the z_id of this InlineResponse2002. # noqa: E501 + + + :return: The z_id of this InlineResponse2002. # noqa: E501 + :rtype: str + """ + return self._z_id + + @z_id.setter + def z_id(self, z_id): + """Sets the z_id of this InlineResponse2002. + + + :param z_id: The z_id of this InlineResponse2002. # noqa: E501 + :type: str + """ + + self._z_id = z_id + + @property + def url_template(self): + """Gets the url_template of this InlineResponse2002. # noqa: E501 + + + :return: The url_template of this InlineResponse2002. # noqa: E501 + :rtype: str + """ + return self._url_template + + @url_template.setter + def url_template(self, url_template): + """Sets the url_template of this InlineResponse2002. + + + :param url_template: The url_template of this InlineResponse2002. # noqa: E501 + :type: str + """ + + self._url_template = url_template + + @property + def public_name(self): + """Gets the public_name of this InlineResponse2002. # noqa: E501 + + + :return: The public_name of this InlineResponse2002. # noqa: E501 + :rtype: str + """ + return self._public_name + + @public_name.setter + def public_name(self, public_name): + """Sets the public_name of this InlineResponse2002. + + + :param public_name: The public_name of this InlineResponse2002. # noqa: E501 + :type: str + """ + + self._public_name = public_name + + @property + def created_at(self): + """Gets the created_at of this InlineResponse2002. # noqa: E501 + + + :return: The created_at of this InlineResponse2002. # noqa: E501 + :rtype: int + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this InlineResponse2002. + + + :param created_at: The created_at of this InlineResponse2002. # noqa: E501 + :type: int + """ + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this InlineResponse2002. # noqa: E501 + + + :return: The updated_at of this InlineResponse2002. # noqa: E501 + :rtype: int + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this InlineResponse2002. + + + :param updated_at: The updated_at of this InlineResponse2002. # noqa: E501 + :type: int + """ + + self._updated_at = updated_at def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py index b92d8287..93926054 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,40 +28,40 @@ class InlineResponse2003(object): and the value is json key in definition. """ swagger_types = { - 'memberships': 'list[InlineResponse2003Memberships]' + 'members': 'list[InlineResponse2003Members]' } attribute_map = { - 'memberships': 'memberships' + 'members': 'members' } - def __init__(self, memberships=None): # noqa: E501 + def __init__(self, members=None): # noqa: E501 """InlineResponse2003 - a model defined in Swagger""" # noqa: E501 - self._memberships = None + self._members = None self.discriminator = None - if memberships is not None: - self.memberships = memberships + if members is not None: + self.members = members @property - def memberships(self): - """Gets the memberships of this InlineResponse2003. # noqa: E501 + def members(self): + """Gets the members of this InlineResponse2003. # noqa: E501 - :return: The memberships of this InlineResponse2003. # noqa: E501 - :rtype: list[InlineResponse2003Memberships] + :return: The members of this InlineResponse2003. # noqa: E501 + :rtype: list[InlineResponse2003Members] """ - return self._memberships + return self._members - @memberships.setter - def memberships(self, memberships): - """Sets the memberships of this InlineResponse2003. + @members.setter + def members(self, members): + """Sets the members of this InlineResponse2003. - :param memberships: The memberships of this InlineResponse2003. # noqa: E501 - :type: list[InlineResponse2003Memberships] + :param members: The members of this InlineResponse2003. # noqa: E501 + :type: list[InlineResponse2003Members] """ - self._memberships = memberships + self._members = members def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py new file mode 100644 index 00000000..359fb898 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse2003Members(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'admin': 'bool' + } + + attribute_map = { + 'email': 'email', + 'admin': 'admin' + } + + def __init__(self, email=None, admin=None): # noqa: E501 + """InlineResponse2003Members - a model defined in Swagger""" # noqa: E501 + self._email = None + self._admin = None + self.discriminator = None + if email is not None: + self.email = email + if admin is not None: + self.admin = admin + + @property + def email(self): + """Gets the email of this InlineResponse2003Members. # noqa: E501 + + + :return: The email of this InlineResponse2003Members. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this InlineResponse2003Members. + + + :param email: The email of this InlineResponse2003Members. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def admin(self): + """Gets the admin of this InlineResponse2003Members. # noqa: E501 + + + :return: The admin of this InlineResponse2003Members. # noqa: E501 + :rtype: bool + """ + return self._admin + + @admin.setter + def admin(self, admin): + """Sets the admin of this InlineResponse2003Members. + + + :param admin: The admin of this InlineResponse2003Members. # noqa: E501 + :type: bool + """ + + self._admin = admin + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse2003Members, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2003Members): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py new file mode 100644 index 00000000..d0a55eb0 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse2004(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'organizations': 'list[InlineResponse2004Organizations]' + } + + attribute_map = { + 'organizations': 'organizations' + } + + def __init__(self, organizations=None): # noqa: E501 + """InlineResponse2004 - a model defined in Swagger""" # noqa: E501 + self._organizations = None + self.discriminator = None + if organizations is not None: + self.organizations = organizations + + @property + def organizations(self): + """Gets the organizations of this InlineResponse2004. # noqa: E501 + + + :return: The organizations of this InlineResponse2004. # noqa: E501 + :rtype: list[InlineResponse2004Organizations] + """ + return self._organizations + + @organizations.setter + def organizations(self, organizations): + """Sets the organizations of this InlineResponse2004. + + + :param organizations: The organizations of this InlineResponse2004. # noqa: E501 + :type: list[InlineResponse2004Organizations] + """ + + self._organizations = organizations + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse2004, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2004): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py new file mode 100644 index 00000000..1996b554 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse2004Organizations(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'organization_token': 'str', + 'description': 'str' + } + + attribute_map = { + 'organization_token': 'organizationToken', + 'description': 'description' + } + + def __init__(self, organization_token=None, description=None): # noqa: E501 + """InlineResponse2004Organizations - a model defined in Swagger""" # noqa: E501 + self._organization_token = None + self._description = None + self.discriminator = None + if organization_token is not None: + self.organization_token = organization_token + if description is not None: + self.description = description + + @property + def organization_token(self): + """Gets the organization_token of this InlineResponse2004Organizations. # noqa: E501 + + + :return: The organization_token of this InlineResponse2004Organizations. # noqa: E501 + :rtype: str + """ + return self._organization_token + + @organization_token.setter + def organization_token(self, organization_token): + """Sets the organization_token of this InlineResponse2004Organizations. + + + :param organization_token: The organization_token of this InlineResponse2004Organizations. # noqa: E501 + :type: str + """ + + self._organization_token = organization_token + + @property + def description(self): + """Gets the description of this InlineResponse2004Organizations. # noqa: E501 + + + :return: The description of this InlineResponse2004Organizations. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this InlineResponse2004Organizations. + + + :param description: The description of this InlineResponse2004Organizations. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse2004Organizations, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2004Organizations): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py new file mode 100644 index 00000000..3fa22e9d --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse2005(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'memberships': 'list[InlineResponse2005Memberships]' + } + + attribute_map = { + 'memberships': 'memberships' + } + + def __init__(self, memberships=None): # noqa: E501 + """InlineResponse2005 - a model defined in Swagger""" # noqa: E501 + self._memberships = None + self.discriminator = None + if memberships is not None: + self.memberships = memberships + + @property + def memberships(self): + """Gets the memberships of this InlineResponse2005. # noqa: E501 + + + :return: The memberships of this InlineResponse2005. # noqa: E501 + :rtype: list[InlineResponse2005Memberships] + """ + return self._memberships + + @memberships.setter + def memberships(self, memberships): + """Sets the memberships of this InlineResponse2005. + + + :param memberships: The memberships of this InlineResponse2005. # noqa: E501 + :type: list[InlineResponse2005Memberships] + """ + + self._memberships = memberships + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse2005, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2005): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py new file mode 100644 index 00000000..915fa44e --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse2005Memberships(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'organization_token': 'str', + 'description': 'str', + 'admin': 'bool' + } + + attribute_map = { + 'organization_token': 'organizationToken', + 'description': 'description', + 'admin': 'admin' + } + + def __init__(self, organization_token=None, description=None, admin=None): # noqa: E501 + """InlineResponse2005Memberships - a model defined in Swagger""" # noqa: E501 + self._organization_token = None + self._description = None + self._admin = None + self.discriminator = None + if organization_token is not None: + self.organization_token = organization_token + if description is not None: + self.description = description + if admin is not None: + self.admin = admin + + @property + def organization_token(self): + """Gets the organization_token of this InlineResponse2005Memberships. # noqa: E501 + + + :return: The organization_token of this InlineResponse2005Memberships. # noqa: E501 + :rtype: str + """ + return self._organization_token + + @organization_token.setter + def organization_token(self, organization_token): + """Sets the organization_token of this InlineResponse2005Memberships. + + + :param organization_token: The organization_token of this InlineResponse2005Memberships. # noqa: E501 + :type: str + """ + + self._organization_token = organization_token + + @property + def description(self): + """Gets the description of this InlineResponse2005Memberships. # noqa: E501 + + + :return: The description of this InlineResponse2005Memberships. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this InlineResponse2005Memberships. + + + :param description: The description of this InlineResponse2005Memberships. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def admin(self): + """Gets the admin of this InlineResponse2005Memberships. # noqa: E501 + + + :return: The admin of this InlineResponse2005Memberships. # noqa: E501 + :rtype: bool + """ + return self._admin + + @admin.setter + def admin(self, admin): + """Sets the admin of this InlineResponse2005Memberships. + + + :param admin: The admin of this InlineResponse2005Memberships. # noqa: E501 + :type: bool + """ + + self._admin = admin + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse2005Memberships, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2005Memberships): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py new file mode 100644 index 00000000..5757905a --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse2006(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'sparklines': 'list[Metrics]' + } + + attribute_map = { + 'sparklines': 'sparklines' + } + + def __init__(self, sparklines=None): # noqa: E501 + """InlineResponse2006 - a model defined in Swagger""" # noqa: E501 + self._sparklines = None + self.discriminator = None + if sparklines is not None: + self.sparklines = sparklines + + @property + def sparklines(self): + """Gets the sparklines of this InlineResponse2006. # noqa: E501 + + + :return: The sparklines of this InlineResponse2006. # noqa: E501 + :rtype: list[Metrics] + """ + return self._sparklines + + @sparklines.setter + def sparklines(self, sparklines): + """Sets the sparklines of this InlineResponse2006. + + + :param sparklines: The sparklines of this InlineResponse2006. # noqa: E501 + :type: list[Metrics] + """ + + self._sparklines = sparklines + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse2006, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2006): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py new file mode 100644 index 00000000..356d155a --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse2007(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'controller_version': 'str' + } + + attribute_map = { + 'controller_version': 'controllerVersion' + } + + def __init__(self, controller_version=None): # noqa: E501 + """InlineResponse2007 - a model defined in Swagger""" # noqa: E501 + self._controller_version = None + self.discriminator = None + if controller_version is not None: + self.controller_version = controller_version + + @property + def controller_version(self): + """Gets the controller_version of this InlineResponse2007. # noqa: E501 + + + :return: The controller_version of this InlineResponse2007. # noqa: E501 + :rtype: str + """ + return self._controller_version + + @controller_version.setter + def controller_version(self, controller_version): + """Sets the controller_version of this InlineResponse2007. + + + :param controller_version: The controller_version of this InlineResponse2007. # noqa: E501 + :type: str + """ + + self._controller_version = controller_version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse2007, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2007): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py index 4b493cb3..2cc96e64 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class InlineResponse201(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -40,15 +35,10 @@ class InlineResponse201(object): 'frontend_token': 'frontendToken' } - def __init__(self, frontend_token=None, _configuration=None): # noqa: E501 + def __init__(self, frontend_token=None): # noqa: E501 """InlineResponse201 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._frontend_token = None self.discriminator = None - if frontend_token is not None: self.frontend_token = frontend_token @@ -113,11 +103,8 @@ class InlineResponse201(object): if not isinstance(other, InlineResponse201): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, InlineResponse201): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py new file mode 100644 index 00000000..9d80730a --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse2011(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'identity': 'str', + 'cfg': 'str' + } + + attribute_map = { + 'identity': 'identity', + 'cfg': 'cfg' + } + + def __init__(self, identity=None, cfg=None): # noqa: E501 + """InlineResponse2011 - a model defined in Swagger""" # noqa: E501 + self._identity = None + self._cfg = None + self.discriminator = None + if identity is not None: + self.identity = identity + if cfg is not None: + self.cfg = cfg + + @property + def identity(self): + """Gets the identity of this InlineResponse2011. # noqa: E501 + + + :return: The identity of this InlineResponse2011. # noqa: E501 + :rtype: str + """ + return self._identity + + @identity.setter + def identity(self, identity): + """Sets the identity of this InlineResponse2011. + + + :param identity: The identity of this InlineResponse2011. # noqa: E501 + :type: str + """ + + self._identity = identity + + @property + def cfg(self): + """Gets the cfg of this InlineResponse2011. # noqa: E501 + + + :return: The cfg of this InlineResponse2011. # noqa: E501 + :rtype: str + """ + return self._cfg + + @cfg.setter + def cfg(self, cfg): + """Sets the cfg of this InlineResponse2011. + + + :param cfg: The cfg of this InlineResponse2011. # noqa: E501 + :type: str + """ + + self._cfg = cfg + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse2011, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2011): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py new file mode 100644 index 00000000..dee97a61 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse2012(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'organization_token': 'str' + } + + attribute_map = { + 'organization_token': 'organizationToken' + } + + def __init__(self, organization_token=None): # noqa: E501 + """InlineResponse2012 - a model defined in Swagger""" # noqa: E501 + self._organization_token = None + self.discriminator = None + if organization_token is not None: + self.organization_token = organization_token + + @property + def organization_token(self): + """Gets the organization_token of this InlineResponse2012. # noqa: E501 + + + :return: The organization_token of this InlineResponse2012. # noqa: E501 + :rtype: str + """ + return self._organization_token + + @organization_token.setter + def organization_token(self, organization_token): + """Sets the organization_token of this InlineResponse2012. + + + :param organization_token: The organization_token of this InlineResponse2012. # noqa: E501 + :type: str + """ + + self._organization_token = organization_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse2012, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2012): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py new file mode 100644 index 00000000..34a37b49 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse2013(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'frontend_token': 'str', + 'backend_mode': 'str' + } + + attribute_map = { + 'frontend_token': 'frontendToken', + 'backend_mode': 'backendMode' + } + + def __init__(self, frontend_token=None, backend_mode=None): # noqa: E501 + """InlineResponse2013 - a model defined in Swagger""" # noqa: E501 + self._frontend_token = None + self._backend_mode = None + self.discriminator = None + if frontend_token is not None: + self.frontend_token = frontend_token + if backend_mode is not None: + self.backend_mode = backend_mode + + @property + def frontend_token(self): + """Gets the frontend_token of this InlineResponse2013. # noqa: E501 + + + :return: The frontend_token of this InlineResponse2013. # noqa: E501 + :rtype: str + """ + return self._frontend_token + + @frontend_token.setter + def frontend_token(self, frontend_token): + """Sets the frontend_token of this InlineResponse2013. + + + :param frontend_token: The frontend_token of this InlineResponse2013. # noqa: E501 + :type: str + """ + + self._frontend_token = frontend_token + + @property + def backend_mode(self): + """Gets the backend_mode of this InlineResponse2013. # noqa: E501 + + + :return: The backend_mode of this InlineResponse2013. # noqa: E501 + :rtype: str + """ + return self._backend_mode + + @backend_mode.setter + def backend_mode(self, backend_mode): + """Sets the backend_mode of this InlineResponse2013. + + + :param backend_mode: The backend_mode of this InlineResponse2013. # noqa: E501 + :type: str + """ + + self._backend_mode = backend_mode + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse2013, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse2013): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_body.py b/sdk/python/sdk/zrok/zrok_api/models/invite_body.py new file mode 100644 index 00000000..bb4840d5 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/invite_body.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InviteBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'invite_token': 'str' + } + + attribute_map = { + 'email': 'email', + 'invite_token': 'inviteToken' + } + + def __init__(self, email=None, invite_token=None): # noqa: E501 + """InviteBody - a model defined in Swagger""" # noqa: E501 + self._email = None + self._invite_token = None + self.discriminator = None + if email is not None: + self.email = email + if invite_token is not None: + self.invite_token = invite_token + + @property + def email(self): + """Gets the email of this InviteBody. # noqa: E501 + + + :return: The email of this InviteBody. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this InviteBody. + + + :param email: The email of this InviteBody. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def invite_token(self): + """Gets the invite_token of this InviteBody. # noqa: E501 + + + :return: The invite_token of this InviteBody. # noqa: E501 + :rtype: str + """ + return self._invite_token + + @invite_token.setter + def invite_token(self, invite_token): + """Sets the invite_token of this InviteBody. + + + :param invite_token: The invite_token of this InviteBody. # noqa: E501 + :type: str + """ + + self._invite_token = invite_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InviteBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InviteBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/login_body.py b/sdk/python/sdk/zrok/zrok_api/models/login_body.py new file mode 100644 index 00000000..127672ca --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/login_body.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class LoginBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'password': 'str' + } + + attribute_map = { + 'email': 'email', + 'password': 'password' + } + + def __init__(self, email=None, password=None): # noqa: E501 + """LoginBody - a model defined in Swagger""" # noqa: E501 + self._email = None + self._password = None + self.discriminator = None + if email is not None: + self.email = email + if password is not None: + self.password = password + + @property + def email(self): + """Gets the email of this LoginBody. # noqa: E501 + + + :return: The email of this LoginBody. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this LoginBody. + + + :param email: The email of this LoginBody. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def password(self): + """Gets the password of this LoginBody. # noqa: E501 + + + :return: The password of this LoginBody. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this LoginBody. + + + :param password: The password of this LoginBody. # noqa: E501 + :type: str + """ + + self._password = password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LoginBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LoginBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics.py b/sdk/python/sdk/zrok/zrok_api/models/metrics.py index ee839634..d7dd52f8 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/metrics.py +++ b/sdk/python/sdk/zrok/zrok_api/models/metrics.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class Metrics(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -46,18 +41,13 @@ class Metrics(object): 'samples': 'samples' } - def __init__(self, scope=None, id=None, period=None, samples=None, _configuration=None): # noqa: E501 + def __init__(self, scope=None, id=None, period=None, samples=None): # noqa: E501 """Metrics - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._scope = None self._id = None self._period = None self._samples = None self.discriminator = None - if scope is not None: self.scope = scope if id is not None: @@ -191,11 +181,8 @@ class Metrics(object): if not isinstance(other, Metrics): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Metrics): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py b/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py index 312c2bc0..8e297c43 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py +++ b/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class MetricsSample(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -44,17 +39,12 @@ class MetricsSample(object): 'timestamp': 'timestamp' } - def __init__(self, rx=None, tx=None, timestamp=None, _configuration=None): # noqa: E501 + def __init__(self, rx=None, tx=None, timestamp=None): # noqa: E501 """MetricsSample - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._rx = None self._tx = None self._timestamp = None self.discriminator = None - if rx is not None: self.rx = rx if tx is not None: @@ -165,11 +155,8 @@ class MetricsSample(object): if not isinstance(other, MetricsSample): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, MetricsSample): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py index 918758ab..48fd06da 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,50 +28,50 @@ class OrganizationAddBody(object): and the value is json key in definition. """ swagger_types = { - 'token': 'str', + 'organization_token': 'str', 'email': 'str', 'admin': 'bool' } attribute_map = { - 'token': 'token', + 'organization_token': 'organizationToken', 'email': 'email', 'admin': 'admin' } - def __init__(self, token=None, email=None, admin=None): # noqa: E501 + def __init__(self, organization_token=None, email=None, admin=None): # noqa: E501 """OrganizationAddBody - a model defined in Swagger""" # noqa: E501 - self._token = None + self._organization_token = None self._email = None self._admin = None self.discriminator = None - if token is not None: - self.token = token + if organization_token is not None: + self.organization_token = organization_token if email is not None: self.email = email if admin is not None: self.admin = admin @property - def token(self): - """Gets the token of this OrganizationAddBody. # noqa: E501 + def organization_token(self): + """Gets the organization_token of this OrganizationAddBody. # noqa: E501 - :return: The token of this OrganizationAddBody. # noqa: E501 + :return: The organization_token of this OrganizationAddBody. # noqa: E501 :rtype: str """ - return self._token + return self._organization_token - @token.setter - def token(self, token): - """Sets the token of this OrganizationAddBody. + @organization_token.setter + def organization_token(self, organization_token): + """Sets the organization_token of this OrganizationAddBody. - :param token: The token of this OrganizationAddBody. # noqa: E501 + :param organization_token: The organization_token of this OrganizationAddBody. # noqa: E501 :type: str """ - self._token = token + self._organization_token = organization_token @property def email(self): diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_body.py index 0875eadb..8133f0ff 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py b/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py index a605af16..45a5afde 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,40 +28,40 @@ class OrganizationBody1(object): and the value is json key in definition. """ swagger_types = { - 'token': 'str' + 'organization_token': 'str' } attribute_map = { - 'token': 'token' + 'organization_token': 'organizationToken' } - def __init__(self, token=None): # noqa: E501 + def __init__(self, organization_token=None): # noqa: E501 """OrganizationBody1 - a model defined in Swagger""" # noqa: E501 - self._token = None + self._organization_token = None self.discriminator = None - if token is not None: - self.token = token + if organization_token is not None: + self.organization_token = organization_token @property - def token(self): - """Gets the token of this OrganizationBody1. # noqa: E501 + def organization_token(self): + """Gets the organization_token of this OrganizationBody1. # noqa: E501 - :return: The token of this OrganizationBody1. # noqa: E501 + :return: The organization_token of this OrganizationBody1. # noqa: E501 :rtype: str """ - return self._token + return self._organization_token - @token.setter - def token(self, token): - """Sets the token of this OrganizationBody1. + @organization_token.setter + def organization_token(self, organization_token): + """Sets the organization_token of this OrganizationBody1. - :param token: The token of this OrganizationBody1. # noqa: E501 + :param organization_token: The organization_token of this OrganizationBody1. # noqa: E501 :type: str """ - self._token = token + self._organization_token = organization_token def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py index 4b783851..167a9fe9 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,40 +28,40 @@ class OrganizationListBody(object): and the value is json key in definition. """ swagger_types = { - 'token': 'str' + 'organization_token': 'str' } attribute_map = { - 'token': 'token' + 'organization_token': 'organizationToken' } - def __init__(self, token=None): # noqa: E501 + def __init__(self, organization_token=None): # noqa: E501 """OrganizationListBody - a model defined in Swagger""" # noqa: E501 - self._token = None + self._organization_token = None self.discriminator = None - if token is not None: - self.token = token + if organization_token is not None: + self.organization_token = organization_token @property - def token(self): - """Gets the token of this OrganizationListBody. # noqa: E501 + def organization_token(self): + """Gets the organization_token of this OrganizationListBody. # noqa: E501 - :return: The token of this OrganizationListBody. # noqa: E501 + :return: The organization_token of this OrganizationListBody. # noqa: E501 :rtype: str """ - return self._token + return self._organization_token - @token.setter - def token(self, token): - """Sets the token of this OrganizationListBody. + @organization_token.setter + def organization_token(self, organization_token): + """Sets the organization_token of this OrganizationListBody. - :param token: The token of this OrganizationListBody. # noqa: E501 + :param organization_token: The organization_token of this OrganizationListBody. # noqa: E501 :type: str """ - self._token = token + self._organization_token = organization_token def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py index 4600d47f..c4a9374d 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -28,45 +28,45 @@ class OrganizationRemoveBody(object): and the value is json key in definition. """ swagger_types = { - 'token': 'str', + 'organization_token': 'str', 'email': 'str' } attribute_map = { - 'token': 'token', + 'organization_token': 'organizationToken', 'email': 'email' } - def __init__(self, token=None, email=None): # noqa: E501 + def __init__(self, organization_token=None, email=None): # noqa: E501 """OrganizationRemoveBody - a model defined in Swagger""" # noqa: E501 - self._token = None + self._organization_token = None self._email = None self.discriminator = None - if token is not None: - self.token = token + if organization_token is not None: + self.organization_token = organization_token if email is not None: self.email = email @property - def token(self): - """Gets the token of this OrganizationRemoveBody. # noqa: E501 + def organization_token(self): + """Gets the organization_token of this OrganizationRemoveBody. # noqa: E501 - :return: The token of this OrganizationRemoveBody. # noqa: E501 + :return: The organization_token of this OrganizationRemoveBody. # noqa: E501 :rtype: str """ - return self._token + return self._organization_token - @token.setter - def token(self, token): - """Sets the token of this OrganizationRemoveBody. + @organization_token.setter + def organization_token(self, organization_token): + """Sets the organization_token of this OrganizationRemoveBody. - :param token: The token of this OrganizationRemoveBody. # noqa: E501 + :param organization_token: The organization_token of this OrganizationRemoveBody. # noqa: E501 :type: str """ - self._token = token + self._organization_token = organization_token @property def email(self): diff --git a/sdk/python/sdk/zrok/zrok_api/models/overview.py b/sdk/python/sdk/zrok/zrok_api/models/overview.py index 7c944cb4..7ef8aac4 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/overview.py +++ b/sdk/python/sdk/zrok/zrok_api/models/overview.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class Overview(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -42,16 +37,11 @@ class Overview(object): 'environments': 'environments' } - def __init__(self, account_limited=None, environments=None, _configuration=None): # noqa: E501 + def __init__(self, account_limited=None, environments=None): # noqa: E501 """Overview - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._account_limited = None self._environments = None self.discriminator = None - if account_limited is not None: self.account_limited = account_limited if environments is not None: @@ -139,11 +129,8 @@ class Overview(object): if not isinstance(other, Overview): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Overview): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/principal.py b/sdk/python/sdk/zrok/zrok_api/models/principal.py index 24392610..0f1c6ff4 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/principal.py +++ b/sdk/python/sdk/zrok/zrok_api/models/principal.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class Principal(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -48,19 +43,14 @@ class Principal(object): 'admin': 'admin' } - def __init__(self, id=None, email=None, token=None, limitless=None, admin=None, _configuration=None): # noqa: E501 + def __init__(self, id=None, email=None, token=None, limitless=None, admin=None): # noqa: E501 """Principal - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._id = None self._email = None self._token = None self._limitless = None self._admin = None self.discriminator = None - if id is not None: self.id = id if email is not None: @@ -217,11 +207,8 @@ class Principal(object): if not isinstance(other, Principal): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Principal): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py new file mode 100644 index 00000000..61513276 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class RegenerateAccountTokenBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email_address': 'str' + } + + attribute_map = { + 'email_address': 'emailAddress' + } + + def __init__(self, email_address=None): # noqa: E501 + """RegenerateAccountTokenBody - a model defined in Swagger""" # noqa: E501 + self._email_address = None + self.discriminator = None + if email_address is not None: + self.email_address = email_address + + @property + def email_address(self): + """Gets the email_address of this RegenerateAccountTokenBody. # noqa: E501 + + + :return: The email_address of this RegenerateAccountTokenBody. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this RegenerateAccountTokenBody. + + + :param email_address: The email_address of this RegenerateAccountTokenBody. # noqa: E501 + :type: str + """ + + self._email_address = email_address + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RegenerateAccountTokenBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RegenerateAccountTokenBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/register_body.py b/sdk/python/sdk/zrok/zrok_api/models/register_body.py new file mode 100644 index 00000000..80549446 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/register_body.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class RegisterBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'register_token': 'str', + 'password': 'str' + } + + attribute_map = { + 'register_token': 'registerToken', + 'password': 'password' + } + + def __init__(self, register_token=None, password=None): # noqa: E501 + """RegisterBody - a model defined in Swagger""" # noqa: E501 + self._register_token = None + self._password = None + self.discriminator = None + if register_token is not None: + self.register_token = register_token + if password is not None: + self.password = password + + @property + def register_token(self): + """Gets the register_token of this RegisterBody. # noqa: E501 + + + :return: The register_token of this RegisterBody. # noqa: E501 + :rtype: str + """ + return self._register_token + + @register_token.setter + def register_token(self, register_token): + """Sets the register_token of this RegisterBody. + + + :param register_token: The register_token of this RegisterBody. # noqa: E501 + :type: str + """ + + self._register_token = register_token + + @property + def password(self): + """Gets the password of this RegisterBody. # noqa: E501 + + + :return: The password of this RegisterBody. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this RegisterBody. + + + :param password: The password of this RegisterBody. # noqa: E501 + :type: str + """ + + self._password = password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RegisterBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RegisterBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py new file mode 100644 index 00000000..0dbc086a --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ResetPasswordBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'reset_token': 'str', + 'password': 'str' + } + + attribute_map = { + 'reset_token': 'resetToken', + 'password': 'password' + } + + def __init__(self, reset_token=None, password=None): # noqa: E501 + """ResetPasswordBody - a model defined in Swagger""" # noqa: E501 + self._reset_token = None + self._password = None + self.discriminator = None + if reset_token is not None: + self.reset_token = reset_token + if password is not None: + self.password = password + + @property + def reset_token(self): + """Gets the reset_token of this ResetPasswordBody. # noqa: E501 + + + :return: The reset_token of this ResetPasswordBody. # noqa: E501 + :rtype: str + """ + return self._reset_token + + @reset_token.setter + def reset_token(self, reset_token): + """Sets the reset_token of this ResetPasswordBody. + + + :param reset_token: The reset_token of this ResetPasswordBody. # noqa: E501 + :type: str + """ + + self._reset_token = reset_token + + @property + def password(self): + """Gets the password of this ResetPasswordBody. # noqa: E501 + + + :return: The password of this ResetPasswordBody. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this ResetPasswordBody. + + + :param password: The password of this ResetPasswordBody. # noqa: E501 + :type: str + """ + + self._password = password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResetPasswordBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResetPasswordBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py index 44e975ec..2d0bd614 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py @@ -5,7 +5,7 @@ zrok client access # noqa: E501 - OpenAPI spec version: 0.3.0 + OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/sdk/zrok/zrok_api/models/share.py b/sdk/python/sdk/zrok/zrok_api/models/share.py index 478deb76..abdb66af 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class Share(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -62,12 +57,8 @@ class Share(object): 'updated_at': 'updatedAt' } - def __init__(self, share_token=None, z_id=None, share_mode=None, backend_mode=None, frontend_selection=None, frontend_endpoint=None, backend_proxy_endpoint=None, reserved=None, activity=None, limited=None, created_at=None, updated_at=None, _configuration=None): # noqa: E501 + def __init__(self, share_token=None, z_id=None, share_mode=None, backend_mode=None, frontend_selection=None, frontend_endpoint=None, backend_proxy_endpoint=None, reserved=None, activity=None, limited=None, created_at=None, updated_at=None): # noqa: E501 """Share - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._share_token = None self._z_id = None self._share_mode = None @@ -81,7 +72,6 @@ class Share(object): self._created_at = None self._updated_at = None self.discriminator = None - if share_token is not None: self.share_token = share_token if z_id is not None: @@ -399,11 +389,8 @@ class Share(object): if not isinstance(other, Share): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Share): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_body.py b/sdk/python/sdk/zrok/zrok_api/models/share_body.py new file mode 100644 index 00000000..f8398b70 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/share_body.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ShareBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'share_token': 'str', + 'backend_proxy_endpoint': 'str', + 'add_access_grants': 'list[str]', + 'remove_access_grants': 'list[str]' + } + + attribute_map = { + 'share_token': 'shareToken', + 'backend_proxy_endpoint': 'backendProxyEndpoint', + 'add_access_grants': 'addAccessGrants', + 'remove_access_grants': 'removeAccessGrants' + } + + def __init__(self, share_token=None, backend_proxy_endpoint=None, add_access_grants=None, remove_access_grants=None): # noqa: E501 + """ShareBody - a model defined in Swagger""" # noqa: E501 + self._share_token = None + self._backend_proxy_endpoint = None + self._add_access_grants = None + self._remove_access_grants = None + self.discriminator = None + if share_token is not None: + self.share_token = share_token + if backend_proxy_endpoint is not None: + self.backend_proxy_endpoint = backend_proxy_endpoint + if add_access_grants is not None: + self.add_access_grants = add_access_grants + if remove_access_grants is not None: + self.remove_access_grants = remove_access_grants + + @property + def share_token(self): + """Gets the share_token of this ShareBody. # noqa: E501 + + + :return: The share_token of this ShareBody. # noqa: E501 + :rtype: str + """ + return self._share_token + + @share_token.setter + def share_token(self, share_token): + """Sets the share_token of this ShareBody. + + + :param share_token: The share_token of this ShareBody. # noqa: E501 + :type: str + """ + + self._share_token = share_token + + @property + def backend_proxy_endpoint(self): + """Gets the backend_proxy_endpoint of this ShareBody. # noqa: E501 + + + :return: The backend_proxy_endpoint of this ShareBody. # noqa: E501 + :rtype: str + """ + return self._backend_proxy_endpoint + + @backend_proxy_endpoint.setter + def backend_proxy_endpoint(self, backend_proxy_endpoint): + """Sets the backend_proxy_endpoint of this ShareBody. + + + :param backend_proxy_endpoint: The backend_proxy_endpoint of this ShareBody. # noqa: E501 + :type: str + """ + + self._backend_proxy_endpoint = backend_proxy_endpoint + + @property + def add_access_grants(self): + """Gets the add_access_grants of this ShareBody. # noqa: E501 + + + :return: The add_access_grants of this ShareBody. # noqa: E501 + :rtype: list[str] + """ + return self._add_access_grants + + @add_access_grants.setter + def add_access_grants(self, add_access_grants): + """Sets the add_access_grants of this ShareBody. + + + :param add_access_grants: The add_access_grants of this ShareBody. # noqa: E501 + :type: list[str] + """ + + self._add_access_grants = add_access_grants + + @property + def remove_access_grants(self): + """Gets the remove_access_grants of this ShareBody. # noqa: E501 + + + :return: The remove_access_grants of this ShareBody. # noqa: E501 + :rtype: list[str] + """ + return self._remove_access_grants + + @remove_access_grants.setter + def remove_access_grants(self, remove_access_grants): + """Sets the remove_access_grants of this ShareBody. + + + :param remove_access_grants: The remove_access_grants of this ShareBody. # noqa: E501 + :type: list[str] + """ + + self._remove_access_grants = remove_access_grants + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ShareBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShareBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_request.py b/sdk/python/sdk/zrok/zrok_api/models/share_request.py index 99849586..ee9a08b1 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share_request.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share_request.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class ShareRequest(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -66,12 +61,8 @@ class ShareRequest(object): 'unique_name': 'uniqueName' } - def __init__(self, env_zid=None, share_mode=None, frontend_selection=None, backend_mode=None, backend_proxy_endpoint=None, auth_scheme=None, auth_users=None, oauth_provider=None, oauth_email_domains=None, oauth_authorization_check_interval=None, reserved=None, permission_mode=None, access_grants=None, unique_name=None, _configuration=None): # noqa: E501 + def __init__(self, env_zid=None, share_mode=None, frontend_selection=None, backend_mode=None, backend_proxy_endpoint=None, auth_scheme=None, auth_users=None, oauth_provider=None, oauth_email_domains=None, oauth_authorization_check_interval=None, reserved=None, permission_mode=None, access_grants=None, unique_name=None): # noqa: E501 """ShareRequest - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._env_zid = None self._share_mode = None self._frontend_selection = None @@ -87,7 +78,6 @@ class ShareRequest(object): self._access_grants = None self._unique_name = None self.discriminator = None - if env_zid is not None: self.env_zid = env_zid if share_mode is not None: @@ -157,8 +147,7 @@ class ShareRequest(object): :type: str """ allowed_values = ["public", "private"] # noqa: E501 - if (self._configuration.client_side_validation and - share_mode not in allowed_values): + if share_mode not in allowed_values: raise ValueError( "Invalid value for `share_mode` ({0}), must be one of {1}" # noqa: E501 .format(share_mode, allowed_values) @@ -206,8 +195,7 @@ class ShareRequest(object): :type: str """ allowed_values = ["proxy", "web", "tcpTunnel", "udpTunnel", "caddy", "drive", "socks", "vpn"] # noqa: E501 - if (self._configuration.client_side_validation and - backend_mode not in allowed_values): + if backend_mode not in allowed_values: raise ValueError( "Invalid value for `backend_mode` ({0}), must be one of {1}" # noqa: E501 .format(backend_mode, allowed_values) @@ -297,8 +285,7 @@ class ShareRequest(object): :type: str """ allowed_values = ["github", "google"] # noqa: E501 - if (self._configuration.client_side_validation and - oauth_provider not in allowed_values): + if oauth_provider not in allowed_values: raise ValueError( "Invalid value for `oauth_provider` ({0}), must be one of {1}" # noqa: E501 .format(oauth_provider, allowed_values) @@ -388,8 +375,7 @@ class ShareRequest(object): :type: str """ allowed_values = ["open", "closed"] # noqa: E501 - if (self._configuration.client_side_validation and - permission_mode not in allowed_values): + if permission_mode not in allowed_values: raise ValueError( "Invalid value for `permission_mode` ({0}), must be one of {1}" # noqa: E501 .format(permission_mode, allowed_values) @@ -479,11 +465,8 @@ class ShareRequest(object): if not isinstance(other, ShareRequest): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, ShareRequest): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_response.py b/sdk/python/sdk/zrok/zrok_api/models/share_response.py index f6fbdc81..dcb30e38 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share_response.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share_response.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class ShareResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -42,16 +37,11 @@ class ShareResponse(object): 'share_token': 'shareToken' } - def __init__(self, frontend_proxy_endpoints=None, share_token=None, _configuration=None): # noqa: E501 + def __init__(self, frontend_proxy_endpoints=None, share_token=None): # noqa: E501 """ShareResponse - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._frontend_proxy_endpoints = None self._share_token = None self.discriminator = None - if frontend_proxy_endpoints is not None: self.frontend_proxy_endpoints = frontend_proxy_endpoints if share_token is not None: @@ -139,11 +129,8 @@ class ShareResponse(object): if not isinstance(other, ShareResponse): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, ShareResponse): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/shares.py b/sdk/python/sdk/zrok/zrok_api/models/shares.py index 4944ac1e..c1ce3f4d 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/shares.py +++ b/sdk/python/sdk/zrok/zrok_api/models/shares.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class Shares(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -38,11 +33,8 @@ class Shares(object): attribute_map = { } - def __init__(self, _configuration=None): # noqa: E501 + def __init__(self): # noqa: E501 """Shares - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -85,11 +77,8 @@ class Shares(object): if not isinstance(other, Shares): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Shares): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/spark_data.py b/sdk/python/sdk/zrok/zrok_api/models/spark_data.py index 00ecc378..9ed04dfe 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/spark_data.py +++ b/sdk/python/sdk/zrok/zrok_api/models/spark_data.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class SparkData(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -38,11 +33,8 @@ class SparkData(object): attribute_map = { } - def __init__(self, _configuration=None): # noqa: E501 + def __init__(self): # noqa: E501 """SparkData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -85,11 +77,8 @@ class SparkData(object): if not isinstance(other, SparkData): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, SparkData): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py b/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py index 14997b8e..52a1c1fd 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py +++ b/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class SparkDataSample(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -42,16 +37,11 @@ class SparkDataSample(object): 'tx': 'tx' } - def __init__(self, rx=None, tx=None, _configuration=None): # noqa: E501 + def __init__(self, rx=None, tx=None): # noqa: E501 """SparkDataSample - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._rx = None self._tx = None self.discriminator = None - if rx is not None: self.rx = rx if tx is not None: @@ -139,11 +129,8 @@ class SparkDataSample(object): if not isinstance(other, SparkDataSample): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, SparkDataSample): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py b/sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py new file mode 100644 index 00000000..fd84ff20 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SparklinesBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'account': 'bool', + 'environments': 'list[str]', + 'shares': 'list[str]' + } + + attribute_map = { + 'account': 'account', + 'environments': 'environments', + 'shares': 'shares' + } + + def __init__(self, account=None, environments=None, shares=None): # noqa: E501 + """SparklinesBody - a model defined in Swagger""" # noqa: E501 + self._account = None + self._environments = None + self._shares = None + self.discriminator = None + if account is not None: + self.account = account + if environments is not None: + self.environments = environments + if shares is not None: + self.shares = shares + + @property + def account(self): + """Gets the account of this SparklinesBody. # noqa: E501 + + + :return: The account of this SparklinesBody. # noqa: E501 + :rtype: bool + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this SparklinesBody. + + + :param account: The account of this SparklinesBody. # noqa: E501 + :type: bool + """ + + self._account = account + + @property + def environments(self): + """Gets the environments of this SparklinesBody. # noqa: E501 + + + :return: The environments of this SparklinesBody. # noqa: E501 + :rtype: list[str] + """ + return self._environments + + @environments.setter + def environments(self, environments): + """Sets the environments of this SparklinesBody. + + + :param environments: The environments of this SparklinesBody. # noqa: E501 + :type: list[str] + """ + + self._environments = environments + + @property + def shares(self): + """Gets the shares of this SparklinesBody. # noqa: E501 + + + :return: The shares of this SparklinesBody. # noqa: E501 + :rtype: list[str] + """ + return self._shares + + @shares.setter + def shares(self, shares): + """Sets the shares of this SparklinesBody. + + + :param shares: The shares of this SparklinesBody. # noqa: E501 + :type: list[str] + """ + + self._shares = shares + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SparklinesBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SparklinesBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py b/sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py new file mode 100644 index 00000000..0aaa2468 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class TokenGenerateBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'invite_tokens': 'list[str]' + } + + attribute_map = { + 'invite_tokens': 'inviteTokens' + } + + def __init__(self, invite_tokens=None): # noqa: E501 + """TokenGenerateBody - a model defined in Swagger""" # noqa: E501 + self._invite_tokens = None + self.discriminator = None + if invite_tokens is not None: + self.invite_tokens = invite_tokens + + @property + def invite_tokens(self): + """Gets the invite_tokens of this TokenGenerateBody. # noqa: E501 + + + :return: The invite_tokens of this TokenGenerateBody. # noqa: E501 + :rtype: list[str] + """ + return self._invite_tokens + + @invite_tokens.setter + def invite_tokens(self, invite_tokens): + """Sets the invite_tokens of this TokenGenerateBody. + + + :param invite_tokens: The invite_tokens of this TokenGenerateBody. # noqa: E501 + :type: list[str] + """ + + self._invite_tokens = invite_tokens + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TokenGenerateBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TokenGenerateBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py b/sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py new file mode 100644 index 00000000..77321334 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UnaccessBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'frontend_token': 'str', + 'env_zid': 'str', + 'share_token': 'str' + } + + attribute_map = { + 'frontend_token': 'frontendToken', + 'env_zid': 'envZId', + 'share_token': 'shareToken' + } + + def __init__(self, frontend_token=None, env_zid=None, share_token=None): # noqa: E501 + """UnaccessBody - a model defined in Swagger""" # noqa: E501 + self._frontend_token = None + self._env_zid = None + self._share_token = None + self.discriminator = None + if frontend_token is not None: + self.frontend_token = frontend_token + if env_zid is not None: + self.env_zid = env_zid + if share_token is not None: + self.share_token = share_token + + @property + def frontend_token(self): + """Gets the frontend_token of this UnaccessBody. # noqa: E501 + + + :return: The frontend_token of this UnaccessBody. # noqa: E501 + :rtype: str + """ + return self._frontend_token + + @frontend_token.setter + def frontend_token(self, frontend_token): + """Sets the frontend_token of this UnaccessBody. + + + :param frontend_token: The frontend_token of this UnaccessBody. # noqa: E501 + :type: str + """ + + self._frontend_token = frontend_token + + @property + def env_zid(self): + """Gets the env_zid of this UnaccessBody. # noqa: E501 + + + :return: The env_zid of this UnaccessBody. # noqa: E501 + :rtype: str + """ + return self._env_zid + + @env_zid.setter + def env_zid(self, env_zid): + """Sets the env_zid of this UnaccessBody. + + + :param env_zid: The env_zid of this UnaccessBody. # noqa: E501 + :type: str + """ + + self._env_zid = env_zid + + @property + def share_token(self): + """Gets the share_token of this UnaccessBody. # noqa: E501 + + + :return: The share_token of this UnaccessBody. # noqa: E501 + :rtype: str + """ + return self._share_token + + @share_token.setter + def share_token(self, share_token): + """Sets the share_token of this UnaccessBody. + + + :param share_token: The share_token of this UnaccessBody. # noqa: E501 + :type: str + """ + + self._share_token = share_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UnaccessBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnaccessBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/unshare_body.py b/sdk/python/sdk/zrok/zrok_api/models/unshare_body.py new file mode 100644 index 00000000..e6463475 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/unshare_body.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UnshareBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'env_zid': 'str', + 'share_token': 'str', + 'reserved': 'bool' + } + + attribute_map = { + 'env_zid': 'envZId', + 'share_token': 'shareToken', + 'reserved': 'reserved' + } + + def __init__(self, env_zid=None, share_token=None, reserved=None): # noqa: E501 + """UnshareBody - a model defined in Swagger""" # noqa: E501 + self._env_zid = None + self._share_token = None + self._reserved = None + self.discriminator = None + if env_zid is not None: + self.env_zid = env_zid + if share_token is not None: + self.share_token = share_token + if reserved is not None: + self.reserved = reserved + + @property + def env_zid(self): + """Gets the env_zid of this UnshareBody. # noqa: E501 + + + :return: The env_zid of this UnshareBody. # noqa: E501 + :rtype: str + """ + return self._env_zid + + @env_zid.setter + def env_zid(self, env_zid): + """Sets the env_zid of this UnshareBody. + + + :param env_zid: The env_zid of this UnshareBody. # noqa: E501 + :type: str + """ + + self._env_zid = env_zid + + @property + def share_token(self): + """Gets the share_token of this UnshareBody. # noqa: E501 + + + :return: The share_token of this UnshareBody. # noqa: E501 + :rtype: str + """ + return self._share_token + + @share_token.setter + def share_token(self, share_token): + """Sets the share_token of this UnshareBody. + + + :param share_token: The share_token of this UnshareBody. # noqa: E501 + :type: str + """ + + self._share_token = share_token + + @property + def reserved(self): + """Gets the reserved of this UnshareBody. # noqa: E501 + + + :return: The reserved of this UnshareBody. # noqa: E501 + :rtype: bool + """ + return self._reserved + + @reserved.setter + def reserved(self, reserved): + """Sets the reserved of this UnshareBody. + + + :param reserved: The reserved of this UnshareBody. # noqa: E501 + :type: bool + """ + + self._reserved = reserved + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UnshareBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnshareBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify_body.py b/sdk/python/sdk/zrok/zrok_api/models/verify_body.py new file mode 100644 index 00000000..26acf208 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/verify_body.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class VerifyBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'register_token': 'str' + } + + attribute_map = { + 'register_token': 'registerToken' + } + + def __init__(self, register_token=None): # noqa: E501 + """VerifyBody - a model defined in Swagger""" # noqa: E501 + self._register_token = None + self.discriminator = None + if register_token is not None: + self.register_token = register_token + + @property + def register_token(self): + """Gets the register_token of this VerifyBody. # noqa: E501 + + + :return: The register_token of this VerifyBody. # noqa: E501 + :rtype: str + """ + return self._register_token + + @register_token.setter + def register_token(self, register_token): + """Sets the register_token of this VerifyBody. + + + :param register_token: The register_token of this VerifyBody. # noqa: E501 + :type: str + """ + + self._register_token = register_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VerifyBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VerifyBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/version.py b/sdk/python/sdk/zrok/zrok_api/models/version.py index bdf42e3f..98e90760 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/version.py +++ b/sdk/python/sdk/zrok/zrok_api/models/version.py @@ -10,21 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six -from zrok_api.configuration import Configuration - - class Version(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ Attributes: swagger_types (dict): The key is attribute name @@ -38,11 +33,8 @@ class Version(object): attribute_map = { } - def __init__(self, _configuration=None): # noqa: E501 + def __init__(self): # noqa: E501 """Version - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -85,11 +77,8 @@ class Version(object): if not isinstance(other, Version): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Version): - return True - - return self.to_dict() != other.to_dict() + return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/rest.py b/sdk/python/sdk/zrok/zrok_api/rest.py index da85f5cf..a2c54065 100644 --- a/sdk/python/sdk/zrok/zrok_api/rest.py +++ b/sdk/python/sdk/zrok/zrok_api/rest.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import io @@ -43,11 +42,11 @@ class RESTResponse(io.IOBase): def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.headers + return self.urllib3_response.getheaders() def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.headers.get(name, default) + return self.urllib3_response.getheader(name, default) class RESTClientObject(object): @@ -216,11 +215,6 @@ class RESTClientObject(object): if _preload_content: r = RESTResponse(r) - # In the python 3, the response.data is bytes. - # we need to decode it to string. - if six.PY3: - r.data = r.data.decode('utf8') - # log response body logger.debug("response body: %s", r.data) From 2cdeafd2eba034b3da8d711ff741482933c81265 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 27 Feb 2025 17:04:19 -0500 Subject: [PATCH 05/56] tweak the model's attribute maps --- sdk/python/sdk/zrok/zrok/access.py | 4 ++-- sdk/python/sdk/zrok/zrok_api/api/metadata_api.py | 1 + sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py | 2 +- sdk/python/sdk/zrok/zrok_api/models/unshare_request.py | 2 +- sdk/python/sdk/zrok/zrok_api/models/update_share_request.py | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sdk/python/sdk/zrok/zrok/access.py b/sdk/python/sdk/zrok/zrok/access.py index 263bb3cd..8c91e869 100644 --- a/sdk/python/sdk/zrok/zrok/access.py +++ b/sdk/python/sdk/zrok/zrok/access.py @@ -37,9 +37,9 @@ def CreateAccess(root: Root, request: model.AccessRequest) -> model.Access: res = ShareApi(zrok).access(body=out) except Exception as e: raise Exception("unable to create access", e) - return model.Access(Token=res['frontendToken'], + return model.Access(Token=res.frontend_token, ShareToken=request.ShareToken, - BackendMode=res['backendMode']) + BackendMode=res.backend_mode) def DeleteAccess(root: Root, acc: model.Access): diff --git a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py index 1afe9e25..6db4a488 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py @@ -110,6 +110,7 @@ class MetadataApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( + # '/version', 'POST', '/clientVersionCheck', 'POST', path_params, query_params, diff --git a/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py b/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py index 75158673..4d67f81e 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py +++ b/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py @@ -36,7 +36,7 @@ class UnaccessRequest(object): attribute_map = { 'frontend_token': 'frontendToken', 'env_zid': 'envZId', - 'shr_token': 'shrToken' + 'shr_token': 'shareToken' } def __init__(self, frontend_token=None, env_zid=None, shr_token=None): # noqa: E501 diff --git a/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py b/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py index ecfc9e3c..def07585 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py +++ b/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py @@ -35,7 +35,7 @@ class UnshareRequest(object): attribute_map = { 'env_zid': 'envZId', - 'shr_token': 'shrToken', + 'shr_token': 'shareToken', 'reserved': 'reserved' } diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py index 3548c101..f82b0020 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py +++ b/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py @@ -35,7 +35,7 @@ class UpdateShareRequest(object): } attribute_map = { - 'shr_token': 'shrToken', + 'shr_token': 'shareToken', 'backend_proxy_endpoint': 'backendProxyEndpoint', 'add_access_grants': 'addAccessGrants', 'remove_access_grants': 'removeAccessGrants' From c62d52755e16f1d79ab7a1a9b587f3b25ec34951 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 27 Feb 2025 17:12:22 -0500 Subject: [PATCH 06/56] prune swagger-codegen v2 models --- bin/generate_rest.sh | 11 +- sdk/python/sdk/zrok/zrok_api/api_client.py | 1 - .../zrok/zrok_api/models/access_request.py | 136 ---------- .../zrok/zrok_api/models/access_response.py | 136 ---------- sdk/python/sdk/zrok/zrok_api/models/body.py | 175 ------------- sdk/python/sdk/zrok/zrok_api/models/body1.py | 149 ----------- sdk/python/sdk/zrok/zrok_api/models/body10.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body11.py | 175 ------------- sdk/python/sdk/zrok/zrok_api/models/body12.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body13.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body14.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body15.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body16.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body17.py | 175 ------------- sdk/python/sdk/zrok/zrok_api/models/body18.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body19.py | 149 ----------- sdk/python/sdk/zrok/zrok_api/models/body2.py | 149 ----------- sdk/python/sdk/zrok/zrok_api/models/body20.py | 149 ----------- sdk/python/sdk/zrok/zrok_api/models/body21.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body22.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body23.py | 175 ------------- sdk/python/sdk/zrok/zrok_api/models/body24.py | 201 --------------- sdk/python/sdk/zrok/zrok_api/models/body25.py | 175 ------------- sdk/python/sdk/zrok/zrok_api/models/body26.py | 201 --------------- sdk/python/sdk/zrok/zrok_api/models/body27.py | 175 ------------- sdk/python/sdk/zrok/zrok_api/models/body28.py | 175 ------------- sdk/python/sdk/zrok/zrok_api/models/body3.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body4.py | 149 ----------- sdk/python/sdk/zrok/zrok_api/models/body5.py | 149 ----------- sdk/python/sdk/zrok/zrok_api/models/body6.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body7.py | 123 --------- sdk/python/sdk/zrok/zrok_api/models/body8.py | 149 ----------- sdk/python/sdk/zrok/zrok_api/models/body9.py | 208 --------------- .../models/change_password_request.py | 162 ------------ .../models/create_frontend_request.py | 194 -------------- .../models/create_frontend_response.py | 110 -------- .../models/delete_frontend_request.py | 110 -------- .../zrok/zrok_api/models/disable_request.py | 110 -------- .../zrok/zrok_api/models/enable_request.py | 136 ---------- .../zrok/zrok_api/models/enable_response.py | 136 ---------- .../models/inline_response2001_members.py | 136 ---------- .../inline_response2002_organizations.py | 136 ---------- .../models/inline_response2003_memberships.py | 162 ------------ .../zrok/zrok_api/models/invite_request.py | 136 ---------- .../models/invite_token_generate_request.py | 110 -------- .../sdk/zrok/zrok_api/models/login_request.py | 136 ---------- .../zrok/zrok_api/models/login_response.py | 84 ------ .../models/organization_members_body.py | 110 -------- .../organizationremove_organizations.py | 136 ---------- .../zrok_api/models/password_requirements.py | 214 ---------------- .../zrok/zrok_api/models/public_frontend.py | 240 ------------------ .../zrok_api/models/public_frontend_list.py | 84 ------ .../zrok_api/models/regenerate_token_body.py | 110 -------- .../zrok/zrok_api/models/register_request.py | 136 ---------- .../zrok/zrok_api/models/register_response.py | 110 -------- .../zrok_api/models/reset_password_request.py | 136 ---------- .../zrok/zrok_api/models/unaccess_request.py | 162 ------------ .../zrok/zrok_api/models/unshare_request.py | 162 ------------ .../models/update_frontend_request.py | 162 ------------ .../zrok_api/models/update_share_request.py | 188 -------------- .../zrok/zrok_api/models/verify_request.py | 110 -------- .../zrok/zrok_api/models/verify_response.py | 110 -------- 62 files changed, 9 insertions(+), 8657 deletions(-) delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/access_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/access_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body1.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body10.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body11.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body12.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body13.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body14.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body15.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body16.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body17.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body18.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body19.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body2.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body20.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body21.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body22.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body23.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body24.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body25.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body26.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body27.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body28.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body3.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body4.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body5.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body6.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body7.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body8.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/body9.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/change_password_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_frontend_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/delete_frontend_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/disable_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/enable_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/enable_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2001_members.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2002_organizations.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2003_memberships.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/invite_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/login_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/login_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/organization_members_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/organizationremove_organizations.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/password_requirements.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/public_frontend.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/public_frontend_list.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/regenerate_token_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/register_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/register_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/unshare_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/update_share_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/verify_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/verify_response.py diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index f7881a7d..16718bbd 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -56,5 +56,12 @@ echo "...generating python sdk client" swagger-codegen generate -i specs/zrok.yml -o sdk/python/sdk/zrok -c $pythonConfig -l python git checkout rest_server_zrok/configure_zrok.go -rm sdk/nodejs/sdk/src/zrok/api/git_push.sh -rm sdk/python/sdk/zrok/git_push.sh + +for OLD in sdk/python/sdk/zrok/git_push.sh sdk/nodejs/sdk/src/zrok/api/git_push.sh +do + if [ -e "$OLD" ] + then + rm "$OLD" + fi +done + diff --git a/sdk/python/sdk/zrok/zrok_api/api_client.py b/sdk/python/sdk/zrok/zrok_api/api_client.py index e42ff0d2..f917a79b 100644 --- a/sdk/python/sdk/zrok/zrok_api/api_client.py +++ b/sdk/python/sdk/zrok/zrok_api/api_client.py @@ -8,7 +8,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import datetime diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_request.py b/sdk/python/sdk/zrok/zrok_api/models/access_request.py deleted file mode 100644 index efb5bfc9..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/access_request.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AccessRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'env_zid': 'str', - 'shr_token': 'str' - } - - attribute_map = { - 'env_zid': 'envZId', - 'shr_token': 'shareToken' - } - - def __init__(self, env_zid=None, shr_token=None): # noqa: E501 - """AccessRequest - a model defined in Swagger""" # noqa: E501 - self._env_zid = None - self._shr_token = None - self.discriminator = None - if env_zid is not None: - self.env_zid = env_zid - if shr_token is not None: - self.shr_token = shr_token - - @property - def env_zid(self): - """Gets the env_zid of this AccessRequest. # noqa: E501 - - - :return: The env_zid of this AccessRequest. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this AccessRequest. - - - :param env_zid: The env_zid of this AccessRequest. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def shr_token(self): - """Gets the shr_token of this AccessRequest. # noqa: E501 - - - :return: The shr_token of this AccessRequest. # noqa: E501 - :rtype: str - """ - return self._shr_token - - @shr_token.setter - def shr_token(self, shr_token): - """Sets the shr_token of this AccessRequest. - - - :param shr_token: The shr_token of this AccessRequest. # noqa: E501 - :type: str - """ - - self._shr_token = shr_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AccessRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccessRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_response.py b/sdk/python/sdk/zrok/zrok_api/models/access_response.py deleted file mode 100644 index ba02584f..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/access_response.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AccessResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'backend_mode': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'backend_mode': 'backendMode' - } - - def __init__(self, frontend_token=None, backend_mode=None): # noqa: E501 - """AccessResponse - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._backend_mode = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if backend_mode is not None: - self.backend_mode = backend_mode - - @property - def frontend_token(self): - """Gets the frontend_token of this AccessResponse. # noqa: E501 - - - :return: The frontend_token of this AccessResponse. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this AccessResponse. - - - :param frontend_token: The frontend_token of this AccessResponse. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def backend_mode(self): - """Gets the backend_mode of this AccessResponse. # noqa: E501 - - - :return: The backend_mode of this AccessResponse. # noqa: E501 - :rtype: str - """ - return self._backend_mode - - @backend_mode.setter - def backend_mode(self, backend_mode): - """Sets the backend_mode of this AccessResponse. - - - :param backend_mode: The backend_mode of this AccessResponse. # noqa: E501 - :type: str - """ - - self._backend_mode = backend_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AccessResponse, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccessResponse): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/body.py b/sdk/python/sdk/zrok/zrok_api/models/body.py deleted file mode 100644 index 50910f74..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'old_password': 'str', - 'new_password': 'str' - } - - attribute_map = { - 'email': 'email', - 'old_password': 'oldPassword', - 'new_password': 'newPassword' - } - - def __init__(self, email=None, old_password=None, new_password=None, _configuration=None): # noqa: E501 - """Body - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._email = None - self._old_password = None - self._new_password = None - self.discriminator = None - - if email is not None: - self.email = email - if old_password is not None: - self.old_password = old_password - if new_password is not None: - self.new_password = new_password - - @property - def email(self): - """Gets the email of this Body. # noqa: E501 - - - :return: The email of this Body. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this Body. - - - :param email: The email of this Body. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def old_password(self): - """Gets the old_password of this Body. # noqa: E501 - - - :return: The old_password of this Body. # noqa: E501 - :rtype: str - """ - return self._old_password - - @old_password.setter - def old_password(self, old_password): - """Sets the old_password of this Body. - - - :param old_password: The old_password of this Body. # noqa: E501 - :type: str - """ - - self._old_password = old_password - - @property - def new_password(self): - """Gets the new_password of this Body. # noqa: E501 - - - :return: The new_password of this Body. # noqa: E501 - :rtype: str - """ - return self._new_password - - @new_password.setter - def new_password(self, new_password): - """Sets the new_password of this Body. - - - :param new_password: The new_password of this Body. # noqa: E501 - :type: str - """ - - self._new_password = new_password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body1.py b/sdk/python/sdk/zrok/zrok_api/models/body1.py deleted file mode 100644 index 42f6e3de..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body1.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body1(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'invite_token': 'str' - } - - attribute_map = { - 'email': 'email', - 'invite_token': 'inviteToken' - } - - def __init__(self, email=None, invite_token=None, _configuration=None): # noqa: E501 - """Body1 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._email = None - self._invite_token = None - self.discriminator = None - - if email is not None: - self.email = email - if invite_token is not None: - self.invite_token = invite_token - - @property - def email(self): - """Gets the email of this Body1. # noqa: E501 - - - :return: The email of this Body1. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this Body1. - - - :param email: The email of this Body1. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def invite_token(self): - """Gets the invite_token of this Body1. # noqa: E501 - - - :return: The invite_token of this Body1. # noqa: E501 - :rtype: str - """ - return self._invite_token - - @invite_token.setter - def invite_token(self, invite_token): - """Sets the invite_token of this Body1. - - - :param invite_token: The invite_token of this Body1. # noqa: E501 - :type: str - """ - - self._invite_token = invite_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body1, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body1): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body1): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body10.py b/sdk/python/sdk/zrok/zrok_api/models/body10.py deleted file mode 100644 index 4c2c524b..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body10.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body10(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken' - } - - def __init__(self, frontend_token=None, _configuration=None): # noqa: E501 - """Body10 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._frontend_token = None - self.discriminator = None - - if frontend_token is not None: - self.frontend_token = frontend_token - - @property - def frontend_token(self): - """Gets the frontend_token of this Body10. # noqa: E501 - - - :return: The frontend_token of this Body10. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this Body10. - - - :param frontend_token: The frontend_token of this Body10. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body10, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body10): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body10): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body11.py b/sdk/python/sdk/zrok/zrok_api/models/body11.py deleted file mode 100644 index 7002c803..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body11.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body11(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'public_name': 'str', - 'url_template': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'public_name': 'publicName', - 'url_template': 'urlTemplate' - } - - def __init__(self, frontend_token=None, public_name=None, url_template=None, _configuration=None): # noqa: E501 - """Body11 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._frontend_token = None - self._public_name = None - self._url_template = None - self.discriminator = None - - if frontend_token is not None: - self.frontend_token = frontend_token - if public_name is not None: - self.public_name = public_name - if url_template is not None: - self.url_template = url_template - - @property - def frontend_token(self): - """Gets the frontend_token of this Body11. # noqa: E501 - - - :return: The frontend_token of this Body11. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this Body11. - - - :param frontend_token: The frontend_token of this Body11. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def public_name(self): - """Gets the public_name of this Body11. # noqa: E501 - - - :return: The public_name of this Body11. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this Body11. - - - :param public_name: The public_name of this Body11. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def url_template(self): - """Gets the url_template of this Body11. # noqa: E501 - - - :return: The url_template of this Body11. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this Body11. - - - :param url_template: The url_template of this Body11. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body11, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body11): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body11): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body12.py b/sdk/python/sdk/zrok/zrok_api/models/body12.py deleted file mode 100644 index 8740741c..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body12.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body12(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str' - } - - attribute_map = { - 'email': 'email' - } - - def __init__(self, email=None, _configuration=None): # noqa: E501 - """Body12 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._email = None - self.discriminator = None - - if email is not None: - self.email = email - - @property - def email(self): - """Gets the email of this Body12. # noqa: E501 - - - :return: The email of this Body12. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this Body12. - - - :param email: The email of this Body12. # noqa: E501 - :type: str - """ - - self._email = email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body12, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body12): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body12): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body13.py b/sdk/python/sdk/zrok/zrok_api/models/body13.py deleted file mode 100644 index 0607b626..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body13.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body13(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'name': 'str' - } - - attribute_map = { - 'name': 'name' - } - - def __init__(self, name=None, _configuration=None): # noqa: E501 - """Body13 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._name = None - self.discriminator = None - - if name is not None: - self.name = name - - @property - def name(self): - """Gets the name of this Body13. # noqa: E501 - - - :return: The name of this Body13. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Body13. - - - :param name: The name of this Body13. # noqa: E501 - :type: str - """ - - self._name = name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body13, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body13): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body13): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body14.py b/sdk/python/sdk/zrok/zrok_api/models/body14.py deleted file mode 100644 index 36b8a41e..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body14.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body14(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'invite_tokens': 'list[str]' - } - - attribute_map = { - 'invite_tokens': 'inviteTokens' - } - - def __init__(self, invite_tokens=None, _configuration=None): # noqa: E501 - """Body14 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._invite_tokens = None - self.discriminator = None - - if invite_tokens is not None: - self.invite_tokens = invite_tokens - - @property - def invite_tokens(self): - """Gets the invite_tokens of this Body14. # noqa: E501 - - - :return: The invite_tokens of this Body14. # noqa: E501 - :rtype: list[str] - """ - return self._invite_tokens - - @invite_tokens.setter - def invite_tokens(self, invite_tokens): - """Sets the invite_tokens of this Body14. - - - :param invite_tokens: The invite_tokens of this Body14. # noqa: E501 - :type: list[str] - """ - - self._invite_tokens = invite_tokens - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body14, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body14): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body14): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body15.py b/sdk/python/sdk/zrok/zrok_api/models/body15.py deleted file mode 100644 index 665896c3..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body15.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body15(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'description': 'str' - } - - attribute_map = { - 'description': 'description' - } - - def __init__(self, description=None, _configuration=None): # noqa: E501 - """Body15 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._description = None - self.discriminator = None - - if description is not None: - self.description = description - - @property - def description(self): - """Gets the description of this Body15. # noqa: E501 - - - :return: The description of this Body15. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Body15. - - - :param description: The description of this Body15. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body15, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body15): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body15): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body16.py b/sdk/python/sdk/zrok/zrok_api/models/body16.py deleted file mode 100644 index bddb54cf..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body16.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body16(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken' - } - - def __init__(self, organization_token=None, _configuration=None): # noqa: E501 - """Body16 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._organization_token = None - self.discriminator = None - - if organization_token is not None: - self.organization_token = organization_token - - @property - def organization_token(self): - """Gets the organization_token of this Body16. # noqa: E501 - - - :return: The organization_token of this Body16. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this Body16. - - - :param organization_token: The organization_token of this Body16. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body16, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body16): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body16): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body17.py b/sdk/python/sdk/zrok/zrok_api/models/body17.py deleted file mode 100644 index c3f6a8c8..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body17.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body17(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str', - 'email': 'str', - 'admin': 'bool' - } - - attribute_map = { - 'organization_token': 'organizationToken', - 'email': 'email', - 'admin': 'admin' - } - - def __init__(self, organization_token=None, email=None, admin=None, _configuration=None): # noqa: E501 - """Body17 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._organization_token = None - self._email = None - self._admin = None - self.discriminator = None - - if organization_token is not None: - self.organization_token = organization_token - if email is not None: - self.email = email - if admin is not None: - self.admin = admin - - @property - def organization_token(self): - """Gets the organization_token of this Body17. # noqa: E501 - - - :return: The organization_token of this Body17. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this Body17. - - - :param organization_token: The organization_token of this Body17. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - @property - def email(self): - """Gets the email of this Body17. # noqa: E501 - - - :return: The email of this Body17. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this Body17. - - - :param email: The email of this Body17. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def admin(self): - """Gets the admin of this Body17. # noqa: E501 - - - :return: The admin of this Body17. # noqa: E501 - :rtype: bool - """ - return self._admin - - @admin.setter - def admin(self, admin): - """Sets the admin of this Body17. - - - :param admin: The admin of this Body17. # noqa: E501 - :type: bool - """ - - self._admin = admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body17, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body17): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body17): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body18.py b/sdk/python/sdk/zrok/zrok_api/models/body18.py deleted file mode 100644 index 24264efd..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body18.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body18(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken' - } - - def __init__(self, organization_token=None, _configuration=None): # noqa: E501 - """Body18 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._organization_token = None - self.discriminator = None - - if organization_token is not None: - self.organization_token = organization_token - - @property - def organization_token(self): - """Gets the organization_token of this Body18. # noqa: E501 - - - :return: The organization_token of this Body18. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this Body18. - - - :param organization_token: The organization_token of this Body18. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body18, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body18): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body18): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body19.py b/sdk/python/sdk/zrok/zrok_api/models/body19.py deleted file mode 100644 index 1ca823ed..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body19.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body19(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str', - 'email': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken', - 'email': 'email' - } - - def __init__(self, organization_token=None, email=None, _configuration=None): # noqa: E501 - """Body19 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._organization_token = None - self._email = None - self.discriminator = None - - if organization_token is not None: - self.organization_token = organization_token - if email is not None: - self.email = email - - @property - def organization_token(self): - """Gets the organization_token of this Body19. # noqa: E501 - - - :return: The organization_token of this Body19. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this Body19. - - - :param organization_token: The organization_token of this Body19. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - @property - def email(self): - """Gets the email of this Body19. # noqa: E501 - - - :return: The email of this Body19. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this Body19. - - - :param email: The email of this Body19. # noqa: E501 - :type: str - """ - - self._email = email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body19, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body19): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body19): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body2.py b/sdk/python/sdk/zrok/zrok_api/models/body2.py deleted file mode 100644 index 65befe3f..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body2.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body2(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'password': 'str' - } - - attribute_map = { - 'email': 'email', - 'password': 'password' - } - - def __init__(self, email=None, password=None, _configuration=None): # noqa: E501 - """Body2 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._email = None - self._password = None - self.discriminator = None - - if email is not None: - self.email = email - if password is not None: - self.password = password - - @property - def email(self): - """Gets the email of this Body2. # noqa: E501 - - - :return: The email of this Body2. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this Body2. - - - :param email: The email of this Body2. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def password(self): - """Gets the password of this Body2. # noqa: E501 - - - :return: The password of this Body2. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this Body2. - - - :param password: The password of this Body2. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body2, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body2): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body2): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body20.py b/sdk/python/sdk/zrok/zrok_api/models/body20.py deleted file mode 100644 index af02cdc4..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body20.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body20(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'description': 'str', - 'host': 'str' - } - - attribute_map = { - 'description': 'description', - 'host': 'host' - } - - def __init__(self, description=None, host=None, _configuration=None): # noqa: E501 - """Body20 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._description = None - self._host = None - self.discriminator = None - - if description is not None: - self.description = description - if host is not None: - self.host = host - - @property - def description(self): - """Gets the description of this Body20. # noqa: E501 - - - :return: The description of this Body20. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Body20. - - - :param description: The description of this Body20. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def host(self): - """Gets the host of this Body20. # noqa: E501 - - - :return: The host of this Body20. # noqa: E501 - :rtype: str - """ - return self._host - - @host.setter - def host(self, host): - """Sets the host of this Body20. - - - :param host: The host of this Body20. # noqa: E501 - :type: str - """ - - self._host = host - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body20, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body20): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body20): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body21.py b/sdk/python/sdk/zrok/zrok_api/models/body21.py deleted file mode 100644 index 4096aa16..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body21.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body21(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identity': 'str' - } - - attribute_map = { - 'identity': 'identity' - } - - def __init__(self, identity=None, _configuration=None): # noqa: E501 - """Body21 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._identity = None - self.discriminator = None - - if identity is not None: - self.identity = identity - - @property - def identity(self): - """Gets the identity of this Body21. # noqa: E501 - - - :return: The identity of this Body21. # noqa: E501 - :rtype: str - """ - return self._identity - - @identity.setter - def identity(self, identity): - """Sets the identity of this Body21. - - - :param identity: The identity of this Body21. # noqa: E501 - :type: str - """ - - self._identity = identity - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body21, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body21): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body21): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body22.py b/sdk/python/sdk/zrok/zrok_api/models/body22.py deleted file mode 100644 index f4b1e9b4..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body22.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body22(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'client_version': 'str' - } - - attribute_map = { - 'client_version': 'clientVersion' - } - - def __init__(self, client_version=None, _configuration=None): # noqa: E501 - """Body22 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._client_version = None - self.discriminator = None - - if client_version is not None: - self.client_version = client_version - - @property - def client_version(self): - """Gets the client_version of this Body22. # noqa: E501 - - - :return: The client_version of this Body22. # noqa: E501 - :rtype: str - """ - return self._client_version - - @client_version.setter - def client_version(self, client_version): - """Sets the client_version of this Body22. - - - :param client_version: The client_version of this Body22. # noqa: E501 - :type: str - """ - - self._client_version = client_version - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body22, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body22): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body22): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body23.py b/sdk/python/sdk/zrok/zrok_api/models/body23.py deleted file mode 100644 index 03a151cf..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body23.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body23(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'account': 'bool', - 'environments': 'list[str]', - 'shares': 'list[str]' - } - - attribute_map = { - 'account': 'account', - 'environments': 'environments', - 'shares': 'shares' - } - - def __init__(self, account=None, environments=None, shares=None, _configuration=None): # noqa: E501 - """Body23 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._account = None - self._environments = None - self._shares = None - self.discriminator = None - - if account is not None: - self.account = account - if environments is not None: - self.environments = environments - if shares is not None: - self.shares = shares - - @property - def account(self): - """Gets the account of this Body23. # noqa: E501 - - - :return: The account of this Body23. # noqa: E501 - :rtype: bool - """ - return self._account - - @account.setter - def account(self, account): - """Sets the account of this Body23. - - - :param account: The account of this Body23. # noqa: E501 - :type: bool - """ - - self._account = account - - @property - def environments(self): - """Gets the environments of this Body23. # noqa: E501 - - - :return: The environments of this Body23. # noqa: E501 - :rtype: list[str] - """ - return self._environments - - @environments.setter - def environments(self, environments): - """Sets the environments of this Body23. - - - :param environments: The environments of this Body23. # noqa: E501 - :type: list[str] - """ - - self._environments = environments - - @property - def shares(self): - """Gets the shares of this Body23. # noqa: E501 - - - :return: The shares of this Body23. # noqa: E501 - :rtype: list[str] - """ - return self._shares - - @shares.setter - def shares(self, shares): - """Sets the shares of this Body23. - - - :param shares: The shares of this Body23. # noqa: E501 - :type: list[str] - """ - - self._shares = shares - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body23, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body23): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body23): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body24.py b/sdk/python/sdk/zrok/zrok_api/models/body24.py deleted file mode 100644 index fdbb8713..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body24.py +++ /dev/null @@ -1,201 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body24(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'env_zid': 'str', - 'share_token': 'str', - 'bind_address': 'str', - 'description': 'str' - } - - attribute_map = { - 'env_zid': 'envZId', - 'share_token': 'shareToken', - 'bind_address': 'bindAddress', - 'description': 'description' - } - - def __init__(self, env_zid=None, share_token=None, bind_address=None, description=None, _configuration=None): # noqa: E501 - """Body24 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._env_zid = None - self._share_token = None - self._bind_address = None - self._description = None - self.discriminator = None - - if env_zid is not None: - self.env_zid = env_zid - if share_token is not None: - self.share_token = share_token - if bind_address is not None: - self.bind_address = bind_address - if description is not None: - self.description = description - - @property - def env_zid(self): - """Gets the env_zid of this Body24. # noqa: E501 - - - :return: The env_zid of this Body24. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this Body24. - - - :param env_zid: The env_zid of this Body24. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def share_token(self): - """Gets the share_token of this Body24. # noqa: E501 - - - :return: The share_token of this Body24. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this Body24. - - - :param share_token: The share_token of this Body24. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def bind_address(self): - """Gets the bind_address of this Body24. # noqa: E501 - - - :return: The bind_address of this Body24. # noqa: E501 - :rtype: str - """ - return self._bind_address - - @bind_address.setter - def bind_address(self, bind_address): - """Sets the bind_address of this Body24. - - - :param bind_address: The bind_address of this Body24. # noqa: E501 - :type: str - """ - - self._bind_address = bind_address - - @property - def description(self): - """Gets the description of this Body24. # noqa: E501 - - - :return: The description of this Body24. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Body24. - - - :param description: The description of this Body24. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body24, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body24): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body24): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body25.py b/sdk/python/sdk/zrok/zrok_api/models/body25.py deleted file mode 100644 index c325ac35..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body25.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body25(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'bind_address': 'str', - 'description': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'bind_address': 'bindAddress', - 'description': 'description' - } - - def __init__(self, frontend_token=None, bind_address=None, description=None, _configuration=None): # noqa: E501 - """Body25 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._frontend_token = None - self._bind_address = None - self._description = None - self.discriminator = None - - if frontend_token is not None: - self.frontend_token = frontend_token - if bind_address is not None: - self.bind_address = bind_address - if description is not None: - self.description = description - - @property - def frontend_token(self): - """Gets the frontend_token of this Body25. # noqa: E501 - - - :return: The frontend_token of this Body25. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this Body25. - - - :param frontend_token: The frontend_token of this Body25. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def bind_address(self): - """Gets the bind_address of this Body25. # noqa: E501 - - - :return: The bind_address of this Body25. # noqa: E501 - :rtype: str - """ - return self._bind_address - - @bind_address.setter - def bind_address(self, bind_address): - """Sets the bind_address of this Body25. - - - :param bind_address: The bind_address of this Body25. # noqa: E501 - :type: str - """ - - self._bind_address = bind_address - - @property - def description(self): - """Gets the description of this Body25. # noqa: E501 - - - :return: The description of this Body25. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Body25. - - - :param description: The description of this Body25. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body25, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body25): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body25): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body26.py b/sdk/python/sdk/zrok/zrok_api/models/body26.py deleted file mode 100644 index 05eb4fa1..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body26.py +++ /dev/null @@ -1,201 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body26(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'share_token': 'str', - 'backend_proxy_endpoint': 'str', - 'add_access_grants': 'list[str]', - 'remove_access_grants': 'list[str]' - } - - attribute_map = { - 'share_token': 'shareToken', - 'backend_proxy_endpoint': 'backendProxyEndpoint', - 'add_access_grants': 'addAccessGrants', - 'remove_access_grants': 'removeAccessGrants' - } - - def __init__(self, share_token=None, backend_proxy_endpoint=None, add_access_grants=None, remove_access_grants=None, _configuration=None): # noqa: E501 - """Body26 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._share_token = None - self._backend_proxy_endpoint = None - self._add_access_grants = None - self._remove_access_grants = None - self.discriminator = None - - if share_token is not None: - self.share_token = share_token - if backend_proxy_endpoint is not None: - self.backend_proxy_endpoint = backend_proxy_endpoint - if add_access_grants is not None: - self.add_access_grants = add_access_grants - if remove_access_grants is not None: - self.remove_access_grants = remove_access_grants - - @property - def share_token(self): - """Gets the share_token of this Body26. # noqa: E501 - - - :return: The share_token of this Body26. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this Body26. - - - :param share_token: The share_token of this Body26. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def backend_proxy_endpoint(self): - """Gets the backend_proxy_endpoint of this Body26. # noqa: E501 - - - :return: The backend_proxy_endpoint of this Body26. # noqa: E501 - :rtype: str - """ - return self._backend_proxy_endpoint - - @backend_proxy_endpoint.setter - def backend_proxy_endpoint(self, backend_proxy_endpoint): - """Sets the backend_proxy_endpoint of this Body26. - - - :param backend_proxy_endpoint: The backend_proxy_endpoint of this Body26. # noqa: E501 - :type: str - """ - - self._backend_proxy_endpoint = backend_proxy_endpoint - - @property - def add_access_grants(self): - """Gets the add_access_grants of this Body26. # noqa: E501 - - - :return: The add_access_grants of this Body26. # noqa: E501 - :rtype: list[str] - """ - return self._add_access_grants - - @add_access_grants.setter - def add_access_grants(self, add_access_grants): - """Sets the add_access_grants of this Body26. - - - :param add_access_grants: The add_access_grants of this Body26. # noqa: E501 - :type: list[str] - """ - - self._add_access_grants = add_access_grants - - @property - def remove_access_grants(self): - """Gets the remove_access_grants of this Body26. # noqa: E501 - - - :return: The remove_access_grants of this Body26. # noqa: E501 - :rtype: list[str] - """ - return self._remove_access_grants - - @remove_access_grants.setter - def remove_access_grants(self, remove_access_grants): - """Sets the remove_access_grants of this Body26. - - - :param remove_access_grants: The remove_access_grants of this Body26. # noqa: E501 - :type: list[str] - """ - - self._remove_access_grants = remove_access_grants - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body26, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body26): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body26): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body27.py b/sdk/python/sdk/zrok/zrok_api/models/body27.py deleted file mode 100644 index 4c0ea84f..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body27.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body27(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'env_zid': 'str', - 'share_token': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'env_zid': 'envZId', - 'share_token': 'shareToken' - } - - def __init__(self, frontend_token=None, env_zid=None, share_token=None, _configuration=None): # noqa: E501 - """Body27 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._frontend_token = None - self._env_zid = None - self._share_token = None - self.discriminator = None - - if frontend_token is not None: - self.frontend_token = frontend_token - if env_zid is not None: - self.env_zid = env_zid - if share_token is not None: - self.share_token = share_token - - @property - def frontend_token(self): - """Gets the frontend_token of this Body27. # noqa: E501 - - - :return: The frontend_token of this Body27. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this Body27. - - - :param frontend_token: The frontend_token of this Body27. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def env_zid(self): - """Gets the env_zid of this Body27. # noqa: E501 - - - :return: The env_zid of this Body27. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this Body27. - - - :param env_zid: The env_zid of this Body27. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def share_token(self): - """Gets the share_token of this Body27. # noqa: E501 - - - :return: The share_token of this Body27. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this Body27. - - - :param share_token: The share_token of this Body27. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body27, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body27): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body27): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body28.py b/sdk/python/sdk/zrok/zrok_api/models/body28.py deleted file mode 100644 index 567c40f0..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body28.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body28(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'env_zid': 'str', - 'share_token': 'str', - 'reserved': 'bool' - } - - attribute_map = { - 'env_zid': 'envZId', - 'share_token': 'shareToken', - 'reserved': 'reserved' - } - - def __init__(self, env_zid=None, share_token=None, reserved=None, _configuration=None): # noqa: E501 - """Body28 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._env_zid = None - self._share_token = None - self._reserved = None - self.discriminator = None - - if env_zid is not None: - self.env_zid = env_zid - if share_token is not None: - self.share_token = share_token - if reserved is not None: - self.reserved = reserved - - @property - def env_zid(self): - """Gets the env_zid of this Body28. # noqa: E501 - - - :return: The env_zid of this Body28. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this Body28. - - - :param env_zid: The env_zid of this Body28. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def share_token(self): - """Gets the share_token of this Body28. # noqa: E501 - - - :return: The share_token of this Body28. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this Body28. - - - :param share_token: The share_token of this Body28. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def reserved(self): - """Gets the reserved of this Body28. # noqa: E501 - - - :return: The reserved of this Body28. # noqa: E501 - :rtype: bool - """ - return self._reserved - - @reserved.setter - def reserved(self, reserved): - """Sets the reserved of this Body28. - - - :param reserved: The reserved of this Body28. # noqa: E501 - :type: bool - """ - - self._reserved = reserved - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body28, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body28): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body28): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body3.py b/sdk/python/sdk/zrok/zrok_api/models/body3.py deleted file mode 100644 index f878a09a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body3.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body3(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email_address': 'str' - } - - attribute_map = { - 'email_address': 'emailAddress' - } - - def __init__(self, email_address=None, _configuration=None): # noqa: E501 - """Body3 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._email_address = None - self.discriminator = None - - if email_address is not None: - self.email_address = email_address - - @property - def email_address(self): - """Gets the email_address of this Body3. # noqa: E501 - - - :return: The email_address of this Body3. # noqa: E501 - :rtype: str - """ - return self._email_address - - @email_address.setter - def email_address(self, email_address): - """Sets the email_address of this Body3. - - - :param email_address: The email_address of this Body3. # noqa: E501 - :type: str - """ - - self._email_address = email_address - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body3, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body3): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body3): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body4.py b/sdk/python/sdk/zrok/zrok_api/models/body4.py deleted file mode 100644 index 3e9edac8..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body4.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body4(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'register_token': 'str', - 'password': 'str' - } - - attribute_map = { - 'register_token': 'registerToken', - 'password': 'password' - } - - def __init__(self, register_token=None, password=None, _configuration=None): # noqa: E501 - """Body4 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._register_token = None - self._password = None - self.discriminator = None - - if register_token is not None: - self.register_token = register_token - if password is not None: - self.password = password - - @property - def register_token(self): - """Gets the register_token of this Body4. # noqa: E501 - - - :return: The register_token of this Body4. # noqa: E501 - :rtype: str - """ - return self._register_token - - @register_token.setter - def register_token(self, register_token): - """Sets the register_token of this Body4. - - - :param register_token: The register_token of this Body4. # noqa: E501 - :type: str - """ - - self._register_token = register_token - - @property - def password(self): - """Gets the password of this Body4. # noqa: E501 - - - :return: The password of this Body4. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this Body4. - - - :param password: The password of this Body4. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body4, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body4): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body4): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body5.py b/sdk/python/sdk/zrok/zrok_api/models/body5.py deleted file mode 100644 index 49b80ca3..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body5.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body5(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'reset_token': 'str', - 'password': 'str' - } - - attribute_map = { - 'reset_token': 'resetToken', - 'password': 'password' - } - - def __init__(self, reset_token=None, password=None, _configuration=None): # noqa: E501 - """Body5 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._reset_token = None - self._password = None - self.discriminator = None - - if reset_token is not None: - self.reset_token = reset_token - if password is not None: - self.password = password - - @property - def reset_token(self): - """Gets the reset_token of this Body5. # noqa: E501 - - - :return: The reset_token of this Body5. # noqa: E501 - :rtype: str - """ - return self._reset_token - - @reset_token.setter - def reset_token(self, reset_token): - """Sets the reset_token of this Body5. - - - :param reset_token: The reset_token of this Body5. # noqa: E501 - :type: str - """ - - self._reset_token = reset_token - - @property - def password(self): - """Gets the password of this Body5. # noqa: E501 - - - :return: The password of this Body5. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this Body5. - - - :param password: The password of this Body5. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body5, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body5): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body5): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body6.py b/sdk/python/sdk/zrok/zrok_api/models/body6.py deleted file mode 100644 index bfbfe86a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body6.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body6(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email_address': 'str' - } - - attribute_map = { - 'email_address': 'emailAddress' - } - - def __init__(self, email_address=None, _configuration=None): # noqa: E501 - """Body6 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._email_address = None - self.discriminator = None - - if email_address is not None: - self.email_address = email_address - - @property - def email_address(self): - """Gets the email_address of this Body6. # noqa: E501 - - - :return: The email_address of this Body6. # noqa: E501 - :rtype: str - """ - return self._email_address - - @email_address.setter - def email_address(self, email_address): - """Sets the email_address of this Body6. - - - :param email_address: The email_address of this Body6. # noqa: E501 - :type: str - """ - - self._email_address = email_address - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body6, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body6): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body6): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body7.py b/sdk/python/sdk/zrok/zrok_api/models/body7.py deleted file mode 100644 index 27643139..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body7.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body7(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'register_token': 'str' - } - - attribute_map = { - 'register_token': 'registerToken' - } - - def __init__(self, register_token=None, _configuration=None): # noqa: E501 - """Body7 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._register_token = None - self.discriminator = None - - if register_token is not None: - self.register_token = register_token - - @property - def register_token(self): - """Gets the register_token of this Body7. # noqa: E501 - - - :return: The register_token of this Body7. # noqa: E501 - :rtype: str - """ - return self._register_token - - @register_token.setter - def register_token(self, register_token): - """Sets the register_token of this Body7. - - - :param register_token: The register_token of this Body7. # noqa: E501 - :type: str - """ - - self._register_token = register_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body7, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body7): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body7): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body8.py b/sdk/python/sdk/zrok/zrok_api/models/body8.py deleted file mode 100644 index e107a0d9..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body8.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body8(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'password': 'str' - } - - attribute_map = { - 'email': 'email', - 'password': 'password' - } - - def __init__(self, email=None, password=None, _configuration=None): # noqa: E501 - """Body8 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._email = None - self._password = None - self.discriminator = None - - if email is not None: - self.email = email - if password is not None: - self.password = password - - @property - def email(self): - """Gets the email of this Body8. # noqa: E501 - - - :return: The email of this Body8. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this Body8. - - - :param email: The email of this Body8. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def password(self): - """Gets the password of this Body8. # noqa: E501 - - - :return: The password of this Body8. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this Body8. - - - :param password: The password of this Body8. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body8, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body8): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body8): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/body9.py b/sdk/python/sdk/zrok/zrok_api/models/body9.py deleted file mode 100644 index 9da87bc7..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/body9.py +++ /dev/null @@ -1,208 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - -from zrok_api.configuration import Configuration - - -class Body9(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'z_id': 'str', - 'url_template': 'str', - 'public_name': 'str', - 'permission_mode': 'str' - } - - attribute_map = { - 'z_id': 'zId', - 'url_template': 'url_template', - 'public_name': 'public_name', - 'permission_mode': 'permissionMode' - } - - def __init__(self, z_id=None, url_template=None, public_name=None, permission_mode=None, _configuration=None): # noqa: E501 - """Body9 - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._z_id = None - self._url_template = None - self._public_name = None - self._permission_mode = None - self.discriminator = None - - if z_id is not None: - self.z_id = z_id - if url_template is not None: - self.url_template = url_template - if public_name is not None: - self.public_name = public_name - if permission_mode is not None: - self.permission_mode = permission_mode - - @property - def z_id(self): - """Gets the z_id of this Body9. # noqa: E501 - - - :return: The z_id of this Body9. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this Body9. - - - :param z_id: The z_id of this Body9. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def url_template(self): - """Gets the url_template of this Body9. # noqa: E501 - - - :return: The url_template of this Body9. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this Body9. - - - :param url_template: The url_template of this Body9. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - @property - def public_name(self): - """Gets the public_name of this Body9. # noqa: E501 - - - :return: The public_name of this Body9. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this Body9. - - - :param public_name: The public_name of this Body9. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def permission_mode(self): - """Gets the permission_mode of this Body9. # noqa: E501 - - - :return: The permission_mode of this Body9. # noqa: E501 - :rtype: str - """ - return self._permission_mode - - @permission_mode.setter - def permission_mode(self, permission_mode): - """Sets the permission_mode of this Body9. - - - :param permission_mode: The permission_mode of this Body9. # noqa: E501 - :type: str - """ - allowed_values = ["open", "closed"] # noqa: E501 - if (self._configuration.client_side_validation and - permission_mode not in allowed_values): - raise ValueError( - "Invalid value for `permission_mode` ({0}), must be one of {1}" # noqa: E501 - .format(permission_mode, allowed_values) - ) - - self._permission_mode = permission_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Body9, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body9): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, Body9): - return True - - return self.to_dict() != other.to_dict() diff --git a/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py b/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py deleted file mode 100644 index fe3f4862..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ChangePasswordRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'old_password': 'str', - 'new_password': 'str' - } - - attribute_map = { - 'email': 'email', - 'old_password': 'oldPassword', - 'new_password': 'newPassword' - } - - def __init__(self, email=None, old_password=None, new_password=None): # noqa: E501 - """ChangePasswordRequest - a model defined in Swagger""" # noqa: E501 - self._email = None - self._old_password = None - self._new_password = None - self.discriminator = None - if email is not None: - self.email = email - if old_password is not None: - self.old_password = old_password - if new_password is not None: - self.new_password = new_password - - @property - def email(self): - """Gets the email of this ChangePasswordRequest. # noqa: E501 - - - :return: The email of this ChangePasswordRequest. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this ChangePasswordRequest. - - - :param email: The email of this ChangePasswordRequest. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def old_password(self): - """Gets the old_password of this ChangePasswordRequest. # noqa: E501 - - - :return: The old_password of this ChangePasswordRequest. # noqa: E501 - :rtype: str - """ - return self._old_password - - @old_password.setter - def old_password(self, old_password): - """Sets the old_password of this ChangePasswordRequest. - - - :param old_password: The old_password of this ChangePasswordRequest. # noqa: E501 - :type: str - """ - - self._old_password = old_password - - @property - def new_password(self): - """Gets the new_password of this ChangePasswordRequest. # noqa: E501 - - - :return: The new_password of this ChangePasswordRequest. # noqa: E501 - :rtype: str - """ - return self._new_password - - @new_password.setter - def new_password(self, new_password): - """Sets the new_password of this ChangePasswordRequest. - - - :param new_password: The new_password of this ChangePasswordRequest. # noqa: E501 - :type: str - """ - - self._new_password = new_password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ChangePasswordRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ChangePasswordRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py b/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py deleted file mode 100644 index f6a0cf01..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreateFrontendRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'z_id': 'str', - 'url_template': 'str', - 'public_name': 'str', - 'permission_mode': 'str' - } - - attribute_map = { - 'z_id': 'zId', - 'url_template': 'url_template', - 'public_name': 'public_name', - 'permission_mode': 'permissionMode' - } - - def __init__(self, z_id=None, url_template=None, public_name=None, permission_mode=None): # noqa: E501 - """CreateFrontendRequest - a model defined in Swagger""" # noqa: E501 - self._z_id = None - self._url_template = None - self._public_name = None - self._permission_mode = None - self.discriminator = None - if z_id is not None: - self.z_id = z_id - if url_template is not None: - self.url_template = url_template - if public_name is not None: - self.public_name = public_name - if permission_mode is not None: - self.permission_mode = permission_mode - - @property - def z_id(self): - """Gets the z_id of this CreateFrontendRequest. # noqa: E501 - - - :return: The z_id of this CreateFrontendRequest. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this CreateFrontendRequest. - - - :param z_id: The z_id of this CreateFrontendRequest. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def url_template(self): - """Gets the url_template of this CreateFrontendRequest. # noqa: E501 - - - :return: The url_template of this CreateFrontendRequest. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this CreateFrontendRequest. - - - :param url_template: The url_template of this CreateFrontendRequest. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - @property - def public_name(self): - """Gets the public_name of this CreateFrontendRequest. # noqa: E501 - - - :return: The public_name of this CreateFrontendRequest. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this CreateFrontendRequest. - - - :param public_name: The public_name of this CreateFrontendRequest. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def permission_mode(self): - """Gets the permission_mode of this CreateFrontendRequest. # noqa: E501 - - - :return: The permission_mode of this CreateFrontendRequest. # noqa: E501 - :rtype: str - """ - return self._permission_mode - - @permission_mode.setter - def permission_mode(self, permission_mode): - """Sets the permission_mode of this CreateFrontendRequest. - - - :param permission_mode: The permission_mode of this CreateFrontendRequest. # noqa: E501 - :type: str - """ - allowed_values = ["open", "closed"] # noqa: E501 - if permission_mode not in allowed_values: - raise ValueError( - "Invalid value for `permission_mode` ({0}), must be one of {1}" # noqa: E501 - .format(permission_mode, allowed_values) - ) - - self._permission_mode = permission_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CreateFrontendRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreateFrontendRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_frontend_response.py b/sdk/python/sdk/zrok/zrok_api/models/create_frontend_response.py deleted file mode 100644 index d93e99ed..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/create_frontend_response.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreateFrontendResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'token': 'str' - } - - attribute_map = { - 'token': 'token' - } - - def __init__(self, token=None): # noqa: E501 - """CreateFrontendResponse - a model defined in Swagger""" # noqa: E501 - self._token = None - self.discriminator = None - if token is not None: - self.token = token - - @property - def token(self): - """Gets the token of this CreateFrontendResponse. # noqa: E501 - - - :return: The token of this CreateFrontendResponse. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this CreateFrontendResponse. - - - :param token: The token of this CreateFrontendResponse. # noqa: E501 - :type: str - """ - - self._token = token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CreateFrontendResponse, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreateFrontendResponse): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/delete_frontend_request.py b/sdk/python/sdk/zrok/zrok_api/models/delete_frontend_request.py deleted file mode 100644 index c9b92bad..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/delete_frontend_request.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DeleteFrontendRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken' - } - - def __init__(self, frontend_token=None): # noqa: E501 - """DeleteFrontendRequest - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - - @property - def frontend_token(self): - """Gets the frontend_token of this DeleteFrontendRequest. # noqa: E501 - - - :return: The frontend_token of this DeleteFrontendRequest. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this DeleteFrontendRequest. - - - :param frontend_token: The frontend_token of this DeleteFrontendRequest. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(DeleteFrontendRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DeleteFrontendRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/disable_request.py b/sdk/python/sdk/zrok/zrok_api/models/disable_request.py deleted file mode 100644 index c0450256..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/disable_request.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DisableRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identity': 'str' - } - - attribute_map = { - 'identity': 'identity' - } - - def __init__(self, identity=None): # noqa: E501 - """DisableRequest - a model defined in Swagger""" # noqa: E501 - self._identity = None - self.discriminator = None - if identity is not None: - self.identity = identity - - @property - def identity(self): - """Gets the identity of this DisableRequest. # noqa: E501 - - - :return: The identity of this DisableRequest. # noqa: E501 - :rtype: str - """ - return self._identity - - @identity.setter - def identity(self, identity): - """Sets the identity of this DisableRequest. - - - :param identity: The identity of this DisableRequest. # noqa: E501 - :type: str - """ - - self._identity = identity - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(DisableRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DisableRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/enable_request.py b/sdk/python/sdk/zrok/zrok_api/models/enable_request.py deleted file mode 100644 index 6d35968f..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/enable_request.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class EnableRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'description': 'str', - 'host': 'str' - } - - attribute_map = { - 'description': 'description', - 'host': 'host' - } - - def __init__(self, description=None, host=None): # noqa: E501 - """EnableRequest - a model defined in Swagger""" # noqa: E501 - self._description = None - self._host = None - self.discriminator = None - if description is not None: - self.description = description - if host is not None: - self.host = host - - @property - def description(self): - """Gets the description of this EnableRequest. # noqa: E501 - - - :return: The description of this EnableRequest. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this EnableRequest. - - - :param description: The description of this EnableRequest. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def host(self): - """Gets the host of this EnableRequest. # noqa: E501 - - - :return: The host of this EnableRequest. # noqa: E501 - :rtype: str - """ - return self._host - - @host.setter - def host(self, host): - """Sets the host of this EnableRequest. - - - :param host: The host of this EnableRequest. # noqa: E501 - :type: str - """ - - self._host = host - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(EnableRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EnableRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/enable_response.py b/sdk/python/sdk/zrok/zrok_api/models/enable_response.py deleted file mode 100644 index 66c8af2f..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/enable_response.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class EnableResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identity': 'str', - 'cfg': 'str' - } - - attribute_map = { - 'identity': 'identity', - 'cfg': 'cfg' - } - - def __init__(self, identity=None, cfg=None): # noqa: E501 - """EnableResponse - a model defined in Swagger""" # noqa: E501 - self._identity = None - self._cfg = None - self.discriminator = None - if identity is not None: - self.identity = identity - if cfg is not None: - self.cfg = cfg - - @property - def identity(self): - """Gets the identity of this EnableResponse. # noqa: E501 - - - :return: The identity of this EnableResponse. # noqa: E501 - :rtype: str - """ - return self._identity - - @identity.setter - def identity(self, identity): - """Sets the identity of this EnableResponse. - - - :param identity: The identity of this EnableResponse. # noqa: E501 - :type: str - """ - - self._identity = identity - - @property - def cfg(self): - """Gets the cfg of this EnableResponse. # noqa: E501 - - - :return: The cfg of this EnableResponse. # noqa: E501 - :rtype: str - """ - return self._cfg - - @cfg.setter - def cfg(self, cfg): - """Sets the cfg of this EnableResponse. - - - :param cfg: The cfg of this EnableResponse. # noqa: E501 - :type: str - """ - - self._cfg = cfg - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(EnableResponse, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EnableResponse): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2001_members.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2001_members.py deleted file mode 100644 index a5fbc3e6..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2001_members.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2001Members(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'admin': 'bool' - } - - attribute_map = { - 'email': 'email', - 'admin': 'admin' - } - - def __init__(self, email=None, admin=None): # noqa: E501 - """InlineResponse2001Members - a model defined in Swagger""" # noqa: E501 - self._email = None - self._admin = None - self.discriminator = None - if email is not None: - self.email = email - if admin is not None: - self.admin = admin - - @property - def email(self): - """Gets the email of this InlineResponse2001Members. # noqa: E501 - - - :return: The email of this InlineResponse2001Members. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this InlineResponse2001Members. - - - :param email: The email of this InlineResponse2001Members. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def admin(self): - """Gets the admin of this InlineResponse2001Members. # noqa: E501 - - - :return: The admin of this InlineResponse2001Members. # noqa: E501 - :rtype: bool - """ - return self._admin - - @admin.setter - def admin(self, admin): - """Sets the admin of this InlineResponse2001Members. - - - :param admin: The admin of this InlineResponse2001Members. # noqa: E501 - :type: bool - """ - - self._admin = admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2001Members, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2001Members): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2002_organizations.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2002_organizations.py deleted file mode 100644 index b80da9bb..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2002_organizations.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2002Organizations(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'token': 'str', - 'description': 'str' - } - - attribute_map = { - 'token': 'token', - 'description': 'description' - } - - def __init__(self, token=None, description=None): # noqa: E501 - """InlineResponse2002Organizations - a model defined in Swagger""" # noqa: E501 - self._token = None - self._description = None - self.discriminator = None - if token is not None: - self.token = token - if description is not None: - self.description = description - - @property - def token(self): - """Gets the token of this InlineResponse2002Organizations. # noqa: E501 - - - :return: The token of this InlineResponse2002Organizations. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this InlineResponse2002Organizations. - - - :param token: The token of this InlineResponse2002Organizations. # noqa: E501 - :type: str - """ - - self._token = token - - @property - def description(self): - """Gets the description of this InlineResponse2002Organizations. # noqa: E501 - - - :return: The description of this InlineResponse2002Organizations. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this InlineResponse2002Organizations. - - - :param description: The description of this InlineResponse2002Organizations. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2002Organizations, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2002Organizations): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_memberships.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_memberships.py deleted file mode 100644 index e7d293af..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_memberships.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2003Memberships(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'token': 'str', - 'description': 'str', - 'admin': 'bool' - } - - attribute_map = { - 'token': 'token', - 'description': 'description', - 'admin': 'admin' - } - - def __init__(self, token=None, description=None, admin=None): # noqa: E501 - """InlineResponse2003Memberships - a model defined in Swagger""" # noqa: E501 - self._token = None - self._description = None - self._admin = None - self.discriminator = None - if token is not None: - self.token = token - if description is not None: - self.description = description - if admin is not None: - self.admin = admin - - @property - def token(self): - """Gets the token of this InlineResponse2003Memberships. # noqa: E501 - - - :return: The token of this InlineResponse2003Memberships. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this InlineResponse2003Memberships. - - - :param token: The token of this InlineResponse2003Memberships. # noqa: E501 - :type: str - """ - - self._token = token - - @property - def description(self): - """Gets the description of this InlineResponse2003Memberships. # noqa: E501 - - - :return: The description of this InlineResponse2003Memberships. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this InlineResponse2003Memberships. - - - :param description: The description of this InlineResponse2003Memberships. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def admin(self): - """Gets the admin of this InlineResponse2003Memberships. # noqa: E501 - - - :return: The admin of this InlineResponse2003Memberships. # noqa: E501 - :rtype: bool - """ - return self._admin - - @admin.setter - def admin(self, admin): - """Sets the admin of this InlineResponse2003Memberships. - - - :param admin: The admin of this InlineResponse2003Memberships. # noqa: E501 - :type: bool - """ - - self._admin = admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2003Memberships, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2003Memberships): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_request.py b/sdk/python/sdk/zrok/zrok_api/models/invite_request.py deleted file mode 100644 index cd4a2d92..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/invite_request.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InviteRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'token': 'str' - } - - attribute_map = { - 'email': 'email', - 'token': 'token' - } - - def __init__(self, email=None, token=None): # noqa: E501 - """InviteRequest - a model defined in Swagger""" # noqa: E501 - self._email = None - self._token = None - self.discriminator = None - if email is not None: - self.email = email - if token is not None: - self.token = token - - @property - def email(self): - """Gets the email of this InviteRequest. # noqa: E501 - - - :return: The email of this InviteRequest. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this InviteRequest. - - - :param email: The email of this InviteRequest. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def token(self): - """Gets the token of this InviteRequest. # noqa: E501 - - - :return: The token of this InviteRequest. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this InviteRequest. - - - :param token: The token of this InviteRequest. # noqa: E501 - :type: str - """ - - self._token = token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InviteRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InviteRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py b/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py deleted file mode 100644 index 6cc198d9..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InviteTokenGenerateRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'tokens': 'list[str]' - } - - attribute_map = { - 'tokens': 'tokens' - } - - def __init__(self, tokens=None): # noqa: E501 - """InviteTokenGenerateRequest - a model defined in Swagger""" # noqa: E501 - self._tokens = None - self.discriminator = None - if tokens is not None: - self.tokens = tokens - - @property - def tokens(self): - """Gets the tokens of this InviteTokenGenerateRequest. # noqa: E501 - - - :return: The tokens of this InviteTokenGenerateRequest. # noqa: E501 - :rtype: list[str] - """ - return self._tokens - - @tokens.setter - def tokens(self, tokens): - """Sets the tokens of this InviteTokenGenerateRequest. - - - :param tokens: The tokens of this InviteTokenGenerateRequest. # noqa: E501 - :type: list[str] - """ - - self._tokens = tokens - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InviteTokenGenerateRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InviteTokenGenerateRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/login_request.py b/sdk/python/sdk/zrok/zrok_api/models/login_request.py deleted file mode 100644 index c91bcc2b..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/login_request.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class LoginRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'password': 'str' - } - - attribute_map = { - 'email': 'email', - 'password': 'password' - } - - def __init__(self, email=None, password=None): # noqa: E501 - """LoginRequest - a model defined in Swagger""" # noqa: E501 - self._email = None - self._password = None - self.discriminator = None - if email is not None: - self.email = email - if password is not None: - self.password = password - - @property - def email(self): - """Gets the email of this LoginRequest. # noqa: E501 - - - :return: The email of this LoginRequest. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this LoginRequest. - - - :param email: The email of this LoginRequest. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def password(self): - """Gets the password of this LoginRequest. # noqa: E501 - - - :return: The password of this LoginRequest. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this LoginRequest. - - - :param password: The password of this LoginRequest. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(LoginRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LoginRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/login_response.py b/sdk/python/sdk/zrok/zrok_api/models/login_response.py deleted file mode 100644 index 65178a79..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/login_response.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class LoginResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """LoginResponse - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(LoginResponse, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LoginResponse): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_members_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_members_body.py deleted file mode 100644 index 354d3f46..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_members_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationMembersBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'token': 'str' - } - - attribute_map = { - 'token': 'token' - } - - def __init__(self, token=None): # noqa: E501 - """OrganizationMembersBody - a model defined in Swagger""" # noqa: E501 - self._token = None - self.discriminator = None - if token is not None: - self.token = token - - @property - def token(self): - """Gets the token of this OrganizationMembersBody. # noqa: E501 - - - :return: The token of this OrganizationMembersBody. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this OrganizationMembersBody. - - - :param token: The token of this OrganizationMembersBody. # noqa: E501 - :type: str - """ - - self._token = token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationMembersBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationMembersBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organizationremove_organizations.py b/sdk/python/sdk/zrok/zrok_api/models/organizationremove_organizations.py deleted file mode 100644 index 017ed6bb..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organizationremove_organizations.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationremoveOrganizations(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'token': 'str', - 'email': 'str' - } - - attribute_map = { - 'token': 'token', - 'email': 'email' - } - - def __init__(self, token=None, email=None): # noqa: E501 - """OrganizationremoveOrganizations - a model defined in Swagger""" # noqa: E501 - self._token = None - self._email = None - self.discriminator = None - if token is not None: - self.token = token - if email is not None: - self.email = email - - @property - def token(self): - """Gets the token of this OrganizationremoveOrganizations. # noqa: E501 - - - :return: The token of this OrganizationremoveOrganizations. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this OrganizationremoveOrganizations. - - - :param token: The token of this OrganizationremoveOrganizations. # noqa: E501 - :type: str - """ - - self._token = token - - @property - def email(self): - """Gets the email of this OrganizationremoveOrganizations. # noqa: E501 - - - :return: The email of this OrganizationremoveOrganizations. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this OrganizationremoveOrganizations. - - - :param email: The email of this OrganizationremoveOrganizations. # noqa: E501 - :type: str - """ - - self._email = email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationremoveOrganizations, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationremoveOrganizations): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/password_requirements.py b/sdk/python/sdk/zrok/zrok_api/models/password_requirements.py deleted file mode 100644 index 8589a8b8..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/password_requirements.py +++ /dev/null @@ -1,214 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PasswordRequirements(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'length': 'int', - 'require_capital': 'bool', - 'require_numeric': 'bool', - 'require_special': 'bool', - 'valid_special_characters': 'str' - } - - attribute_map = { - 'length': 'length', - 'require_capital': 'requireCapital', - 'require_numeric': 'requireNumeric', - 'require_special': 'requireSpecial', - 'valid_special_characters': 'validSpecialCharacters' - } - - def __init__(self, length=None, require_capital=None, require_numeric=None, require_special=None, valid_special_characters=None): # noqa: E501 - """PasswordRequirements - a model defined in Swagger""" # noqa: E501 - self._length = None - self._require_capital = None - self._require_numeric = None - self._require_special = None - self._valid_special_characters = None - self.discriminator = None - if length is not None: - self.length = length - if require_capital is not None: - self.require_capital = require_capital - if require_numeric is not None: - self.require_numeric = require_numeric - if require_special is not None: - self.require_special = require_special - if valid_special_characters is not None: - self.valid_special_characters = valid_special_characters - - @property - def length(self): - """Gets the length of this PasswordRequirements. # noqa: E501 - - - :return: The length of this PasswordRequirements. # noqa: E501 - :rtype: int - """ - return self._length - - @length.setter - def length(self, length): - """Sets the length of this PasswordRequirements. - - - :param length: The length of this PasswordRequirements. # noqa: E501 - :type: int - """ - - self._length = length - - @property - def require_capital(self): - """Gets the require_capital of this PasswordRequirements. # noqa: E501 - - - :return: The require_capital of this PasswordRequirements. # noqa: E501 - :rtype: bool - """ - return self._require_capital - - @require_capital.setter - def require_capital(self, require_capital): - """Sets the require_capital of this PasswordRequirements. - - - :param require_capital: The require_capital of this PasswordRequirements. # noqa: E501 - :type: bool - """ - - self._require_capital = require_capital - - @property - def require_numeric(self): - """Gets the require_numeric of this PasswordRequirements. # noqa: E501 - - - :return: The require_numeric of this PasswordRequirements. # noqa: E501 - :rtype: bool - """ - return self._require_numeric - - @require_numeric.setter - def require_numeric(self, require_numeric): - """Sets the require_numeric of this PasswordRequirements. - - - :param require_numeric: The require_numeric of this PasswordRequirements. # noqa: E501 - :type: bool - """ - - self._require_numeric = require_numeric - - @property - def require_special(self): - """Gets the require_special of this PasswordRequirements. # noqa: E501 - - - :return: The require_special of this PasswordRequirements. # noqa: E501 - :rtype: bool - """ - return self._require_special - - @require_special.setter - def require_special(self, require_special): - """Sets the require_special of this PasswordRequirements. - - - :param require_special: The require_special of this PasswordRequirements. # noqa: E501 - :type: bool - """ - - self._require_special = require_special - - @property - def valid_special_characters(self): - """Gets the valid_special_characters of this PasswordRequirements. # noqa: E501 - - - :return: The valid_special_characters of this PasswordRequirements. # noqa: E501 - :rtype: str - """ - return self._valid_special_characters - - @valid_special_characters.setter - def valid_special_characters(self, valid_special_characters): - """Sets the valid_special_characters of this PasswordRequirements. - - - :param valid_special_characters: The valid_special_characters of this PasswordRequirements. # noqa: E501 - :type: str - """ - - self._valid_special_characters = valid_special_characters - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(PasswordRequirements, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PasswordRequirements): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/public_frontend.py b/sdk/python/sdk/zrok/zrok_api/models/public_frontend.py deleted file mode 100644 index d2873403..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/public_frontend.py +++ /dev/null @@ -1,240 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PublicFrontend(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'token': 'str', - 'z_id': 'str', - 'url_template': 'str', - 'public_name': 'str', - 'created_at': 'int', - 'updated_at': 'int' - } - - attribute_map = { - 'token': 'token', - 'z_id': 'zId', - 'url_template': 'urlTemplate', - 'public_name': 'publicName', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, token=None, z_id=None, url_template=None, public_name=None, created_at=None, updated_at=None): # noqa: E501 - """PublicFrontend - a model defined in Swagger""" # noqa: E501 - self._token = None - self._z_id = None - self._url_template = None - self._public_name = None - self._created_at = None - self._updated_at = None - self.discriminator = None - if token is not None: - self.token = token - if z_id is not None: - self.z_id = z_id - if url_template is not None: - self.url_template = url_template - if public_name is not None: - self.public_name = public_name - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def token(self): - """Gets the token of this PublicFrontend. # noqa: E501 - - - :return: The token of this PublicFrontend. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this PublicFrontend. - - - :param token: The token of this PublicFrontend. # noqa: E501 - :type: str - """ - - self._token = token - - @property - def z_id(self): - """Gets the z_id of this PublicFrontend. # noqa: E501 - - - :return: The z_id of this PublicFrontend. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this PublicFrontend. - - - :param z_id: The z_id of this PublicFrontend. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def url_template(self): - """Gets the url_template of this PublicFrontend. # noqa: E501 - - - :return: The url_template of this PublicFrontend. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this PublicFrontend. - - - :param url_template: The url_template of this PublicFrontend. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - @property - def public_name(self): - """Gets the public_name of this PublicFrontend. # noqa: E501 - - - :return: The public_name of this PublicFrontend. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this PublicFrontend. - - - :param public_name: The public_name of this PublicFrontend. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def created_at(self): - """Gets the created_at of this PublicFrontend. # noqa: E501 - - - :return: The created_at of this PublicFrontend. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this PublicFrontend. - - - :param created_at: The created_at of this PublicFrontend. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this PublicFrontend. # noqa: E501 - - - :return: The updated_at of this PublicFrontend. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this PublicFrontend. - - - :param updated_at: The updated_at of this PublicFrontend. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(PublicFrontend, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PublicFrontend): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/public_frontend_list.py b/sdk/python/sdk/zrok/zrok_api/models/public_frontend_list.py deleted file mode 100644 index abbe9bd3..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/public_frontend_list.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PublicFrontendList(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """PublicFrontendList - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(PublicFrontendList, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PublicFrontendList): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/regenerate_token_body.py b/sdk/python/sdk/zrok/zrok_api/models/regenerate_token_body.py deleted file mode 100644 index 0b1e532c..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/regenerate_token_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RegenerateTokenBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email_address': 'str' - } - - attribute_map = { - 'email_address': 'emailAddress' - } - - def __init__(self, email_address=None): # noqa: E501 - """RegenerateTokenBody - a model defined in Swagger""" # noqa: E501 - self._email_address = None - self.discriminator = None - if email_address is not None: - self.email_address = email_address - - @property - def email_address(self): - """Gets the email_address of this RegenerateTokenBody. # noqa: E501 - - - :return: The email_address of this RegenerateTokenBody. # noqa: E501 - :rtype: str - """ - return self._email_address - - @email_address.setter - def email_address(self, email_address): - """Sets the email_address of this RegenerateTokenBody. - - - :param email_address: The email_address of this RegenerateTokenBody. # noqa: E501 - :type: str - """ - - self._email_address = email_address - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(RegenerateTokenBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RegenerateTokenBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/register_request.py b/sdk/python/sdk/zrok/zrok_api/models/register_request.py deleted file mode 100644 index cfb274a8..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/register_request.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RegisterRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'token': 'str', - 'password': 'str' - } - - attribute_map = { - 'token': 'token', - 'password': 'password' - } - - def __init__(self, token=None, password=None): # noqa: E501 - """RegisterRequest - a model defined in Swagger""" # noqa: E501 - self._token = None - self._password = None - self.discriminator = None - if token is not None: - self.token = token - if password is not None: - self.password = password - - @property - def token(self): - """Gets the token of this RegisterRequest. # noqa: E501 - - - :return: The token of this RegisterRequest. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this RegisterRequest. - - - :param token: The token of this RegisterRequest. # noqa: E501 - :type: str - """ - - self._token = token - - @property - def password(self): - """Gets the password of this RegisterRequest. # noqa: E501 - - - :return: The password of this RegisterRequest. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this RegisterRequest. - - - :param password: The password of this RegisterRequest. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(RegisterRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RegisterRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/register_response.py b/sdk/python/sdk/zrok/zrok_api/models/register_response.py deleted file mode 100644 index a0b7ac03..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/register_response.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RegisterResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'token': 'str' - } - - attribute_map = { - 'token': 'token' - } - - def __init__(self, token=None): # noqa: E501 - """RegisterResponse - a model defined in Swagger""" # noqa: E501 - self._token = None - self.discriminator = None - if token is not None: - self.token = token - - @property - def token(self): - """Gets the token of this RegisterResponse. # noqa: E501 - - - :return: The token of this RegisterResponse. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this RegisterResponse. - - - :param token: The token of this RegisterResponse. # noqa: E501 - :type: str - """ - - self._token = token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(RegisterResponse, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RegisterResponse): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py deleted file mode 100644 index cf52cc88..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ResetPasswordRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'token': 'str', - 'password': 'str' - } - - attribute_map = { - 'token': 'token', - 'password': 'password' - } - - def __init__(self, token=None, password=None): # noqa: E501 - """ResetPasswordRequest - a model defined in Swagger""" # noqa: E501 - self._token = None - self._password = None - self.discriminator = None - if token is not None: - self.token = token - if password is not None: - self.password = password - - @property - def token(self): - """Gets the token of this ResetPasswordRequest. # noqa: E501 - - - :return: The token of this ResetPasswordRequest. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this ResetPasswordRequest. - - - :param token: The token of this ResetPasswordRequest. # noqa: E501 - :type: str - """ - - self._token = token - - @property - def password(self): - """Gets the password of this ResetPasswordRequest. # noqa: E501 - - - :return: The password of this ResetPasswordRequest. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this ResetPasswordRequest. - - - :param password: The password of this ResetPasswordRequest. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ResetPasswordRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResetPasswordRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py b/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py deleted file mode 100644 index 4d67f81e..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnaccessRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'env_zid': 'str', - 'shr_token': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'env_zid': 'envZId', - 'shr_token': 'shareToken' - } - - def __init__(self, frontend_token=None, env_zid=None, shr_token=None): # noqa: E501 - """UnaccessRequest - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._env_zid = None - self._shr_token = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if env_zid is not None: - self.env_zid = env_zid - if shr_token is not None: - self.shr_token = shr_token - - @property - def frontend_token(self): - """Gets the frontend_token of this UnaccessRequest. # noqa: E501 - - - :return: The frontend_token of this UnaccessRequest. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this UnaccessRequest. - - - :param frontend_token: The frontend_token of this UnaccessRequest. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def env_zid(self): - """Gets the env_zid of this UnaccessRequest. # noqa: E501 - - - :return: The env_zid of this UnaccessRequest. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this UnaccessRequest. - - - :param env_zid: The env_zid of this UnaccessRequest. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def shr_token(self): - """Gets the shr_token of this UnaccessRequest. # noqa: E501 - - - :return: The shr_token of this UnaccessRequest. # noqa: E501 - :rtype: str - """ - return self._shr_token - - @shr_token.setter - def shr_token(self, shr_token): - """Sets the shr_token of this UnaccessRequest. - - - :param shr_token: The shr_token of this UnaccessRequest. # noqa: E501 - :type: str - """ - - self._shr_token = shr_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UnaccessRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnaccessRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py b/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py deleted file mode 100644 index def07585..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnshareRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'env_zid': 'str', - 'shr_token': 'str', - 'reserved': 'bool' - } - - attribute_map = { - 'env_zid': 'envZId', - 'shr_token': 'shareToken', - 'reserved': 'reserved' - } - - def __init__(self, env_zid=None, shr_token=None, reserved=None): # noqa: E501 - """UnshareRequest - a model defined in Swagger""" # noqa: E501 - self._env_zid = None - self._shr_token = None - self._reserved = None - self.discriminator = None - if env_zid is not None: - self.env_zid = env_zid - if shr_token is not None: - self.shr_token = shr_token - if reserved is not None: - self.reserved = reserved - - @property - def env_zid(self): - """Gets the env_zid of this UnshareRequest. # noqa: E501 - - - :return: The env_zid of this UnshareRequest. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this UnshareRequest. - - - :param env_zid: The env_zid of this UnshareRequest. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def shr_token(self): - """Gets the shr_token of this UnshareRequest. # noqa: E501 - - - :return: The shr_token of this UnshareRequest. # noqa: E501 - :rtype: str - """ - return self._shr_token - - @shr_token.setter - def shr_token(self, shr_token): - """Sets the shr_token of this UnshareRequest. - - - :param shr_token: The shr_token of this UnshareRequest. # noqa: E501 - :type: str - """ - - self._shr_token = shr_token - - @property - def reserved(self): - """Gets the reserved of this UnshareRequest. # noqa: E501 - - - :return: The reserved of this UnshareRequest. # noqa: E501 - :rtype: bool - """ - return self._reserved - - @reserved.setter - def reserved(self, reserved): - """Sets the reserved of this UnshareRequest. - - - :param reserved: The reserved of this UnshareRequest. # noqa: E501 - :type: bool - """ - - self._reserved = reserved - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UnshareRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnshareRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py deleted file mode 100644 index 41554390..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UpdateFrontendRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'public_name': 'str', - 'url_template': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'public_name': 'publicName', - 'url_template': 'urlTemplate' - } - - def __init__(self, frontend_token=None, public_name=None, url_template=None): # noqa: E501 - """UpdateFrontendRequest - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._public_name = None - self._url_template = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if public_name is not None: - self.public_name = public_name - if url_template is not None: - self.url_template = url_template - - @property - def frontend_token(self): - """Gets the frontend_token of this UpdateFrontendRequest. # noqa: E501 - - - :return: The frontend_token of this UpdateFrontendRequest. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this UpdateFrontendRequest. - - - :param frontend_token: The frontend_token of this UpdateFrontendRequest. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def public_name(self): - """Gets the public_name of this UpdateFrontendRequest. # noqa: E501 - - - :return: The public_name of this UpdateFrontendRequest. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this UpdateFrontendRequest. - - - :param public_name: The public_name of this UpdateFrontendRequest. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def url_template(self): - """Gets the url_template of this UpdateFrontendRequest. # noqa: E501 - - - :return: The url_template of this UpdateFrontendRequest. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this UpdateFrontendRequest. - - - :param url_template: The url_template of this UpdateFrontendRequest. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UpdateFrontendRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UpdateFrontendRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py deleted file mode 100644 index f82b0020..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UpdateShareRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'shr_token': 'str', - 'backend_proxy_endpoint': 'str', - 'add_access_grants': 'list[str]', - 'remove_access_grants': 'list[str]' - } - - attribute_map = { - 'shr_token': 'shareToken', - 'backend_proxy_endpoint': 'backendProxyEndpoint', - 'add_access_grants': 'addAccessGrants', - 'remove_access_grants': 'removeAccessGrants' - } - - def __init__(self, shr_token=None, backend_proxy_endpoint=None, add_access_grants=None, remove_access_grants=None): # noqa: E501 - """UpdateShareRequest - a model defined in Swagger""" # noqa: E501 - self._shr_token = None - self._backend_proxy_endpoint = None - self._add_access_grants = None - self._remove_access_grants = None - self.discriminator = None - if shr_token is not None: - self.shr_token = shr_token - if backend_proxy_endpoint is not None: - self.backend_proxy_endpoint = backend_proxy_endpoint - if add_access_grants is not None: - self.add_access_grants = add_access_grants - if remove_access_grants is not None: - self.remove_access_grants = remove_access_grants - - @property - def shr_token(self): - """Gets the shr_token of this UpdateShareRequest. # noqa: E501 - - - :return: The shr_token of this UpdateShareRequest. # noqa: E501 - :rtype: str - """ - return self._shr_token - - @shr_token.setter - def shr_token(self, shr_token): - """Sets the shr_token of this UpdateShareRequest. - - - :param shr_token: The shr_token of this UpdateShareRequest. # noqa: E501 - :type: str - """ - - self._shr_token = shr_token - - @property - def backend_proxy_endpoint(self): - """Gets the backend_proxy_endpoint of this UpdateShareRequest. # noqa: E501 - - - :return: The backend_proxy_endpoint of this UpdateShareRequest. # noqa: E501 - :rtype: str - """ - return self._backend_proxy_endpoint - - @backend_proxy_endpoint.setter - def backend_proxy_endpoint(self, backend_proxy_endpoint): - """Sets the backend_proxy_endpoint of this UpdateShareRequest. - - - :param backend_proxy_endpoint: The backend_proxy_endpoint of this UpdateShareRequest. # noqa: E501 - :type: str - """ - - self._backend_proxy_endpoint = backend_proxy_endpoint - - @property - def add_access_grants(self): - """Gets the add_access_grants of this UpdateShareRequest. # noqa: E501 - - - :return: The add_access_grants of this UpdateShareRequest. # noqa: E501 - :rtype: list[str] - """ - return self._add_access_grants - - @add_access_grants.setter - def add_access_grants(self, add_access_grants): - """Sets the add_access_grants of this UpdateShareRequest. - - - :param add_access_grants: The add_access_grants of this UpdateShareRequest. # noqa: E501 - :type: list[str] - """ - - self._add_access_grants = add_access_grants - - @property - def remove_access_grants(self): - """Gets the remove_access_grants of this UpdateShareRequest. # noqa: E501 - - - :return: The remove_access_grants of this UpdateShareRequest. # noqa: E501 - :rtype: list[str] - """ - return self._remove_access_grants - - @remove_access_grants.setter - def remove_access_grants(self, remove_access_grants): - """Sets the remove_access_grants of this UpdateShareRequest. - - - :param remove_access_grants: The remove_access_grants of this UpdateShareRequest. # noqa: E501 - :type: list[str] - """ - - self._remove_access_grants = remove_access_grants - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UpdateShareRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UpdateShareRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify_request.py b/sdk/python/sdk/zrok/zrok_api/models/verify_request.py deleted file mode 100644 index 8089bc9b..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/verify_request.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class VerifyRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'token': 'str' - } - - attribute_map = { - 'token': 'token' - } - - def __init__(self, token=None): # noqa: E501 - """VerifyRequest - a model defined in Swagger""" # noqa: E501 - self._token = None - self.discriminator = None - if token is not None: - self.token = token - - @property - def token(self): - """Gets the token of this VerifyRequest. # noqa: E501 - - - :return: The token of this VerifyRequest. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this VerifyRequest. - - - :param token: The token of this VerifyRequest. # noqa: E501 - :type: str - """ - - self._token = token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(VerifyRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, VerifyRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify_response.py b/sdk/python/sdk/zrok/zrok_api/models/verify_response.py deleted file mode 100644 index d6b9a617..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/verify_response.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 0.3.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class VerifyResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str' - } - - attribute_map = { - 'email': 'email' - } - - def __init__(self, email=None): # noqa: E501 - """VerifyResponse - a model defined in Swagger""" # noqa: E501 - self._email = None - self.discriminator = None - if email is not None: - self.email = email - - @property - def email(self): - """Gets the email of this VerifyResponse. # noqa: E501 - - - :return: The email of this VerifyResponse. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this VerifyResponse. - - - :param email: The email of this VerifyResponse. # noqa: E501 - :type: str - """ - - self._email = email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(VerifyResponse, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, VerifyResponse): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other From c38c6c312763998d67c0c265cd14fa0402d6fffe Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Thu, 27 Feb 2025 17:16:02 -0500 Subject: [PATCH 07/56] recover doc and test dirs --- sdk/python/sdk/zrok/docs/AccessBody.md | 12 + sdk/python/sdk/zrok/docs/AccessBody1.md | 11 + sdk/python/sdk/zrok/docs/AccountApi.md | 383 +++++++++ sdk/python/sdk/zrok/docs/AccountBody.md | 10 + sdk/python/sdk/zrok/docs/AdminApi.md | 720 ++++++++++++++++ sdk/python/sdk/zrok/docs/AuthUser.md | 10 + .../sdk/zrok/docs/ChangePasswordBody.md | 11 + .../sdk/zrok/docs/ClientVersionCheckBody.md | 9 + sdk/python/sdk/zrok/docs/Configuration.md | 13 + sdk/python/sdk/zrok/docs/DisableBody.md | 9 + sdk/python/sdk/zrok/docs/EnableBody.md | 10 + sdk/python/sdk/zrok/docs/Environment.md | 16 + .../sdk/zrok/docs/EnvironmentAndResources.md | 11 + sdk/python/sdk/zrok/docs/EnvironmentApi.md | 110 +++ sdk/python/sdk/zrok/docs/Environments.md | 8 + sdk/python/sdk/zrok/docs/ErrorMessage.md | 8 + sdk/python/sdk/zrok/docs/Frontend.md | 17 + sdk/python/sdk/zrok/docs/FrontendBody.md | 12 + sdk/python/sdk/zrok/docs/FrontendBody1.md | 9 + sdk/python/sdk/zrok/docs/FrontendBody2.md | 11 + sdk/python/sdk/zrok/docs/Frontends.md | 8 + sdk/python/sdk/zrok/docs/GrantsBody.md | 9 + sdk/python/sdk/zrok/docs/IdentityBody.md | 9 + sdk/python/sdk/zrok/docs/InlineResponse200.md | 9 + .../sdk/zrok/docs/InlineResponse2001.md | 9 + .../sdk/zrok/docs/InlineResponse2002.md | 14 + .../sdk/zrok/docs/InlineResponse2003.md | 9 + .../zrok/docs/InlineResponse2003Members.md | 10 + .../sdk/zrok/docs/InlineResponse2004.md | 9 + .../zrok/docs/InlineResponse2004Members.md | 10 + .../docs/InlineResponse2004Organizations.md | 10 + .../sdk/zrok/docs/InlineResponse2005.md | 9 + .../docs/InlineResponse2005Memberships.md | 11 + .../docs/InlineResponse2005Organizations.md | 10 + .../sdk/zrok/docs/InlineResponse2006.md | 9 + .../docs/InlineResponse2006Memberships.md | 11 + .../sdk/zrok/docs/InlineResponse2007.md | 9 + sdk/python/sdk/zrok/docs/InlineResponse201.md | 9 + .../sdk/zrok/docs/InlineResponse2011.md | 10 + .../sdk/zrok/docs/InlineResponse2012.md | 9 + .../sdk/zrok/docs/InlineResponse2013.md | 10 + sdk/python/sdk/zrok/docs/InlineResponse400.md | 9 + sdk/python/sdk/zrok/docs/InviteBody.md | 10 + sdk/python/sdk/zrok/docs/LoginBody.md | 10 + sdk/python/sdk/zrok/docs/MetadataApi.md | 796 ++++++++++++++++++ sdk/python/sdk/zrok/docs/Metrics.md | 12 + sdk/python/sdk/zrok/docs/MetricsSample.md | 11 + .../sdk/zrok/docs/OrganizationAddBody.md | 11 + sdk/python/sdk/zrok/docs/OrganizationBody.md | 9 + sdk/python/sdk/zrok/docs/OrganizationBody1.md | 9 + .../sdk/zrok/docs/OrganizationListBody.md | 9 + .../sdk/zrok/docs/OrganizationRemoveBody.md | 10 + sdk/python/sdk/zrok/docs/Overview.md | 10 + sdk/python/sdk/zrok/docs/Principal.md | 13 + .../zrok/docs/RegenerateAccountTokenBody.md | 9 + .../sdk/zrok/docs/RegenerateTokenBody.md | 9 + sdk/python/sdk/zrok/docs/RegisterBody.md | 10 + sdk/python/sdk/zrok/docs/ResetPasswordBody.md | 10 + .../sdk/zrok/docs/ResetPasswordRequestBody.md | 9 + sdk/python/sdk/zrok/docs/Share.md | 20 + sdk/python/sdk/zrok/docs/ShareApi.md | 315 +++++++ sdk/python/sdk/zrok/docs/ShareBody.md | 12 + sdk/python/sdk/zrok/docs/ShareRequest.md | 22 + sdk/python/sdk/zrok/docs/ShareResponse.md | 10 + sdk/python/sdk/zrok/docs/Shares.md | 8 + sdk/python/sdk/zrok/docs/SparkData.md | 8 + sdk/python/sdk/zrok/docs/SparkDataSample.md | 10 + sdk/python/sdk/zrok/docs/SparklinesBody.md | 11 + sdk/python/sdk/zrok/docs/TokenGenerateBody.md | 9 + sdk/python/sdk/zrok/docs/UnaccessBody.md | 11 + sdk/python/sdk/zrok/docs/UnshareBody.md | 11 + sdk/python/sdk/zrok/docs/VerifyBody.md | 9 + sdk/python/sdk/zrok/docs/Version.md | 8 + sdk/python/sdk/zrok/docs/VersionBody.md | 9 + sdk/python/sdk/zrok/docs/VersionCheckBody.md | 9 + sdk/python/sdk/zrok/test/__init__.py | 1 + sdk/python/sdk/zrok/test/test_access_body.py | 39 + sdk/python/sdk/zrok/test/test_access_body1.py | 39 + sdk/python/sdk/zrok/test/test_account_api.py | 81 ++ sdk/python/sdk/zrok/test/test_account_body.py | 39 + sdk/python/sdk/zrok/test/test_admin_api.py | 117 +++ sdk/python/sdk/zrok/test/test_auth_user.py | 39 + .../zrok/test/test_change_password_body.py | 39 + .../test/test_client_version_check_body.py | 39 + .../sdk/zrok/test/test_configuration.py | 39 + sdk/python/sdk/zrok/test/test_disable_body.py | 39 + sdk/python/sdk/zrok/test/test_enable_body.py | 39 + sdk/python/sdk/zrok/test/test_environment.py | 39 + .../test/test_environment_and_resources.py | 39 + .../sdk/zrok/test/test_environment_api.py | 45 + sdk/python/sdk/zrok/test/test_environments.py | 39 + .../sdk/zrok/test/test_error_message.py | 39 + sdk/python/sdk/zrok/test/test_frontend.py | 39 + .../sdk/zrok/test/test_frontend_body.py | 39 + .../sdk/zrok/test/test_frontend_body1.py | 39 + .../sdk/zrok/test/test_frontend_body2.py | 39 + sdk/python/sdk/zrok/test/test_frontends.py | 39 + sdk/python/sdk/zrok/test/test_grants_body.py | 39 + .../sdk/zrok/test/test_identity_body.py | 39 + .../sdk/zrok/test/test_inline_response200.py | 39 + .../sdk/zrok/test/test_inline_response2001.py | 39 + .../sdk/zrok/test/test_inline_response2002.py | 39 + .../sdk/zrok/test/test_inline_response2003.py | 39 + .../test/test_inline_response2003_members.py | 39 + .../sdk/zrok/test/test_inline_response2004.py | 39 + .../test/test_inline_response2004_members.py | 39 + .../test_inline_response2004_organizations.py | 39 + .../sdk/zrok/test/test_inline_response2005.py | 39 + .../test_inline_response2005_memberships.py | 39 + .../test_inline_response2005_organizations.py | 39 + .../sdk/zrok/test/test_inline_response2006.py | 39 + .../test_inline_response2006_memberships.py | 39 + .../sdk/zrok/test/test_inline_response2007.py | 39 + .../sdk/zrok/test/test_inline_response201.py | 39 + .../sdk/zrok/test/test_inline_response2011.py | 39 + .../sdk/zrok/test/test_inline_response2012.py | 39 + .../sdk/zrok/test/test_inline_response2013.py | 39 + .../sdk/zrok/test/test_inline_response400.py | 39 + sdk/python/sdk/zrok/test/test_invite_body.py | 39 + sdk/python/sdk/zrok/test/test_login_body.py | 39 + sdk/python/sdk/zrok/test/test_metadata_api.py | 117 +++ sdk/python/sdk/zrok/test/test_metrics.py | 39 + .../sdk/zrok/test/test_metrics_sample.py | 39 + .../zrok/test/test_organization_add_body.py | 39 + .../sdk/zrok/test/test_organization_body.py | 39 + .../sdk/zrok/test/test_organization_body1.py | 39 + .../zrok/test/test_organization_list_body.py | 39 + .../test/test_organization_remove_body.py | 39 + sdk/python/sdk/zrok/test/test_overview.py | 39 + sdk/python/sdk/zrok/test/test_principal.py | 39 + .../test_regenerate_account_token_body.py | 39 + .../zrok/test/test_regenerate_token_body.py | 39 + .../sdk/zrok/test/test_register_body.py | 39 + .../sdk/zrok/test/test_reset_password_body.py | 39 + .../test/test_reset_password_request_body.py | 39 + sdk/python/sdk/zrok/test/test_share.py | 39 + sdk/python/sdk/zrok/test/test_share_api.py | 63 ++ sdk/python/sdk/zrok/test/test_share_body.py | 39 + .../sdk/zrok/test/test_share_request.py | 39 + .../sdk/zrok/test/test_share_response.py | 39 + sdk/python/sdk/zrok/test/test_shares.py | 39 + sdk/python/sdk/zrok/test/test_spark_data.py | 39 + .../sdk/zrok/test/test_spark_data_sample.py | 39 + .../sdk/zrok/test/test_sparklines_body.py | 39 + .../sdk/zrok/test/test_token_generate_body.py | 39 + .../sdk/zrok/test/test_unaccess_body.py | 39 + sdk/python/sdk/zrok/test/test_unshare_body.py | 39 + sdk/python/sdk/zrok/test/test_verify_body.py | 39 + sdk/python/sdk/zrok/test/test_version.py | 39 + sdk/python/sdk/zrok/test/test_version_body.py | 39 + .../sdk/zrok/test/test_version_check_body.py | 39 + 151 files changed, 6205 insertions(+) create mode 100644 sdk/python/sdk/zrok/docs/AccessBody.md create mode 100644 sdk/python/sdk/zrok/docs/AccessBody1.md create mode 100644 sdk/python/sdk/zrok/docs/AccountApi.md create mode 100644 sdk/python/sdk/zrok/docs/AccountBody.md create mode 100644 sdk/python/sdk/zrok/docs/AdminApi.md create mode 100644 sdk/python/sdk/zrok/docs/AuthUser.md create mode 100644 sdk/python/sdk/zrok/docs/ChangePasswordBody.md create mode 100644 sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md create mode 100644 sdk/python/sdk/zrok/docs/Configuration.md create mode 100644 sdk/python/sdk/zrok/docs/DisableBody.md create mode 100644 sdk/python/sdk/zrok/docs/EnableBody.md create mode 100644 sdk/python/sdk/zrok/docs/Environment.md create mode 100644 sdk/python/sdk/zrok/docs/EnvironmentAndResources.md create mode 100644 sdk/python/sdk/zrok/docs/EnvironmentApi.md create mode 100644 sdk/python/sdk/zrok/docs/Environments.md create mode 100644 sdk/python/sdk/zrok/docs/ErrorMessage.md create mode 100644 sdk/python/sdk/zrok/docs/Frontend.md create mode 100644 sdk/python/sdk/zrok/docs/FrontendBody.md create mode 100644 sdk/python/sdk/zrok/docs/FrontendBody1.md create mode 100644 sdk/python/sdk/zrok/docs/FrontendBody2.md create mode 100644 sdk/python/sdk/zrok/docs/Frontends.md create mode 100644 sdk/python/sdk/zrok/docs/GrantsBody.md create mode 100644 sdk/python/sdk/zrok/docs/IdentityBody.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse200.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2001.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2002.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2003.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2003Members.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2004.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2004Members.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2005.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2006.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2007.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse201.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2011.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2012.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2013.md create mode 100644 sdk/python/sdk/zrok/docs/InlineResponse400.md create mode 100644 sdk/python/sdk/zrok/docs/InviteBody.md create mode 100644 sdk/python/sdk/zrok/docs/LoginBody.md create mode 100644 sdk/python/sdk/zrok/docs/MetadataApi.md create mode 100644 sdk/python/sdk/zrok/docs/Metrics.md create mode 100644 sdk/python/sdk/zrok/docs/MetricsSample.md create mode 100644 sdk/python/sdk/zrok/docs/OrganizationAddBody.md create mode 100644 sdk/python/sdk/zrok/docs/OrganizationBody.md create mode 100644 sdk/python/sdk/zrok/docs/OrganizationBody1.md create mode 100644 sdk/python/sdk/zrok/docs/OrganizationListBody.md create mode 100644 sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md create mode 100644 sdk/python/sdk/zrok/docs/Overview.md create mode 100644 sdk/python/sdk/zrok/docs/Principal.md create mode 100644 sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md create mode 100644 sdk/python/sdk/zrok/docs/RegenerateTokenBody.md create mode 100644 sdk/python/sdk/zrok/docs/RegisterBody.md create mode 100644 sdk/python/sdk/zrok/docs/ResetPasswordBody.md create mode 100644 sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md create mode 100644 sdk/python/sdk/zrok/docs/Share.md create mode 100644 sdk/python/sdk/zrok/docs/ShareApi.md create mode 100644 sdk/python/sdk/zrok/docs/ShareBody.md create mode 100644 sdk/python/sdk/zrok/docs/ShareRequest.md create mode 100644 sdk/python/sdk/zrok/docs/ShareResponse.md create mode 100644 sdk/python/sdk/zrok/docs/Shares.md create mode 100644 sdk/python/sdk/zrok/docs/SparkData.md create mode 100644 sdk/python/sdk/zrok/docs/SparkDataSample.md create mode 100644 sdk/python/sdk/zrok/docs/SparklinesBody.md create mode 100644 sdk/python/sdk/zrok/docs/TokenGenerateBody.md create mode 100644 sdk/python/sdk/zrok/docs/UnaccessBody.md create mode 100644 sdk/python/sdk/zrok/docs/UnshareBody.md create mode 100644 sdk/python/sdk/zrok/docs/VerifyBody.md create mode 100644 sdk/python/sdk/zrok/docs/Version.md create mode 100644 sdk/python/sdk/zrok/docs/VersionBody.md create mode 100644 sdk/python/sdk/zrok/docs/VersionCheckBody.md create mode 100644 sdk/python/sdk/zrok/test/__init__.py create mode 100644 sdk/python/sdk/zrok/test/test_access_body.py create mode 100644 sdk/python/sdk/zrok/test/test_access_body1.py create mode 100644 sdk/python/sdk/zrok/test/test_account_api.py create mode 100644 sdk/python/sdk/zrok/test/test_account_body.py create mode 100644 sdk/python/sdk/zrok/test/test_admin_api.py create mode 100644 sdk/python/sdk/zrok/test/test_auth_user.py create mode 100644 sdk/python/sdk/zrok/test/test_change_password_body.py create mode 100644 sdk/python/sdk/zrok/test/test_client_version_check_body.py create mode 100644 sdk/python/sdk/zrok/test/test_configuration.py create mode 100644 sdk/python/sdk/zrok/test/test_disable_body.py create mode 100644 sdk/python/sdk/zrok/test/test_enable_body.py create mode 100644 sdk/python/sdk/zrok/test/test_environment.py create mode 100644 sdk/python/sdk/zrok/test/test_environment_and_resources.py create mode 100644 sdk/python/sdk/zrok/test/test_environment_api.py create mode 100644 sdk/python/sdk/zrok/test/test_environments.py create mode 100644 sdk/python/sdk/zrok/test/test_error_message.py create mode 100644 sdk/python/sdk/zrok/test/test_frontend.py create mode 100644 sdk/python/sdk/zrok/test/test_frontend_body.py create mode 100644 sdk/python/sdk/zrok/test/test_frontend_body1.py create mode 100644 sdk/python/sdk/zrok/test/test_frontend_body2.py create mode 100644 sdk/python/sdk/zrok/test/test_frontends.py create mode 100644 sdk/python/sdk/zrok/test/test_grants_body.py create mode 100644 sdk/python/sdk/zrok/test/test_identity_body.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response200.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2001.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2002.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2003.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2003_members.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2004.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2004_members.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2005.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2006.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2007.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response201.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2011.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2012.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response2013.py create mode 100644 sdk/python/sdk/zrok/test/test_inline_response400.py create mode 100644 sdk/python/sdk/zrok/test/test_invite_body.py create mode 100644 sdk/python/sdk/zrok/test/test_login_body.py create mode 100644 sdk/python/sdk/zrok/test/test_metadata_api.py create mode 100644 sdk/python/sdk/zrok/test/test_metrics.py create mode 100644 sdk/python/sdk/zrok/test/test_metrics_sample.py create mode 100644 sdk/python/sdk/zrok/test/test_organization_add_body.py create mode 100644 sdk/python/sdk/zrok/test/test_organization_body.py create mode 100644 sdk/python/sdk/zrok/test/test_organization_body1.py create mode 100644 sdk/python/sdk/zrok/test/test_organization_list_body.py create mode 100644 sdk/python/sdk/zrok/test/test_organization_remove_body.py create mode 100644 sdk/python/sdk/zrok/test/test_overview.py create mode 100644 sdk/python/sdk/zrok/test/test_principal.py create mode 100644 sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py create mode 100644 sdk/python/sdk/zrok/test/test_regenerate_token_body.py create mode 100644 sdk/python/sdk/zrok/test/test_register_body.py create mode 100644 sdk/python/sdk/zrok/test/test_reset_password_body.py create mode 100644 sdk/python/sdk/zrok/test/test_reset_password_request_body.py create mode 100644 sdk/python/sdk/zrok/test/test_share.py create mode 100644 sdk/python/sdk/zrok/test/test_share_api.py create mode 100644 sdk/python/sdk/zrok/test/test_share_body.py create mode 100644 sdk/python/sdk/zrok/test/test_share_request.py create mode 100644 sdk/python/sdk/zrok/test/test_share_response.py create mode 100644 sdk/python/sdk/zrok/test/test_shares.py create mode 100644 sdk/python/sdk/zrok/test/test_spark_data.py create mode 100644 sdk/python/sdk/zrok/test/test_spark_data_sample.py create mode 100644 sdk/python/sdk/zrok/test/test_sparklines_body.py create mode 100644 sdk/python/sdk/zrok/test/test_token_generate_body.py create mode 100644 sdk/python/sdk/zrok/test/test_unaccess_body.py create mode 100644 sdk/python/sdk/zrok/test/test_unshare_body.py create mode 100644 sdk/python/sdk/zrok/test/test_verify_body.py create mode 100644 sdk/python/sdk/zrok/test/test_version.py create mode 100644 sdk/python/sdk/zrok/test/test_version_body.py create mode 100644 sdk/python/sdk/zrok/test/test_version_check_body.py diff --git a/sdk/python/sdk/zrok/docs/AccessBody.md b/sdk/python/sdk/zrok/docs/AccessBody.md new file mode 100644 index 00000000..86e3636b --- /dev/null +++ b/sdk/python/sdk/zrok/docs/AccessBody.md @@ -0,0 +1,12 @@ +# AccessBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] +**bind_address** | **str** | | [optional] +**description** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/AccessBody1.md b/sdk/python/sdk/zrok/docs/AccessBody1.md new file mode 100644 index 00000000..68968950 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/AccessBody1.md @@ -0,0 +1,11 @@ +# AccessBody1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**bind_address** | **str** | | [optional] +**description** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/AccountApi.md b/sdk/python/sdk/zrok/docs/AccountApi.md new file mode 100644 index 00000000..531caa12 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/AccountApi.md @@ -0,0 +1,383 @@ +# zrok_api.AccountApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**change_password**](AccountApi.md#change_password) | **POST** /changePassword | +[**invite**](AccountApi.md#invite) | **POST** /invite | +[**login**](AccountApi.md#login) | **POST** /login | +[**regenerate_account_token**](AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | +[**register**](AccountApi.md#register) | **POST** /register | +[**reset_password**](AccountApi.md#reset_password) | **POST** /resetPassword | +[**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | +[**verify**](AccountApi.md#verify) | **POST** /verify | + +# **change_password** +> change_password(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) +body = zrok_api.ChangePasswordBody() # ChangePasswordBody | (optional) + +try: + api_instance.change_password(body=body) +except ApiException as e: + print("Exception when calling AccountApi->change_password: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ChangePasswordBody**](ChangePasswordBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **invite** +> invite(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = zrok_api.AccountApi() +body = zrok_api.InviteBody() # InviteBody | (optional) + +try: + api_instance.invite(body=body) +except ApiException as e: + print("Exception when calling AccountApi->invite: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**InviteBody**](InviteBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **login** +> str login(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = zrok_api.AccountApi() +body = zrok_api.LoginBody() # LoginBody | (optional) + +try: + api_response = api_instance.login(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountApi->login: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**LoginBody**](LoginBody.md)| | [optional] + +### Return type + +**str** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **regenerate_account_token** +> InlineResponse200 regenerate_account_token(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) +body = zrok_api.RegenerateAccountTokenBody() # RegenerateAccountTokenBody | (optional) + +try: + api_response = api_instance.regenerate_account_token(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**RegenerateAccountTokenBody**](RegenerateAccountTokenBody.md)| | [optional] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **register** +> InlineResponse200 register(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = zrok_api.AccountApi() +body = zrok_api.RegisterBody() # RegisterBody | (optional) + +try: + api_response = api_instance.register(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountApi->register: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**RegisterBody**](RegisterBody.md)| | [optional] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **reset_password** +> reset_password(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = zrok_api.AccountApi() +body = zrok_api.ResetPasswordBody() # ResetPasswordBody | (optional) + +try: + api_instance.reset_password(body=body) +except ApiException as e: + print("Exception when calling AccountApi->reset_password: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ResetPasswordBody**](ResetPasswordBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **reset_password_request** +> reset_password_request(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = zrok_api.AccountApi() +body = zrok_api.ResetPasswordRequestBody() # ResetPasswordRequestBody | (optional) + +try: + api_instance.reset_password_request(body=body) +except ApiException as e: + print("Exception when calling AccountApi->reset_password_request: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ResetPasswordRequestBody**](ResetPasswordRequestBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **verify** +> InlineResponse2001 verify(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = zrok_api.AccountApi() +body = zrok_api.VerifyBody() # VerifyBody | (optional) + +try: + api_response = api_instance.verify(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountApi->verify: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**VerifyBody**](VerifyBody.md)| | [optional] + +### Return type + +[**InlineResponse2001**](InlineResponse2001.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/AccountBody.md b/sdk/python/sdk/zrok/docs/AccountBody.md new file mode 100644 index 00000000..076efa50 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/AccountBody.md @@ -0,0 +1,10 @@ +# AccountBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**password** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/AdminApi.md b/sdk/python/sdk/zrok/docs/AdminApi.md new file mode 100644 index 00000000..34977dd4 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/AdminApi.md @@ -0,0 +1,720 @@ +# zrok_api.AdminApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_organization_member**](AdminApi.md#add_organization_member) | **POST** /organization/add | +[**create_account**](AdminApi.md#create_account) | **POST** /account | +[**create_frontend**](AdminApi.md#create_frontend) | **POST** /frontend | +[**create_identity**](AdminApi.md#create_identity) | **POST** /identity | +[**create_organization**](AdminApi.md#create_organization) | **POST** /organization | +[**delete_frontend**](AdminApi.md#delete_frontend) | **DELETE** /frontend | +[**delete_organization**](AdminApi.md#delete_organization) | **DELETE** /organization | +[**grants**](AdminApi.md#grants) | **POST** /grants | +[**invite_token_generate**](AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | +[**list_frontends**](AdminApi.md#list_frontends) | **GET** /frontends | +[**list_organization_members**](AdminApi.md#list_organization_members) | **POST** /organization/list | +[**list_organizations**](AdminApi.md#list_organizations) | **GET** /organizations | +[**remove_organization_member**](AdminApi.md#remove_organization_member) | **POST** /organization/remove | +[**update_frontend**](AdminApi.md#update_frontend) | **PATCH** /frontend | + +# **add_organization_member** +> add_organization_member(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.OrganizationAddBody() # OrganizationAddBody | (optional) + +try: + api_instance.add_organization_member(body=body) +except ApiException as e: + print("Exception when calling AdminApi->add_organization_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OrganizationAddBody**](OrganizationAddBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_account** +> InlineResponse200 create_account(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.AccountBody() # AccountBody | (optional) + +try: + api_response = api_instance.create_account(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->create_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**AccountBody**](AccountBody.md)| | [optional] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_frontend** +> InlineResponse201 create_frontend(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.FrontendBody() # FrontendBody | (optional) + +try: + api_response = api_instance.create_frontend(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->create_frontend: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FrontendBody**](FrontendBody.md)| | [optional] + +### Return type + +[**InlineResponse201**](InlineResponse201.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_identity** +> InlineResponse2011 create_identity(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.IdentityBody() # IdentityBody | (optional) + +try: + api_response = api_instance.create_identity(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->create_identity: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**IdentityBody**](IdentityBody.md)| | [optional] + +### Return type + +[**InlineResponse2011**](InlineResponse2011.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_organization** +> InlineResponse2012 create_organization(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.OrganizationBody() # OrganizationBody | (optional) + +try: + api_response = api_instance.create_organization(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->create_organization: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OrganizationBody**](OrganizationBody.md)| | [optional] + +### Return type + +[**InlineResponse2012**](InlineResponse2012.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_frontend** +> delete_frontend(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.FrontendBody1() # FrontendBody1 | (optional) + +try: + api_instance.delete_frontend(body=body) +except ApiException as e: + print("Exception when calling AdminApi->delete_frontend: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FrontendBody1**](FrontendBody1.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_organization** +> delete_organization(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.OrganizationBody1() # OrganizationBody1 | (optional) + +try: + api_instance.delete_organization(body=body) +except ApiException as e: + print("Exception when calling AdminApi->delete_organization: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OrganizationBody1**](OrganizationBody1.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **grants** +> grants(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.GrantsBody() # GrantsBody | (optional) + +try: + api_instance.grants(body=body) +except ApiException as e: + print("Exception when calling AdminApi->grants: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GrantsBody**](GrantsBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **invite_token_generate** +> invite_token_generate(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.TokenGenerateBody() # TokenGenerateBody | (optional) + +try: + api_instance.invite_token_generate(body=body) +except ApiException as e: + print("Exception when calling AdminApi->invite_token_generate: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**TokenGenerateBody**](TokenGenerateBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_frontends** +> list[InlineResponse2002] list_frontends() + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) + +try: + api_response = api_instance.list_frontends() + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->list_frontends: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[InlineResponse2002]**](InlineResponse2002.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_organization_members** +> InlineResponse2003 list_organization_members(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.OrganizationListBody() # OrganizationListBody | (optional) + +try: + api_response = api_instance.list_organization_members(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->list_organization_members: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OrganizationListBody**](OrganizationListBody.md)| | [optional] + +### Return type + +[**InlineResponse2003**](InlineResponse2003.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_organizations** +> InlineResponse2004 list_organizations() + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) + +try: + api_response = api_instance.list_organizations() + pprint(api_response) +except ApiException as e: + print("Exception when calling AdminApi->list_organizations: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InlineResponse2004**](InlineResponse2004.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **remove_organization_member** +> remove_organization_member(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.OrganizationRemoveBody() # OrganizationRemoveBody | (optional) + +try: + api_instance.remove_organization_member(body=body) +except ApiException as e: + print("Exception when calling AdminApi->remove_organization_member: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OrganizationRemoveBody**](OrganizationRemoveBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_frontend** +> update_frontend(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +body = zrok_api.FrontendBody2() # FrontendBody2 | (optional) + +try: + api_instance.update_frontend(body=body) +except ApiException as e: + print("Exception when calling AdminApi->update_frontend: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FrontendBody2**](FrontendBody2.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/AuthUser.md b/sdk/python/sdk/zrok/docs/AuthUser.md new file mode 100644 index 00000000..2abe24ba --- /dev/null +++ b/sdk/python/sdk/zrok/docs/AuthUser.md @@ -0,0 +1,10 @@ +# AuthUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | [optional] +**password** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/ChangePasswordBody.md b/sdk/python/sdk/zrok/docs/ChangePasswordBody.md new file mode 100644 index 00000000..1137de72 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ChangePasswordBody.md @@ -0,0 +1,11 @@ +# ChangePasswordBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**old_password** | **str** | | [optional] +**new_password** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md b/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md new file mode 100644 index 00000000..4a36f24e --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md @@ -0,0 +1,9 @@ +# ClientVersionCheckBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_version** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/Configuration.md b/sdk/python/sdk/zrok/docs/Configuration.md new file mode 100644 index 00000000..ee94f24b --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Configuration.md @@ -0,0 +1,13 @@ +# Configuration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **str** | | [optional] +**tou_link** | **str** | | [optional] +**invites_open** | **bool** | | [optional] +**requires_invite_token** | **bool** | | [optional] +**invite_token_contact** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/DisableBody.md b/sdk/python/sdk/zrok/docs/DisableBody.md new file mode 100644 index 00000000..f6ee65f2 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/DisableBody.md @@ -0,0 +1,9 @@ +# DisableBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/EnableBody.md b/sdk/python/sdk/zrok/docs/EnableBody.md new file mode 100644 index 00000000..7ba7d7b3 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/EnableBody.md @@ -0,0 +1,10 @@ +# EnableBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**host** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/Environment.md b/sdk/python/sdk/zrok/docs/Environment.md new file mode 100644 index 00000000..bd71fee9 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Environment.md @@ -0,0 +1,16 @@ +# Environment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**host** | **str** | | [optional] +**address** | **str** | | [optional] +**z_id** | **str** | | [optional] +**activity** | [**SparkData**](SparkData.md) | | [optional] +**limited** | **bool** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md b/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md new file mode 100644 index 00000000..7ed1a39a --- /dev/null +++ b/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md @@ -0,0 +1,11 @@ +# EnvironmentAndResources + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**environment** | [**Environment**](Environment.md) | | [optional] +**frontends** | [**Frontends**](Frontends.md) | | [optional] +**shares** | [**Shares**](Shares.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/EnvironmentApi.md b/sdk/python/sdk/zrok/docs/EnvironmentApi.md new file mode 100644 index 00000000..f9e49447 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/EnvironmentApi.md @@ -0,0 +1,110 @@ +# zrok_api.EnvironmentApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**disable**](EnvironmentApi.md#disable) | **POST** /disable | +[**enable**](EnvironmentApi.md#enable) | **POST** /enable | + +# **disable** +> disable(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.EnvironmentApi(zrok_api.ApiClient(configuration)) +body = zrok_api.DisableBody() # DisableBody | (optional) + +try: + api_instance.disable(body=body) +except ApiException as e: + print("Exception when calling EnvironmentApi->disable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**DisableBody**](DisableBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **enable** +> InlineResponse2011 enable(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.EnvironmentApi(zrok_api.ApiClient(configuration)) +body = zrok_api.EnableBody() # EnableBody | (optional) + +try: + api_response = api_instance.enable(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling EnvironmentApi->enable: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**EnableBody**](EnableBody.md)| | [optional] + +### Return type + +[**InlineResponse2011**](InlineResponse2011.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/Environments.md b/sdk/python/sdk/zrok/docs/Environments.md new file mode 100644 index 00000000..5cdc8b26 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Environments.md @@ -0,0 +1,8 @@ +# Environments + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/ErrorMessage.md b/sdk/python/sdk/zrok/docs/ErrorMessage.md new file mode 100644 index 00000000..25d74334 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ErrorMessage.md @@ -0,0 +1,8 @@ +# ErrorMessage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/Frontend.md b/sdk/python/sdk/zrok/docs/Frontend.md new file mode 100644 index 00000000..428eb19d --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Frontend.md @@ -0,0 +1,17 @@ +# Frontend + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**frontend_token** | **str** | | [optional] +**share_token** | **str** | | [optional] +**backend_mode** | **str** | | [optional] +**bind_address** | **str** | | [optional] +**description** | **str** | | [optional] +**z_id** | **str** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/FrontendBody.md b/sdk/python/sdk/zrok/docs/FrontendBody.md new file mode 100644 index 00000000..5d0a3e37 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/FrontendBody.md @@ -0,0 +1,12 @@ +# FrontendBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**z_id** | **str** | | [optional] +**url_template** | **str** | | [optional] +**public_name** | **str** | | [optional] +**permission_mode** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/FrontendBody1.md b/sdk/python/sdk/zrok/docs/FrontendBody1.md new file mode 100644 index 00000000..7bcd3be5 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/FrontendBody1.md @@ -0,0 +1,9 @@ +# FrontendBody1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/FrontendBody2.md b/sdk/python/sdk/zrok/docs/FrontendBody2.md new file mode 100644 index 00000000..e459d152 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/FrontendBody2.md @@ -0,0 +1,11 @@ +# FrontendBody2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**public_name** | **str** | | [optional] +**url_template** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/Frontends.md b/sdk/python/sdk/zrok/docs/Frontends.md new file mode 100644 index 00000000..c308436b --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Frontends.md @@ -0,0 +1,8 @@ +# Frontends + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/GrantsBody.md b/sdk/python/sdk/zrok/docs/GrantsBody.md new file mode 100644 index 00000000..1e744a53 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/GrantsBody.md @@ -0,0 +1,9 @@ +# GrantsBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/IdentityBody.md b/sdk/python/sdk/zrok/docs/IdentityBody.md new file mode 100644 index 00000000..39125ca5 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/IdentityBody.md @@ -0,0 +1,9 @@ +# IdentityBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse200.md b/sdk/python/sdk/zrok/docs/InlineResponse200.md new file mode 100644 index 00000000..cc5f9b8b --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse200.md @@ -0,0 +1,9 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_token** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2001.md b/sdk/python/sdk/zrok/docs/InlineResponse2001.md new file mode 100644 index 00000000..820bf042 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2001.md @@ -0,0 +1,9 @@ +# InlineResponse2001 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2002.md b/sdk/python/sdk/zrok/docs/InlineResponse2002.md new file mode 100644 index 00000000..d50b57e3 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2002.md @@ -0,0 +1,14 @@ +# InlineResponse2002 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**z_id** | **str** | | [optional] +**url_template** | **str** | | [optional] +**public_name** | **str** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2003.md b/sdk/python/sdk/zrok/docs/InlineResponse2003.md new file mode 100644 index 00000000..39488d9e --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2003.md @@ -0,0 +1,9 @@ +# InlineResponse2003 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | [**list[InlineResponse2003Members]**](InlineResponse2003Members.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md b/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md new file mode 100644 index 00000000..ddc3c4dd --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md @@ -0,0 +1,10 @@ +# InlineResponse2003Members + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**admin** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004.md b/sdk/python/sdk/zrok/docs/InlineResponse2004.md new file mode 100644 index 00000000..8c11d95d --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2004.md @@ -0,0 +1,9 @@ +# InlineResponse2004 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organizations** | [**list[InlineResponse2004Organizations]**](InlineResponse2004Organizations.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md b/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md new file mode 100644 index 00000000..9a3ba443 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md @@ -0,0 +1,10 @@ +# InlineResponse2004Members + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**admin** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md b/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md new file mode 100644 index 00000000..053d9f98 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md @@ -0,0 +1,10 @@ +# InlineResponse2004Organizations + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**description** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005.md b/sdk/python/sdk/zrok/docs/InlineResponse2005.md new file mode 100644 index 00000000..8f539747 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2005.md @@ -0,0 +1,9 @@ +# InlineResponse2005 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memberships** | [**list[InlineResponse2005Memberships]**](InlineResponse2005Memberships.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md b/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md new file mode 100644 index 00000000..147189c3 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md @@ -0,0 +1,11 @@ +# InlineResponse2005Memberships + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**description** | **str** | | [optional] +**admin** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md b/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md new file mode 100644 index 00000000..2f4ba151 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md @@ -0,0 +1,10 @@ +# InlineResponse2005Organizations + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **str** | | [optional] +**description** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2006.md b/sdk/python/sdk/zrok/docs/InlineResponse2006.md new file mode 100644 index 00000000..7a03d61e --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2006.md @@ -0,0 +1,9 @@ +# InlineResponse2006 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sparklines** | [**list[Metrics]**](Metrics.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md b/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md new file mode 100644 index 00000000..3c6e1efe --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md @@ -0,0 +1,11 @@ +# InlineResponse2006Memberships + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**description** | **str** | | [optional] +**admin** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2007.md b/sdk/python/sdk/zrok/docs/InlineResponse2007.md new file mode 100644 index 00000000..e0914fdd --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2007.md @@ -0,0 +1,9 @@ +# InlineResponse2007 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**controller_version** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse201.md b/sdk/python/sdk/zrok/docs/InlineResponse201.md new file mode 100644 index 00000000..bbe25b94 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse201.md @@ -0,0 +1,9 @@ +# InlineResponse201 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2011.md b/sdk/python/sdk/zrok/docs/InlineResponse2011.md new file mode 100644 index 00000000..8fd74494 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2011.md @@ -0,0 +1,10 @@ +# InlineResponse2011 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity** | **str** | | [optional] +**cfg** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2012.md b/sdk/python/sdk/zrok/docs/InlineResponse2012.md new file mode 100644 index 00000000..a72f2065 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2012.md @@ -0,0 +1,9 @@ +# InlineResponse2012 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2013.md b/sdk/python/sdk/zrok/docs/InlineResponse2013.md new file mode 100644 index 00000000..98930cb2 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2013.md @@ -0,0 +1,10 @@ +# InlineResponse2013 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**backend_mode** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InlineResponse400.md b/sdk/python/sdk/zrok/docs/InlineResponse400.md new file mode 100644 index 00000000..29c731f6 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse400.md @@ -0,0 +1,9 @@ +# InlineResponse400 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/InviteBody.md b/sdk/python/sdk/zrok/docs/InviteBody.md new file mode 100644 index 00000000..0fb2fcb0 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InviteBody.md @@ -0,0 +1,10 @@ +# InviteBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**invite_token** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/LoginBody.md b/sdk/python/sdk/zrok/docs/LoginBody.md new file mode 100644 index 00000000..b877ebb8 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/LoginBody.md @@ -0,0 +1,10 @@ +# LoginBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**password** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/MetadataApi.md b/sdk/python/sdk/zrok/docs/MetadataApi.md new file mode 100644 index 00000000..4d205435 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/MetadataApi.md @@ -0,0 +1,796 @@ +# zrok_api.MetadataApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**client_version_check**](MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | +[**configuration**](MetadataApi.md#configuration) | **GET** /configuration | +[**get_account_detail**](MetadataApi.md#get_account_detail) | **GET** /detail/account | +[**get_account_metrics**](MetadataApi.md#get_account_metrics) | **GET** /metrics/account | +[**get_environment_detail**](MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | +[**get_environment_metrics**](MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | +[**get_frontend_detail**](MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | +[**get_share_detail**](MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | +[**get_share_metrics**](MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | +[**get_sparklines**](MetadataApi.md#get_sparklines) | **POST** /sparklines | +[**list_memberships**](MetadataApi.md#list_memberships) | **GET** /memberships | +[**list_org_members**](MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | +[**org_account_overview**](MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | +[**overview**](MetadataApi.md#overview) | **GET** /overview | +[**version**](MetadataApi.md#version) | **GET** /version | +[**version_inventory**](MetadataApi.md#version_inventory) | **GET** /versions | + +# **client_version_check** +> client_version_check(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = zrok_api.MetadataApi() +body = zrok_api.ClientVersionCheckBody() # ClientVersionCheckBody | (optional) + +try: + api_instance.client_version_check(body=body) +except ApiException as e: + print("Exception when calling MetadataApi->client_version_check: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ClientVersionCheckBody**](ClientVersionCheckBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **configuration** +> Configuration configuration() + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = zrok_api.MetadataApi() + +try: + api_response = api_instance.configuration() + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->configuration: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Configuration**](Configuration.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_account_detail** +> Environments get_account_detail() + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) + +try: + api_response = api_instance.get_account_detail() + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->get_account_detail: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Environments**](Environments.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_account_metrics** +> Metrics get_account_metrics(duration=duration) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +duration = 'duration_example' # str | (optional) + +try: + api_response = api_instance.get_account_metrics(duration=duration) + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **duration** | **str**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_environment_detail** +> EnvironmentAndResources get_environment_detail(env_zid) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +env_zid = 'env_zid_example' # str | + +try: + api_response = api_instance.get_environment_detail(env_zid) + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_zid** | **str**| | + +### Return type + +[**EnvironmentAndResources**](EnvironmentAndResources.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_environment_metrics** +> Metrics get_environment_metrics(env_id, duration=duration) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +env_id = 'env_id_example' # str | +duration = 'duration_example' # str | (optional) + +try: + api_response = api_instance.get_environment_metrics(env_id, duration=duration) + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **str**| | + **duration** | **str**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_frontend_detail** +> Frontend get_frontend_detail(frontend_id) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +frontend_id = 56 # int | + +try: + api_response = api_instance.get_frontend_detail(frontend_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **frontend_id** | **int**| | + +### Return type + +[**Frontend**](Frontend.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_share_detail** +> Share get_share_detail(share_token) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +share_token = 'share_token_example' # str | + +try: + api_response = api_instance.get_share_detail(share_token) + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->get_share_detail: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **share_token** | **str**| | + +### Return type + +[**Share**](Share.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_share_metrics** +> Metrics get_share_metrics(share_token, duration=duration) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +share_token = 'share_token_example' # str | +duration = 'duration_example' # str | (optional) + +try: + api_response = api_instance.get_share_metrics(share_token, duration=duration) + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **share_token** | **str**| | + **duration** | **str**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_sparklines** +> InlineResponse2006 get_sparklines(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +body = zrok_api.SparklinesBody() # SparklinesBody | (optional) + +try: + api_response = api_instance.get_sparklines(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->get_sparklines: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SparklinesBody**](SparklinesBody.md)| | [optional] + +### Return type + +[**InlineResponse2006**](InlineResponse2006.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_memberships** +> InlineResponse2005 list_memberships() + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) + +try: + api_response = api_instance.list_memberships() + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->list_memberships: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InlineResponse2005**](InlineResponse2005.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_org_members** +> InlineResponse2003 list_org_members(organization_token) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +organization_token = 'organization_token_example' # str | + +try: + api_response = api_instance.list_org_members(organization_token) + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->list_org_members: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization_token** | **str**| | + +### Return type + +[**InlineResponse2003**](InlineResponse2003.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **org_account_overview** +> Overview org_account_overview(organization_token, account_email) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +organization_token = 'organization_token_example' # str | +account_email = 'account_email_example' # str | + +try: + api_response = api_instance.org_account_overview(organization_token, account_email) + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->org_account_overview: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization_token** | **str**| | + **account_email** | **str**| | + +### Return type + +[**Overview**](Overview.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **overview** +> Overview overview() + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) + +try: + api_response = api_instance.overview() + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->overview: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Overview**](Overview.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **version** +> Version version() + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = zrok_api.MetadataApi() + +try: + api_response = api_instance.version() + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->version: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Version**](Version.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **version_inventory** +> InlineResponse2007 version_inventory() + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = zrok_api.MetadataApi() + +try: + api_response = api_instance.version_inventory() + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataApi->version_inventory: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InlineResponse2007**](InlineResponse2007.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/Metrics.md b/sdk/python/sdk/zrok/docs/Metrics.md new file mode 100644 index 00000000..0be4994b --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Metrics.md @@ -0,0 +1,12 @@ +# Metrics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **str** | | [optional] +**id** | **str** | | [optional] +**period** | **float** | | [optional] +**samples** | [**list[MetricsSample]**](MetricsSample.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/MetricsSample.md b/sdk/python/sdk/zrok/docs/MetricsSample.md new file mode 100644 index 00000000..60863b05 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/MetricsSample.md @@ -0,0 +1,11 @@ +# MetricsSample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rx** | **float** | | [optional] +**tx** | **float** | | [optional] +**timestamp** | **float** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/OrganizationAddBody.md b/sdk/python/sdk/zrok/docs/OrganizationAddBody.md new file mode 100644 index 00000000..485613d0 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/OrganizationAddBody.md @@ -0,0 +1,11 @@ +# OrganizationAddBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**email** | **str** | | [optional] +**admin** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/OrganizationBody.md b/sdk/python/sdk/zrok/docs/OrganizationBody.md new file mode 100644 index 00000000..014b7e7a --- /dev/null +++ b/sdk/python/sdk/zrok/docs/OrganizationBody.md @@ -0,0 +1,9 @@ +# OrganizationBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/OrganizationBody1.md b/sdk/python/sdk/zrok/docs/OrganizationBody1.md new file mode 100644 index 00000000..2fbaf697 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/OrganizationBody1.md @@ -0,0 +1,9 @@ +# OrganizationBody1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/OrganizationListBody.md b/sdk/python/sdk/zrok/docs/OrganizationListBody.md new file mode 100644 index 00000000..2ceb8a7d --- /dev/null +++ b/sdk/python/sdk/zrok/docs/OrganizationListBody.md @@ -0,0 +1,9 @@ +# OrganizationListBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md b/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md new file mode 100644 index 00000000..f61c0b93 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md @@ -0,0 +1,10 @@ +# OrganizationRemoveBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**email** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/Overview.md b/sdk/python/sdk/zrok/docs/Overview.md new file mode 100644 index 00000000..4d477740 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Overview.md @@ -0,0 +1,10 @@ +# Overview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_limited** | **bool** | | [optional] +**environments** | [**list[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/Principal.md b/sdk/python/sdk/zrok/docs/Principal.md new file mode 100644 index 00000000..c45a677a --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Principal.md @@ -0,0 +1,13 @@ +# Principal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**email** | **str** | | [optional] +**token** | **str** | | [optional] +**limitless** | **bool** | | [optional] +**admin** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md b/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md new file mode 100644 index 00000000..930d7945 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md @@ -0,0 +1,9 @@ +# RegenerateAccountTokenBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_address** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md b/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md new file mode 100644 index 00000000..2c863aba --- /dev/null +++ b/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md @@ -0,0 +1,9 @@ +# RegenerateTokenBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_address** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/RegisterBody.md b/sdk/python/sdk/zrok/docs/RegisterBody.md new file mode 100644 index 00000000..0adc3fc8 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/RegisterBody.md @@ -0,0 +1,10 @@ +# RegisterBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**register_token** | **str** | | [optional] +**password** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/ResetPasswordBody.md b/sdk/python/sdk/zrok/docs/ResetPasswordBody.md new file mode 100644 index 00000000..9f74c6d6 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ResetPasswordBody.md @@ -0,0 +1,10 @@ +# ResetPasswordBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reset_token** | **str** | | [optional] +**password** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md b/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md new file mode 100644 index 00000000..a59834d9 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md @@ -0,0 +1,9 @@ +# ResetPasswordRequestBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_address** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/Share.md b/sdk/python/sdk/zrok/docs/Share.md new file mode 100644 index 00000000..8a5d67ab --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Share.md @@ -0,0 +1,20 @@ +# Share + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**share_token** | **str** | | [optional] +**z_id** | **str** | | [optional] +**share_mode** | **str** | | [optional] +**backend_mode** | **str** | | [optional] +**frontend_selection** | **str** | | [optional] +**frontend_endpoint** | **str** | | [optional] +**backend_proxy_endpoint** | **str** | | [optional] +**reserved** | **bool** | | [optional] +**activity** | [**SparkData**](SparkData.md) | | [optional] +**limited** | **bool** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/ShareApi.md b/sdk/python/sdk/zrok/docs/ShareApi.md new file mode 100644 index 00000000..86a8b390 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ShareApi.md @@ -0,0 +1,315 @@ +# zrok_api.ShareApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**access**](ShareApi.md#access) | **POST** /access | +[**share**](ShareApi.md#share) | **POST** /share | +[**unaccess**](ShareApi.md#unaccess) | **DELETE** /unaccess | +[**unshare**](ShareApi.md#unshare) | **DELETE** /unshare | +[**update_access**](ShareApi.md#update_access) | **PATCH** /access | +[**update_share**](ShareApi.md#update_share) | **PATCH** /share | + +# **access** +> InlineResponse2013 access(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) +body = zrok_api.AccessBody() # AccessBody | (optional) + +try: + api_response = api_instance.access(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling ShareApi->access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**AccessBody**](AccessBody.md)| | [optional] + +### Return type + +[**InlineResponse2013**](InlineResponse2013.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **share** +> ShareResponse share(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) +body = zrok_api.ShareRequest() # ShareRequest | (optional) + +try: + api_response = api_instance.share(body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling ShareApi->share: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ShareRequest**](ShareRequest.md)| | [optional] + +### Return type + +[**ShareResponse**](ShareResponse.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unaccess** +> unaccess(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) +body = zrok_api.UnaccessBody() # UnaccessBody | (optional) + +try: + api_instance.unaccess(body=body) +except ApiException as e: + print("Exception when calling ShareApi->unaccess: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UnaccessBody**](UnaccessBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unshare** +> unshare(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) +body = zrok_api.UnshareBody() # UnshareBody | (optional) + +try: + api_instance.unshare(body=body) +except ApiException as e: + print("Exception when calling ShareApi->unshare: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UnshareBody**](UnshareBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_access** +> update_access(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) +body = zrok_api.AccessBody1() # AccessBody1 | (optional) + +try: + api_instance.update_access(body=body) +except ApiException as e: + print("Exception when calling ShareApi->update_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**AccessBody1**](AccessBody1.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_share** +> update_share(body=body) + + + +### Example +```python +from __future__ import print_function +import time +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: key +configuration = zrok_api.Configuration() +configuration.api_key['x-token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-token'] = 'Bearer' + +# create an instance of the API class +api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) +body = zrok_api.ShareBody() # ShareBody | (optional) + +try: + api_instance.update_share(body=body) +except ApiException as e: + print("Exception when calling ShareApi->update_share: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ShareBody**](ShareBody.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/ShareBody.md b/sdk/python/sdk/zrok/docs/ShareBody.md new file mode 100644 index 00000000..4c01d818 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ShareBody.md @@ -0,0 +1,12 @@ +# ShareBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**share_token** | **str** | | [optional] +**backend_proxy_endpoint** | **str** | | [optional] +**add_access_grants** | **list[str]** | | [optional] +**remove_access_grants** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/ShareRequest.md b/sdk/python/sdk/zrok/docs/ShareRequest.md new file mode 100644 index 00000000..d1054fc7 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ShareRequest.md @@ -0,0 +1,22 @@ +# ShareRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**env_zid** | **str** | | [optional] +**share_mode** | **str** | | [optional] +**frontend_selection** | **list[str]** | | [optional] +**backend_mode** | **str** | | [optional] +**backend_proxy_endpoint** | **str** | | [optional] +**auth_scheme** | **str** | | [optional] +**auth_users** | [**list[AuthUser]**](AuthUser.md) | | [optional] +**oauth_provider** | **str** | | [optional] +**oauth_email_domains** | **list[str]** | | [optional] +**oauth_authorization_check_interval** | **str** | | [optional] +**reserved** | **bool** | | [optional] +**permission_mode** | **str** | | [optional] +**access_grants** | **list[str]** | | [optional] +**unique_name** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/ShareResponse.md b/sdk/python/sdk/zrok/docs/ShareResponse.md new file mode 100644 index 00000000..f6d09e89 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ShareResponse.md @@ -0,0 +1,10 @@ +# ShareResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_proxy_endpoints** | **list[str]** | | [optional] +**share_token** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/Shares.md b/sdk/python/sdk/zrok/docs/Shares.md new file mode 100644 index 00000000..5e8cabd6 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Shares.md @@ -0,0 +1,8 @@ +# Shares + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/SparkData.md b/sdk/python/sdk/zrok/docs/SparkData.md new file mode 100644 index 00000000..a0065208 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/SparkData.md @@ -0,0 +1,8 @@ +# SparkData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/SparkDataSample.md b/sdk/python/sdk/zrok/docs/SparkDataSample.md new file mode 100644 index 00000000..192675b6 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/SparkDataSample.md @@ -0,0 +1,10 @@ +# SparkDataSample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rx** | **float** | | [optional] +**tx** | **float** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/SparklinesBody.md b/sdk/python/sdk/zrok/docs/SparklinesBody.md new file mode 100644 index 00000000..94437504 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/SparklinesBody.md @@ -0,0 +1,11 @@ +# SparklinesBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account** | **bool** | | [optional] +**environments** | **list[str]** | | [optional] +**shares** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/TokenGenerateBody.md b/sdk/python/sdk/zrok/docs/TokenGenerateBody.md new file mode 100644 index 00000000..0622eb92 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/TokenGenerateBody.md @@ -0,0 +1,9 @@ +# TokenGenerateBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_tokens** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/UnaccessBody.md b/sdk/python/sdk/zrok/docs/UnaccessBody.md new file mode 100644 index 00000000..d3bcdfbe --- /dev/null +++ b/sdk/python/sdk/zrok/docs/UnaccessBody.md @@ -0,0 +1,11 @@ +# UnaccessBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/UnshareBody.md b/sdk/python/sdk/zrok/docs/UnshareBody.md new file mode 100644 index 00000000..ec7c4dd1 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/UnshareBody.md @@ -0,0 +1,11 @@ +# UnshareBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] +**reserved** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/VerifyBody.md b/sdk/python/sdk/zrok/docs/VerifyBody.md new file mode 100644 index 00000000..993e6a34 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/VerifyBody.md @@ -0,0 +1,9 @@ +# VerifyBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**register_token** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/Version.md b/sdk/python/sdk/zrok/docs/Version.md new file mode 100644 index 00000000..203ff4a1 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Version.md @@ -0,0 +1,8 @@ +# Version + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/VersionBody.md b/sdk/python/sdk/zrok/docs/VersionBody.md new file mode 100644 index 00000000..43f385ee --- /dev/null +++ b/sdk/python/sdk/zrok/docs/VersionBody.md @@ -0,0 +1,9 @@ +# VersionBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_version** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/docs/VersionCheckBody.md b/sdk/python/sdk/zrok/docs/VersionCheckBody.md new file mode 100644 index 00000000..b00f7a3f --- /dev/null +++ b/sdk/python/sdk/zrok/docs/VersionCheckBody.md @@ -0,0 +1,9 @@ +# VersionCheckBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_version** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdk/python/sdk/zrok/test/__init__.py b/sdk/python/sdk/zrok/test/__init__.py new file mode 100644 index 00000000..576f56f8 --- /dev/null +++ b/sdk/python/sdk/zrok/test/__init__.py @@ -0,0 +1 @@ +# coding: utf-8 \ No newline at end of file diff --git a/sdk/python/sdk/zrok/test/test_access_body.py b/sdk/python/sdk/zrok/test/test_access_body.py new file mode 100644 index 00000000..7e936247 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_access_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.access_body import AccessBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestAccessBody(unittest.TestCase): + """AccessBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccessBody(self): + """Test AccessBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.access_body.AccessBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_access_body1.py b/sdk/python/sdk/zrok/test/test_access_body1.py new file mode 100644 index 00000000..53e78285 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_access_body1.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.access_body1 import AccessBody1 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestAccessBody1(unittest.TestCase): + """AccessBody1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccessBody1(self): + """Test AccessBody1""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.access_body1.AccessBody1() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_account_api.py b/sdk/python/sdk/zrok/test/test_account_api.py new file mode 100644 index 00000000..2a02a258 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_account_api.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.api.account_api import AccountApi # noqa: E501 +from zrok_api.rest import ApiException + + +class TestAccountApi(unittest.TestCase): + """AccountApi unit test stubs""" + + def setUp(self): + self.api = AccountApi() # noqa: E501 + + def tearDown(self): + pass + + def test_change_password(self): + """Test case for change_password + + """ + pass + + def test_invite(self): + """Test case for invite + + """ + pass + + def test_login(self): + """Test case for login + + """ + pass + + def test_regenerate_token(self): + """Test case for regenerate_token + + """ + pass + + def test_register(self): + """Test case for register + + """ + pass + + def test_reset_password(self): + """Test case for reset_password + + """ + pass + + def test_reset_password_request(self): + """Test case for reset_password_request + + """ + pass + + def test_verify(self): + """Test case for verify + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_account_body.py b/sdk/python/sdk/zrok/test/test_account_body.py new file mode 100644 index 00000000..56a6837a --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_account_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.account_body import AccountBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestAccountBody(unittest.TestCase): + """AccountBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccountBody(self): + """Test AccountBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.account_body.AccountBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_admin_api.py b/sdk/python/sdk/zrok/test/test_admin_api.py new file mode 100644 index 00000000..5b9a30b4 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_admin_api.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.api.admin_api import AdminApi # noqa: E501 +from zrok_api.rest import ApiException + + +class TestAdminApi(unittest.TestCase): + """AdminApi unit test stubs""" + + def setUp(self): + self.api = AdminApi() # noqa: E501 + + def tearDown(self): + pass + + def test_add_organization_member(self): + """Test case for add_organization_member + + """ + pass + + def test_create_account(self): + """Test case for create_account + + """ + pass + + def test_create_frontend(self): + """Test case for create_frontend + + """ + pass + + def test_create_identity(self): + """Test case for create_identity + + """ + pass + + def test_create_organization(self): + """Test case for create_organization + + """ + pass + + def test_delete_frontend(self): + """Test case for delete_frontend + + """ + pass + + def test_delete_organization(self): + """Test case for delete_organization + + """ + pass + + def test_grants(self): + """Test case for grants + + """ + pass + + def test_invite_token_generate(self): + """Test case for invite_token_generate + + """ + pass + + def test_list_frontends(self): + """Test case for list_frontends + + """ + pass + + def test_list_organization_members(self): + """Test case for list_organization_members + + """ + pass + + def test_list_organizations(self): + """Test case for list_organizations + + """ + pass + + def test_remove_organization_member(self): + """Test case for remove_organization_member + + """ + pass + + def test_update_frontend(self): + """Test case for update_frontend + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_auth_user.py b/sdk/python/sdk/zrok/test/test_auth_user.py new file mode 100644 index 00000000..3e362a20 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_auth_user.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.auth_user import AuthUser # noqa: E501 +from zrok_api.rest import ApiException + + +class TestAuthUser(unittest.TestCase): + """AuthUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAuthUser(self): + """Test AuthUser""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.auth_user.AuthUser() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_change_password_body.py b/sdk/python/sdk/zrok/test/test_change_password_body.py new file mode 100644 index 00000000..d1ebf600 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_change_password_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.change_password_body import ChangePasswordBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestChangePasswordBody(unittest.TestCase): + """ChangePasswordBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testChangePasswordBody(self): + """Test ChangePasswordBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.change_password_body.ChangePasswordBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_client_version_check_body.py b/sdk/python/sdk/zrok/test/test_client_version_check_body.py new file mode 100644 index 00000000..11fec3f4 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_client_version_check_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.client_version_check_body import ClientVersionCheckBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestClientVersionCheckBody(unittest.TestCase): + """ClientVersionCheckBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testClientVersionCheckBody(self): + """Test ClientVersionCheckBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.client_version_check_body.ClientVersionCheckBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_configuration.py b/sdk/python/sdk/zrok/test/test_configuration.py new file mode 100644 index 00000000..29ad044b --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_configuration.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.configuration import Configuration # noqa: E501 +from zrok_api.rest import ApiException + + +class TestConfiguration(unittest.TestCase): + """Configuration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testConfiguration(self): + """Test Configuration""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.configuration.Configuration() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_disable_body.py b/sdk/python/sdk/zrok/test/test_disable_body.py new file mode 100644 index 00000000..ab342d59 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_disable_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.disable_body import DisableBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestDisableBody(unittest.TestCase): + """DisableBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDisableBody(self): + """Test DisableBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.disable_body.DisableBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_enable_body.py b/sdk/python/sdk/zrok/test/test_enable_body.py new file mode 100644 index 00000000..d3eec4b3 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_enable_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.enable_body import EnableBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestEnableBody(unittest.TestCase): + """EnableBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEnableBody(self): + """Test EnableBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.enable_body.EnableBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environment.py b/sdk/python/sdk/zrok/test/test_environment.py new file mode 100644 index 00000000..3a339b29 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_environment.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.environment import Environment # noqa: E501 +from zrok_api.rest import ApiException + + +class TestEnvironment(unittest.TestCase): + """Environment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEnvironment(self): + """Test Environment""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.environment.Environment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environment_and_resources.py b/sdk/python/sdk/zrok/test/test_environment_and_resources.py new file mode 100644 index 00000000..ab4f4501 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_environment_and_resources.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.environment_and_resources import EnvironmentAndResources # noqa: E501 +from zrok_api.rest import ApiException + + +class TestEnvironmentAndResources(unittest.TestCase): + """EnvironmentAndResources unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEnvironmentAndResources(self): + """Test EnvironmentAndResources""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.environment_and_resources.EnvironmentAndResources() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environment_api.py b/sdk/python/sdk/zrok/test/test_environment_api.py new file mode 100644 index 00000000..c70480e6 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_environment_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.api.environment_api import EnvironmentApi # noqa: E501 +from zrok_api.rest import ApiException + + +class TestEnvironmentApi(unittest.TestCase): + """EnvironmentApi unit test stubs""" + + def setUp(self): + self.api = EnvironmentApi() # noqa: E501 + + def tearDown(self): + pass + + def test_disable(self): + """Test case for disable + + """ + pass + + def test_enable(self): + """Test case for enable + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environments.py b/sdk/python/sdk/zrok/test/test_environments.py new file mode 100644 index 00000000..21972eca --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_environments.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.environments import Environments # noqa: E501 +from zrok_api.rest import ApiException + + +class TestEnvironments(unittest.TestCase): + """Environments unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEnvironments(self): + """Test Environments""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.environments.Environments() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_error_message.py b/sdk/python/sdk/zrok/test/test_error_message.py new file mode 100644 index 00000000..db509710 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_error_message.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.error_message import ErrorMessage # noqa: E501 +from zrok_api.rest import ApiException + + +class TestErrorMessage(unittest.TestCase): + """ErrorMessage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testErrorMessage(self): + """Test ErrorMessage""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.error_message.ErrorMessage() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend.py b/sdk/python/sdk/zrok/test/test_frontend.py new file mode 100644 index 00000000..7b44e3ef --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_frontend.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.frontend import Frontend # noqa: E501 +from zrok_api.rest import ApiException + + +class TestFrontend(unittest.TestCase): + """Frontend unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFrontend(self): + """Test Frontend""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.frontend.Frontend() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend_body.py b/sdk/python/sdk/zrok/test/test_frontend_body.py new file mode 100644 index 00000000..8519edbc --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_frontend_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.frontend_body import FrontendBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestFrontendBody(unittest.TestCase): + """FrontendBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFrontendBody(self): + """Test FrontendBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.frontend_body.FrontendBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend_body1.py b/sdk/python/sdk/zrok/test/test_frontend_body1.py new file mode 100644 index 00000000..5a560aff --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_frontend_body1.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.frontend_body1 import FrontendBody1 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestFrontendBody1(unittest.TestCase): + """FrontendBody1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFrontendBody1(self): + """Test FrontendBody1""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.frontend_body1.FrontendBody1() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend_body2.py b/sdk/python/sdk/zrok/test/test_frontend_body2.py new file mode 100644 index 00000000..c8b2016c --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_frontend_body2.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.frontend_body2 import FrontendBody2 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestFrontendBody2(unittest.TestCase): + """FrontendBody2 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFrontendBody2(self): + """Test FrontendBody2""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.frontend_body2.FrontendBody2() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontends.py b/sdk/python/sdk/zrok/test/test_frontends.py new file mode 100644 index 00000000..cb96d34b --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_frontends.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.frontends import Frontends # noqa: E501 +from zrok_api.rest import ApiException + + +class TestFrontends(unittest.TestCase): + """Frontends unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFrontends(self): + """Test Frontends""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.frontends.Frontends() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_grants_body.py b/sdk/python/sdk/zrok/test/test_grants_body.py new file mode 100644 index 00000000..431fd27b --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_grants_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.grants_body import GrantsBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestGrantsBody(unittest.TestCase): + """GrantsBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGrantsBody(self): + """Test GrantsBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.grants_body.GrantsBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_identity_body.py b/sdk/python/sdk/zrok/test/test_identity_body.py new file mode 100644 index 00000000..b3716d87 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_identity_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.identity_body import IdentityBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestIdentityBody(unittest.TestCase): + """IdentityBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIdentityBody(self): + """Test IdentityBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.identity_body.IdentityBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response200.py b/sdk/python/sdk/zrok/test/test_inline_response200.py new file mode 100644 index 00000000..a447716d --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response200.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response200 import InlineResponse200 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse200(unittest.TestCase): + """InlineResponse200 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse200(self): + """Test InlineResponse200""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response200.InlineResponse200() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2001.py b/sdk/python/sdk/zrok/test/test_inline_response2001.py new file mode 100644 index 00000000..73fc1356 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2001.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2001 import InlineResponse2001 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2001(unittest.TestCase): + """InlineResponse2001 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2001(self): + """Test InlineResponse2001""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2001.InlineResponse2001() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2002.py b/sdk/python/sdk/zrok/test/test_inline_response2002.py new file mode 100644 index 00000000..0230ae38 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2002.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2002 import InlineResponse2002 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2002(unittest.TestCase): + """InlineResponse2002 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2002(self): + """Test InlineResponse2002""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2002.InlineResponse2002() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2003.py b/sdk/python/sdk/zrok/test/test_inline_response2003.py new file mode 100644 index 00000000..dc30845e --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2003.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2003 import InlineResponse2003 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2003(unittest.TestCase): + """InlineResponse2003 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2003(self): + """Test InlineResponse2003""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2003.InlineResponse2003() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2003_members.py b/sdk/python/sdk/zrok/test/test_inline_response2003_members.py new file mode 100644 index 00000000..1fd04fa1 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2003_members.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2003_members import InlineResponse2003Members # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2003Members(unittest.TestCase): + """InlineResponse2003Members unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2003Members(self): + """Test InlineResponse2003Members""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2003_members.InlineResponse2003Members() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004.py b/sdk/python/sdk/zrok/test/test_inline_response2004.py new file mode 100644 index 00000000..264bc094 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2004.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2004 import InlineResponse2004 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2004(unittest.TestCase): + """InlineResponse2004 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2004(self): + """Test InlineResponse2004""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2004.InlineResponse2004() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004_members.py b/sdk/python/sdk/zrok/test/test_inline_response2004_members.py new file mode 100644 index 00000000..7376a0b9 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2004_members.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2004_members import InlineResponse2004Members # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2004Members(unittest.TestCase): + """InlineResponse2004Members unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2004Members(self): + """Test InlineResponse2004Members""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2004_members.InlineResponse2004Members() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py b/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py new file mode 100644 index 00000000..598471e6 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2004Organizations(unittest.TestCase): + """InlineResponse2004Organizations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2004Organizations(self): + """Test InlineResponse2004Organizations""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2004_organizations.InlineResponse2004Organizations() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005.py b/sdk/python/sdk/zrok/test/test_inline_response2005.py new file mode 100644 index 00000000..cf3b41ac --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2005.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2005 import InlineResponse2005 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2005(unittest.TestCase): + """InlineResponse2005 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2005(self): + """Test InlineResponse2005""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2005.InlineResponse2005() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py b/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py new file mode 100644 index 00000000..230a6ac2 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2005Memberships(unittest.TestCase): + """InlineResponse2005Memberships unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2005Memberships(self): + """Test InlineResponse2005Memberships""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2005_memberships.InlineResponse2005Memberships() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py b/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py new file mode 100644 index 00000000..6c3e995e --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2005_organizations import InlineResponse2005Organizations # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2005Organizations(unittest.TestCase): + """InlineResponse2005Organizations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2005Organizations(self): + """Test InlineResponse2005Organizations""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2005_organizations.InlineResponse2005Organizations() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2006.py b/sdk/python/sdk/zrok/test/test_inline_response2006.py new file mode 100644 index 00000000..fd19aa10 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2006.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2006 import InlineResponse2006 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2006(unittest.TestCase): + """InlineResponse2006 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2006(self): + """Test InlineResponse2006""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2006.InlineResponse2006() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py b/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py new file mode 100644 index 00000000..1a779c3e --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2006_memberships import InlineResponse2006Memberships # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2006Memberships(unittest.TestCase): + """InlineResponse2006Memberships unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2006Memberships(self): + """Test InlineResponse2006Memberships""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2006_memberships.InlineResponse2006Memberships() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2007.py b/sdk/python/sdk/zrok/test/test_inline_response2007.py new file mode 100644 index 00000000..52ae67ba --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2007.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2007 import InlineResponse2007 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2007(unittest.TestCase): + """InlineResponse2007 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2007(self): + """Test InlineResponse2007""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2007.InlineResponse2007() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response201.py b/sdk/python/sdk/zrok/test/test_inline_response201.py new file mode 100644 index 00000000..3c719ebd --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response201.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response201 import InlineResponse201 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse201(unittest.TestCase): + """InlineResponse201 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse201(self): + """Test InlineResponse201""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response201.InlineResponse201() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2011.py b/sdk/python/sdk/zrok/test/test_inline_response2011.py new file mode 100644 index 00000000..3594d34c --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2011.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2011 import InlineResponse2011 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2011(unittest.TestCase): + """InlineResponse2011 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2011(self): + """Test InlineResponse2011""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2011.InlineResponse2011() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2012.py b/sdk/python/sdk/zrok/test/test_inline_response2012.py new file mode 100644 index 00000000..cc69a570 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2012.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2012 import InlineResponse2012 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2012(unittest.TestCase): + """InlineResponse2012 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2012(self): + """Test InlineResponse2012""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2012.InlineResponse2012() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2013.py b/sdk/python/sdk/zrok/test/test_inline_response2013.py new file mode 100644 index 00000000..3b028a6c --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2013.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response2013 import InlineResponse2013 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse2013(unittest.TestCase): + """InlineResponse2013 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse2013(self): + """Test InlineResponse2013""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response2013.InlineResponse2013() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response400.py b/sdk/python/sdk/zrok/test/test_inline_response400.py new file mode 100644 index 00000000..13e6f8c6 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response400.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.inline_response400 import InlineResponse400 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInlineResponse400(unittest.TestCase): + """InlineResponse400 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse400(self): + """Test InlineResponse400""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.inline_response400.InlineResponse400() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_invite_body.py b/sdk/python/sdk/zrok/test/test_invite_body.py new file mode 100644 index 00000000..8228bdc0 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_invite_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.invite_body import InviteBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestInviteBody(unittest.TestCase): + """InviteBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInviteBody(self): + """Test InviteBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.invite_body.InviteBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_login_body.py b/sdk/python/sdk/zrok/test/test_login_body.py new file mode 100644 index 00000000..3dd5df4d --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_login_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.login_body import LoginBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestLoginBody(unittest.TestCase): + """LoginBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLoginBody(self): + """Test LoginBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.login_body.LoginBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metadata_api.py b/sdk/python/sdk/zrok/test/test_metadata_api.py new file mode 100644 index 00000000..4d75a9a4 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_metadata_api.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.api.metadata_api import MetadataApi # noqa: E501 +from zrok_api.rest import ApiException + + +class TestMetadataApi(unittest.TestCase): + """MetadataApi unit test stubs""" + + def setUp(self): + self.api = MetadataApi() # noqa: E501 + + def tearDown(self): + pass + + def test_configuration(self): + """Test case for configuration + + """ + pass + + def test_get_account_detail(self): + """Test case for get_account_detail + + """ + pass + + def test_get_account_metrics(self): + """Test case for get_account_metrics + + """ + pass + + def test_get_environment_detail(self): + """Test case for get_environment_detail + + """ + pass + + def test_get_environment_metrics(self): + """Test case for get_environment_metrics + + """ + pass + + def test_get_frontend_detail(self): + """Test case for get_frontend_detail + + """ + pass + + def test_get_share_detail(self): + """Test case for get_share_detail + + """ + pass + + def test_get_share_metrics(self): + """Test case for get_share_metrics + + """ + pass + + def test_get_sparklines(self): + """Test case for get_sparklines + + """ + pass + + def test_list_memberships(self): + """Test case for list_memberships + + """ + pass + + def test_list_org_members(self): + """Test case for list_org_members + + """ + pass + + def test_org_account_overview(self): + """Test case for org_account_overview + + """ + pass + + def test_overview(self): + """Test case for overview + + """ + pass + + def test_version(self): + """Test case for version + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metrics.py b/sdk/python/sdk/zrok/test/test_metrics.py new file mode 100644 index 00000000..71ae9c2a --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_metrics.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.metrics import Metrics # noqa: E501 +from zrok_api.rest import ApiException + + +class TestMetrics(unittest.TestCase): + """Metrics unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMetrics(self): + """Test Metrics""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.metrics.Metrics() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metrics_sample.py b/sdk/python/sdk/zrok/test/test_metrics_sample.py new file mode 100644 index 00000000..19e956f0 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_metrics_sample.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.metrics_sample import MetricsSample # noqa: E501 +from zrok_api.rest import ApiException + + +class TestMetricsSample(unittest.TestCase): + """MetricsSample unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMetricsSample(self): + """Test MetricsSample""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.metrics_sample.MetricsSample() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_add_body.py b/sdk/python/sdk/zrok/test/test_organization_add_body.py new file mode 100644 index 00000000..13274497 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_organization_add_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.organization_add_body import OrganizationAddBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestOrganizationAddBody(unittest.TestCase): + """OrganizationAddBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationAddBody(self): + """Test OrganizationAddBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.organization_add_body.OrganizationAddBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_body.py b/sdk/python/sdk/zrok/test/test_organization_body.py new file mode 100644 index 00000000..05e57436 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_organization_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.organization_body import OrganizationBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestOrganizationBody(unittest.TestCase): + """OrganizationBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationBody(self): + """Test OrganizationBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.organization_body.OrganizationBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_body1.py b/sdk/python/sdk/zrok/test/test_organization_body1.py new file mode 100644 index 00000000..930378cb --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_organization_body1.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.organization_body1 import OrganizationBody1 # noqa: E501 +from zrok_api.rest import ApiException + + +class TestOrganizationBody1(unittest.TestCase): + """OrganizationBody1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationBody1(self): + """Test OrganizationBody1""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.organization_body1.OrganizationBody1() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_list_body.py b/sdk/python/sdk/zrok/test/test_organization_list_body.py new file mode 100644 index 00000000..b43c57e4 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_organization_list_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.organization_list_body import OrganizationListBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestOrganizationListBody(unittest.TestCase): + """OrganizationListBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationListBody(self): + """Test OrganizationListBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.organization_list_body.OrganizationListBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_remove_body.py b/sdk/python/sdk/zrok/test/test_organization_remove_body.py new file mode 100644 index 00000000..07128ed8 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_organization_remove_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.organization_remove_body import OrganizationRemoveBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestOrganizationRemoveBody(unittest.TestCase): + """OrganizationRemoveBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrganizationRemoveBody(self): + """Test OrganizationRemoveBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.organization_remove_body.OrganizationRemoveBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_overview.py b/sdk/python/sdk/zrok/test/test_overview.py new file mode 100644 index 00000000..8a92ad55 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_overview.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.overview import Overview # noqa: E501 +from zrok_api.rest import ApiException + + +class TestOverview(unittest.TestCase): + """Overview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOverview(self): + """Test Overview""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.overview.Overview() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_principal.py b/sdk/python/sdk/zrok/test/test_principal.py new file mode 100644 index 00000000..f38cb221 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_principal.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.principal import Principal # noqa: E501 +from zrok_api.rest import ApiException + + +class TestPrincipal(unittest.TestCase): + """Principal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPrincipal(self): + """Test Principal""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.principal.Principal() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py b/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py new file mode 100644 index 00000000..405b07c4 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestRegenerateAccountTokenBody(unittest.TestCase): + """RegenerateAccountTokenBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRegenerateAccountTokenBody(self): + """Test RegenerateAccountTokenBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.regenerate_account_token_body.RegenerateAccountTokenBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_regenerate_token_body.py b/sdk/python/sdk/zrok/test/test_regenerate_token_body.py new file mode 100644 index 00000000..adfd771e --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_regenerate_token_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.regenerate_token_body import RegenerateTokenBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestRegenerateTokenBody(unittest.TestCase): + """RegenerateTokenBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRegenerateTokenBody(self): + """Test RegenerateTokenBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.regenerate_token_body.RegenerateTokenBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_register_body.py b/sdk/python/sdk/zrok/test/test_register_body.py new file mode 100644 index 00000000..fe72be1e --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_register_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.register_body import RegisterBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestRegisterBody(unittest.TestCase): + """RegisterBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRegisterBody(self): + """Test RegisterBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.register_body.RegisterBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_reset_password_body.py b/sdk/python/sdk/zrok/test/test_reset_password_body.py new file mode 100644 index 00000000..f4c4561d --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_reset_password_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.reset_password_body import ResetPasswordBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestResetPasswordBody(unittest.TestCase): + """ResetPasswordBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResetPasswordBody(self): + """Test ResetPasswordBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.reset_password_body.ResetPasswordBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_reset_password_request_body.py b/sdk/python/sdk/zrok/test/test_reset_password_request_body.py new file mode 100644 index 00000000..d9a3360b --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_reset_password_request_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestResetPasswordRequestBody(unittest.TestCase): + """ResetPasswordRequestBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResetPasswordRequestBody(self): + """Test ResetPasswordRequestBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.reset_password_request_body.ResetPasswordRequestBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share.py b/sdk/python/sdk/zrok/test/test_share.py new file mode 100644 index 00000000..80a16c16 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_share.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.share import Share # noqa: E501 +from zrok_api.rest import ApiException + + +class TestShare(unittest.TestCase): + """Share unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testShare(self): + """Test Share""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.share.Share() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_api.py b/sdk/python/sdk/zrok/test/test_share_api.py new file mode 100644 index 00000000..e799f3c8 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_share_api.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.api.share_api import ShareApi # noqa: E501 +from zrok_api.rest import ApiException + + +class TestShareApi(unittest.TestCase): + """ShareApi unit test stubs""" + + def setUp(self): + self.api = ShareApi() # noqa: E501 + + def tearDown(self): + pass + + def test_access(self): + """Test case for access + + """ + pass + + def test_share(self): + """Test case for share + + """ + pass + + def test_unaccess(self): + """Test case for unaccess + + """ + pass + + def test_unshare(self): + """Test case for unshare + + """ + pass + + def test_update_share(self): + """Test case for update_share + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_body.py b/sdk/python/sdk/zrok/test/test_share_body.py new file mode 100644 index 00000000..fcbdb3a2 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_share_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.share_body import ShareBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestShareBody(unittest.TestCase): + """ShareBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testShareBody(self): + """Test ShareBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.share_body.ShareBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_request.py b/sdk/python/sdk/zrok/test/test_share_request.py new file mode 100644 index 00000000..79abd431 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_share_request.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.share_request import ShareRequest # noqa: E501 +from zrok_api.rest import ApiException + + +class TestShareRequest(unittest.TestCase): + """ShareRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testShareRequest(self): + """Test ShareRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.share_request.ShareRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_response.py b/sdk/python/sdk/zrok/test/test_share_response.py new file mode 100644 index 00000000..e2ef3f94 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_share_response.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.share_response import ShareResponse # noqa: E501 +from zrok_api.rest import ApiException + + +class TestShareResponse(unittest.TestCase): + """ShareResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testShareResponse(self): + """Test ShareResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.share_response.ShareResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_shares.py b/sdk/python/sdk/zrok/test/test_shares.py new file mode 100644 index 00000000..f225a196 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_shares.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.shares import Shares # noqa: E501 +from zrok_api.rest import ApiException + + +class TestShares(unittest.TestCase): + """Shares unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testShares(self): + """Test Shares""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.shares.Shares() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_spark_data.py b/sdk/python/sdk/zrok/test/test_spark_data.py new file mode 100644 index 00000000..0543758e --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_spark_data.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.spark_data import SparkData # noqa: E501 +from zrok_api.rest import ApiException + + +class TestSparkData(unittest.TestCase): + """SparkData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSparkData(self): + """Test SparkData""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.spark_data.SparkData() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_spark_data_sample.py b/sdk/python/sdk/zrok/test/test_spark_data_sample.py new file mode 100644 index 00000000..993babe2 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_spark_data_sample.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.spark_data_sample import SparkDataSample # noqa: E501 +from zrok_api.rest import ApiException + + +class TestSparkDataSample(unittest.TestCase): + """SparkDataSample unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSparkDataSample(self): + """Test SparkDataSample""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.spark_data_sample.SparkDataSample() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_sparklines_body.py b/sdk/python/sdk/zrok/test/test_sparklines_body.py new file mode 100644 index 00000000..00165b62 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_sparklines_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.sparklines_body import SparklinesBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestSparklinesBody(unittest.TestCase): + """SparklinesBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSparklinesBody(self): + """Test SparklinesBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.sparklines_body.SparklinesBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_token_generate_body.py b/sdk/python/sdk/zrok/test/test_token_generate_body.py new file mode 100644 index 00000000..990712d1 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_token_generate_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.token_generate_body import TokenGenerateBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestTokenGenerateBody(unittest.TestCase): + """TokenGenerateBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTokenGenerateBody(self): + """Test TokenGenerateBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.token_generate_body.TokenGenerateBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_unaccess_body.py b/sdk/python/sdk/zrok/test/test_unaccess_body.py new file mode 100644 index 00000000..23e63156 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_unaccess_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.unaccess_body import UnaccessBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestUnaccessBody(unittest.TestCase): + """UnaccessBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUnaccessBody(self): + """Test UnaccessBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.unaccess_body.UnaccessBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_unshare_body.py b/sdk/python/sdk/zrok/test/test_unshare_body.py new file mode 100644 index 00000000..23236afe --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_unshare_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.unshare_body import UnshareBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestUnshareBody(unittest.TestCase): + """UnshareBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUnshareBody(self): + """Test UnshareBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.unshare_body.UnshareBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_verify_body.py b/sdk/python/sdk/zrok/test/test_verify_body.py new file mode 100644 index 00000000..9148441b --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_verify_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.verify_body import VerifyBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestVerifyBody(unittest.TestCase): + """VerifyBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVerifyBody(self): + """Test VerifyBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.verify_body.VerifyBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version.py b/sdk/python/sdk/zrok/test/test_version.py new file mode 100644 index 00000000..cad9c632 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_version.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.version import Version # noqa: E501 +from zrok_api.rest import ApiException + + +class TestVersion(unittest.TestCase): + """Version unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVersion(self): + """Test Version""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.version.Version() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version_body.py b/sdk/python/sdk/zrok/test/test_version_body.py new file mode 100644 index 00000000..1c0a1898 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_version_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.version_body import VersionBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestVersionBody(unittest.TestCase): + """VersionBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVersionBody(self): + """Test VersionBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.version_body.VersionBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version_check_body.py b/sdk/python/sdk/zrok/test/test_version_check_body.py new file mode 100644 index 00000000..5ba46b33 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_version_check_body.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + zrok + + zrok client access # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import zrok_api +from zrok_api.models.version_check_body import VersionCheckBody # noqa: E501 +from zrok_api.rest import ApiException + + +class TestVersionCheckBody(unittest.TestCase): + """VersionCheckBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVersionCheckBody(self): + """Test VersionCheckBody""" + # FIXME: construct object with mandatory attributes with example values + # model = zrok_api.models.version_check_body.VersionCheckBody() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() From 0741c1437d25d68c4ec2c34e96736b867a55a391 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Mon, 3 Mar 2025 17:00:56 -0500 Subject: [PATCH 08/56] pin py 3.13 --- .github/workflows/build-wheels.yml | 2 +- .github/workflows/ci-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 0aad76bc..84fa323c 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -46,7 +46,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: '3.13' - name: Install Python Tools run: python -m pip install -U pip setuptools diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index d13131b3..07970c54 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -64,7 +64,7 @@ jobs: - name: setup python uses: actions/setup-python@v3 with: - python-version: '3.10' + python-version: '3.13' - name: python deps shell: bash From ed18d1ab20599224e7db0695fc7cb81e582fb3e5 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Mon, 3 Mar 2025 17:01:19 -0500 Subject: [PATCH 09/56] use openapi-generator-cli to generate the py sdk instead of swagger-codegen --- bin/generate_rest.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index 16718bbd..b0a7d925 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -53,15 +53,6 @@ rm -rf sdk/nodejs/sdk/src/api openapi-generator-cli generate -i specs/zrok.yml -o sdk/nodejs/sdk/src/api -g typescript-fetch echo "...generating python sdk client" -swagger-codegen generate -i specs/zrok.yml -o sdk/python/sdk/zrok -c $pythonConfig -l python +openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/sdk/zrok -c $pythonConfig -g python git checkout rest_server_zrok/configure_zrok.go - -for OLD in sdk/python/sdk/zrok/git_push.sh sdk/nodejs/sdk/src/zrok/api/git_push.sh -do - if [ -e "$OLD" ] - then - rm "$OLD" - fi -done - From c15f10579eb3c60728f2aefc2e6a1496a01c205b Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Mon, 3 Mar 2025 17:01:46 -0500 Subject: [PATCH 10/56] configure openapi-generator-cli to expect zrok's custom content type --- bin/python_config.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/python_config.json b/bin/python_config.json index 675595b6..83420c09 100644 --- a/bin/python_config.json +++ b/bin/python_config.json @@ -1,4 +1,10 @@ { - "packageName":"zrok_api", - "projectName":"zrok_sdk" -} + "packageName": "zrok_api", + "projectName": "zrok_sdk", + "additionalProperties": { + "jsonMimeTypes": [ + "application/json", + "application/zrok.v1+json" + ] + } +} \ No newline at end of file From ae951510b1b0ed702f62eae4d44a8b94b5e068d9 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Mon, 3 Mar 2025 17:03:32 -0500 Subject: [PATCH 11/56] configure openapi-generator-cli to mask unwanted and custom files --- sdk/python/sdk/zrok/.openapi-generator-ignore | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sdk/python/sdk/zrok/.openapi-generator-ignore diff --git a/sdk/python/sdk/zrok/.openapi-generator-ignore b/sdk/python/sdk/zrok/.openapi-generator-ignore new file mode 100644 index 00000000..0038904a --- /dev/null +++ b/sdk/python/sdk/zrok/.openapi-generator-ignore @@ -0,0 +1,18 @@ +# +## unwanted files should not be generated +# + +git_push.sh +.gitlab-ci.yml +.travis.yml +pyproject.toml +.github/workflows/python.yml +tox.ini +test-requirements.txt + +# +## custom files that must not be overwritten +# + +setup.py +setup.cfg From c13eddc06a36fbd73d459856e962456e4fc71ca8 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Mon, 3 Mar 2025 17:04:15 -0500 Subject: [PATCH 12/56] add the agent UI to local cross-compile script --- docker/images/cross-build/linux-build.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docker/images/cross-build/linux-build.sh b/docker/images/cross-build/linux-build.sh index 04654f4a..269ee4a3 100755 --- a/docker/images/cross-build/linux-build.sh +++ b/docker/images/cross-build/linux-build.sh @@ -29,11 +29,15 @@ fi ( HOME=/tmp/builder # Navigate to the "ui" directory and run npm commands - npm config set cache /mnt/.npm - cd ./ui/ mkdir -p $HOME - npm install - npm run build + npm config set cache /mnt/.npm + for UI in ./ui ./agent/agentUi + do + pushd ${UI} + npm install + npm run build + popd + done ) for ARCH in "${JOBS[@]}"; do From 26ce4eb270ef9c032384f79c057e7aee5d9a02f0 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Mon, 3 Mar 2025 17:07:03 -0500 Subject: [PATCH 13/56] run openapi-generator for python --- sdk/python/sdk/zrok/.gitignore | 2 + sdk/python/sdk/zrok/.openapi-generator/FILES | 125 + .../sdk/zrok/.openapi-generator/VERSION | 1 + sdk/python/sdk/zrok/.swagger-codegen-ignore | 32 - sdk/python/sdk/zrok/README.md | 216 +- sdk/python/sdk/zrok/docs/Access201Response.md | 30 + sdk/python/sdk/zrok/docs/AccessRequest.md | 32 + sdk/python/sdk/zrok/docs/AccountApi.md | 382 +- .../zrok/docs/AddOrganizationMemberRequest.md | 31 + sdk/python/sdk/zrok/docs/AdminApi.md | 785 ++- sdk/python/sdk/zrok/docs/AuthUser.md | 20 + .../sdk/zrok/docs/ChangePasswordRequest.md | 31 + .../zrok/docs/ClientVersionCheckRequest.md | 29 + sdk/python/sdk/zrok/docs/Configuration.md | 20 + .../zrok/docs/CreateFrontend201Response.md | 29 + .../sdk/zrok/docs/CreateFrontendRequest.md | 32 + .../zrok/docs/CreateIdentity201Response.md | 30 + .../sdk/zrok/docs/CreateIdentityRequest.md | 29 + .../docs/CreateOrganization201Response.md | 29 + .../zrok/docs/CreateOrganizationRequest.md | 29 + sdk/python/sdk/zrok/docs/DisableRequest.md | 29 + sdk/python/sdk/zrok/docs/EnableRequest.md | 30 + sdk/python/sdk/zrok/docs/Environment.md | 22 +- .../sdk/zrok/docs/EnvironmentAndResources.md | 24 +- sdk/python/sdk/zrok/docs/EnvironmentApi.md | 114 +- sdk/python/sdk/zrok/docs/Frontend.md | 20 + .../sdk/zrok/docs/GetSparklines200Response.md | 29 + .../sdk/zrok/docs/GetSparklinesRequest.md | 31 + sdk/python/sdk/zrok/docs/InviteRequest.md | 30 + .../zrok/docs/InviteTokenGenerateRequest.md | 29 + .../docs/ListFrontends200ResponseInner.md | 34 + .../zrok/docs/ListMemberships200Response.md | 29 + ...tMemberships200ResponseMembershipsInner.md | 31 + .../ListOrganizationMembers200Response.md | 29 + ...anizationMembers200ResponseMembersInner.md | 30 + .../zrok/docs/ListOrganizations200Response.md | 29 + ...anizations200ResponseOrganizationsInner.md | 30 + sdk/python/sdk/zrok/docs/LoginRequest.md | 30 + sdk/python/sdk/zrok/docs/MetadataApi.md | 819 ++- sdk/python/sdk/zrok/docs/Metrics.md | 22 +- sdk/python/sdk/zrok/docs/MetricsSample.md | 20 + sdk/python/sdk/zrok/docs/Overview.md | 22 +- sdk/python/sdk/zrok/docs/Principal.md | 20 + .../docs/RegenerateAccountToken200Response.md | 29 + .../docs/RegenerateAccountTokenRequest.md | 29 + sdk/python/sdk/zrok/docs/RegisterRequest.md | 30 + .../docs/RemoveOrganizationMemberRequest.md | 30 + .../sdk/zrok/docs/ResetPasswordRequest.md | 30 + sdk/python/sdk/zrok/docs/Share.md | 22 +- sdk/python/sdk/zrok/docs/ShareApi.md | 332 +- sdk/python/sdk/zrok/docs/ShareRequest.md | 28 +- sdk/python/sdk/zrok/docs/ShareResponse.md | 22 +- sdk/python/sdk/zrok/docs/SparkDataSample.md | 20 + sdk/python/sdk/zrok/docs/UnaccessRequest.md | 31 + sdk/python/sdk/zrok/docs/UnshareRequest.md | 31 + .../sdk/zrok/docs/UpdateAccessRequest.md | 31 + .../sdk/zrok/docs/UpdateFrontendRequest.md | 31 + .../sdk/zrok/docs/UpdateShareRequest.md | 32 + sdk/python/sdk/zrok/docs/Verify200Response.md | 29 + sdk/python/sdk/zrok/docs/VerifyRequest.md | 29 + .../zrok/docs/VersionInventory200Response.md | 29 + sdk/python/sdk/zrok/requirements.txt | 6 +- sdk/python/sdk/zrok/test/__init__.py | 1 - .../sdk/zrok/test/test_access201_response.py | 52 + .../sdk/zrok/test/test_access_request.py | 54 + .../test_add_organization_member_request.py | 53 + .../zrok/test/test_change_password_request.py | 53 + .../test/test_client_version_check_request.py | 51 + .../test/test_create_frontend201_response.py | 51 + .../zrok/test/test_create_frontend_request.py | 54 + .../test/test_create_identity201_response.py | 52 + .../zrok/test/test_create_identity_request.py | 51 + .../test_create_organization201_response.py | 51 + .../test/test_create_organization_request.py | 51 + .../sdk/zrok/test/test_disable_request.py | 51 + .../sdk/zrok/test/test_enable_request.py | 52 + sdk/python/sdk/zrok/test/test_frontends.py | 2 +- .../test/test_get_sparklines200_response.py | 62 + .../zrok/test/test_get_sparklines_request.py | 57 + .../sdk/zrok/test/test_invite_request.py | 52 + .../test_invite_token_generate_request.py | 53 + .../test_list_frontends200_response_inner.py | 56 + .../test/test_list_memberships200_response.py | 56 + ...mberships200_response_memberships_inner.py | 53 + ...t_list_organization_members200_response.py | 55 + ...ation_members200_response_members_inner.py | 52 + .../test_list_organizations200_response.py | 55 + ...zations200_response_organizations_inner.py | 52 + .../sdk/zrok/test/test_login_request.py | 52 + ...st_regenerate_account_token200_response.py | 51 + .../test_regenerate_account_token_request.py | 51 + .../sdk/zrok/test/test_register_request.py | 52 + ...test_remove_organization_member_request.py | 52 + .../zrok/test/test_reset_password_request.py | 52 + .../sdk/zrok/test/test_unaccess_request.py | 53 + .../sdk/zrok/test/test_unshare_request.py | 53 + .../zrok/test/test_update_access_request.py | 53 + .../zrok/test/test_update_frontend_request.py | 53 + .../zrok/test/test_update_share_request.py | 58 + .../sdk/zrok/test/test_verify200_response.py | 51 + .../sdk/zrok/test/test_verify_request.py | 51 + .../test_version_inventory200_response.py | 51 + .../sdk/zrok/zrok/api_client_wrapper.py | 50 + sdk/python/sdk/zrok/zrok/environment/root.py | 33 +- sdk/python/sdk/zrok/zrok/overview.py | 4 +- sdk/python/sdk/zrok/zrok_api/__init__.py | 111 +- sdk/python/sdk/zrok/zrok_api/api/__init__.py | 3 +- .../sdk/zrok/zrok_api/api/account_api.py | 2782 ++++++-- sdk/python/sdk/zrok/zrok_api/api/admin_api.py | 4780 ++++++++++---- .../sdk/zrok/zrok_api/api/environment_api.py | 732 ++- .../sdk/zrok/zrok_api/api/metadata_api.py | 5634 ++++++++++++----- sdk/python/sdk/zrok/zrok_api/api/share_api.py | 2101 ++++-- sdk/python/sdk/zrok/zrok_api/api_client.py | 771 ++- sdk/python/sdk/zrok/zrok_api/api_response.py | 21 + sdk/python/sdk/zrok/zrok_api/configuration.py | 402 +- sdk/python/sdk/zrok/zrok_api/exceptions.py | 199 + .../sdk/zrok/zrok_api/models/__init__.py | 100 +- .../zrok_api/models/access201_response.py | 89 + .../sdk/zrok/zrok_api/models/access_body.py | 188 - .../sdk/zrok/zrok_api/models/access_body1.py | 162 - .../zrok/zrok_api/models/access_request.py | 93 + .../sdk/zrok/zrok_api/models/account_body.py | 136 - .../models/add_organization_member_request.py | 91 + .../sdk/zrok/zrok_api/models/auth_user.py | 193 +- .../zrok_api/models/change_password_body.py | 162 - .../models/change_password_request.py | 91 + .../models/client_version_check_body.py | 110 - .../models/client_version_check_request.py | 87 + .../sdk/zrok/zrok_api/models/configuration.py | 277 +- .../models/create_frontend201_response.py | 87 + .../models/create_frontend_request.py | 103 + .../models/create_identity201_response.py | 89 + .../models/create_identity_request.py | 87 + .../models/create_organization201_response.py | 87 + .../models/create_organization_request.py | 87 + .../sdk/zrok/zrok_api/models/disable_body.py | 110 - .../zrok/zrok_api/models/disable_request.py | 87 + .../sdk/zrok/zrok_api/models/enable_body.py | 136 - .../zrok/zrok_api/models/enable_request.py | 89 + .../sdk/zrok/zrok_api/models/environment.py | 369 +- .../models/environment_and_resources.py | 241 +- .../sdk/zrok/zrok_api/models/environments.py | 84 - .../sdk/zrok/zrok_api/models/error_message.py | 84 - .../sdk/zrok/zrok_api/models/frontend.py | 391 +- .../sdk/zrok/zrok_api/models/frontend_body.py | 194 - .../zrok/zrok_api/models/frontend_body1.py | 110 - .../zrok/zrok_api/models/frontend_body2.py | 162 - .../sdk/zrok/zrok_api/models/frontends.py | 84 - .../models/get_sparklines200_response.py | 95 + .../zrok_api/models/get_sparklines_request.py | 91 + .../sdk/zrok/zrok_api/models/grants_body.py | 110 - .../sdk/zrok/zrok_api/models/identity_body.py | 110 - .../zrok_api/models/inline_response200.py | 110 - .../zrok_api/models/inline_response2001.py | 110 - .../zrok_api/models/inline_response2002.py | 240 - .../zrok_api/models/inline_response2003.py | 110 - .../models/inline_response2003_members.py | 136 - .../zrok_api/models/inline_response2004.py | 110 - .../inline_response2004_organizations.py | 136 - .../zrok_api/models/inline_response2005.py | 110 - .../models/inline_response2005_memberships.py | 162 - .../zrok_api/models/inline_response2006.py | 110 - .../zrok_api/models/inline_response2007.py | 110 - .../zrok_api/models/inline_response201.py | 110 - .../zrok_api/models/inline_response2011.py | 136 - .../zrok_api/models/inline_response2012.py | 110 - .../zrok_api/models/inline_response2013.py | 136 - .../sdk/zrok/zrok_api/models/invite_body.py | 136 - .../zrok/zrok_api/models/invite_request.py | 89 + .../models/invite_token_generate_request.py | 87 + .../list_frontends200_response_inner.py | 97 + .../models/list_memberships200_response.py | 95 + ...mberships200_response_memberships_inner.py | 91 + .../list_organization_members200_response.py | 95 + ...ation_members200_response_members_inner.py | 89 + .../models/list_organizations200_response.py | 95 + ...zations200_response_organizations_inner.py | 89 + .../sdk/zrok/zrok_api/models/login_body.py | 136 - .../sdk/zrok/zrok_api/models/login_request.py | 89 + .../sdk/zrok/zrok_api/models/metrics.py | 257 +- .../zrok/zrok_api/models/metrics_sample.py | 221 +- .../zrok_api/models/organization_add_body.py | 162 - .../zrok/zrok_api/models/organization_body.py | 110 - .../zrok_api/models/organization_body1.py | 110 - .../zrok_api/models/organization_list_body.py | 110 - .../models/organization_remove_body.py | 136 - .../sdk/zrok/zrok_api/models/overview.py | 201 +- .../sdk/zrok/zrok_api/models/principal.py | 277 +- .../regenerate_account_token200_response.py | 87 + .../models/regenerate_account_token_body.py | 110 - .../regenerate_account_token_request.py | 87 + .../sdk/zrok/zrok_api/models/register_body.py | 136 - .../zrok/zrok_api/models/register_request.py | 89 + .../remove_organization_member_request.py | 89 + .../zrok_api/models/reset_password_body.py | 136 - .../zrok_api/models/reset_password_request.py | 89 + .../models/reset_password_request_body.py | 110 - sdk/python/sdk/zrok/zrok_api/models/share.py | 483 +- .../sdk/zrok/zrok_api/models/share_body.py | 188 - .../sdk/zrok/zrok_api/models/share_request.py | 599 +- .../zrok/zrok_api/models/share_response.py | 193 +- sdk/python/sdk/zrok/zrok_api/models/shares.py | 84 - .../sdk/zrok/zrok_api/models/spark_data.py | 84 - .../zrok/zrok_api/models/spark_data_sample.py | 193 +- .../zrok/zrok_api/models/sparklines_body.py | 162 - .../zrok_api/models/token_generate_body.py | 110 - .../sdk/zrok/zrok_api/models/unaccess_body.py | 162 - .../zrok/zrok_api/models/unaccess_request.py | 91 + .../sdk/zrok/zrok_api/models/unshare_body.py | 162 - .../zrok/zrok_api/models/unshare_request.py | 91 + .../zrok_api/models/update_access_request.py | 91 + .../models/update_frontend_request.py | 91 + .../zrok_api/models/update_share_request.py | 93 + .../zrok_api/models/verify200_response.py | 87 + .../sdk/zrok/zrok_api/models/verify_body.py | 110 - .../zrok/zrok_api/models/verify_request.py | 87 + .../sdk/zrok/zrok_api/models/version.py | 84 - .../models/version_inventory200_response.py | 87 + sdk/python/sdk/zrok/zrok_api/py.typed | 0 sdk/python/sdk/zrok/zrok_api/rest.py | 352 +- 220 files changed, 23469 insertions(+), 14598 deletions(-) create mode 100644 sdk/python/sdk/zrok/.openapi-generator/FILES create mode 100644 sdk/python/sdk/zrok/.openapi-generator/VERSION delete mode 100644 sdk/python/sdk/zrok/.swagger-codegen-ignore create mode 100644 sdk/python/sdk/zrok/docs/Access201Response.md create mode 100644 sdk/python/sdk/zrok/docs/AccessRequest.md create mode 100644 sdk/python/sdk/zrok/docs/AddOrganizationMemberRequest.md create mode 100644 sdk/python/sdk/zrok/docs/ChangePasswordRequest.md create mode 100644 sdk/python/sdk/zrok/docs/ClientVersionCheckRequest.md create mode 100644 sdk/python/sdk/zrok/docs/CreateFrontend201Response.md create mode 100644 sdk/python/sdk/zrok/docs/CreateFrontendRequest.md create mode 100644 sdk/python/sdk/zrok/docs/CreateIdentity201Response.md create mode 100644 sdk/python/sdk/zrok/docs/CreateIdentityRequest.md create mode 100644 sdk/python/sdk/zrok/docs/CreateOrganization201Response.md create mode 100644 sdk/python/sdk/zrok/docs/CreateOrganizationRequest.md create mode 100644 sdk/python/sdk/zrok/docs/DisableRequest.md create mode 100644 sdk/python/sdk/zrok/docs/EnableRequest.md create mode 100644 sdk/python/sdk/zrok/docs/GetSparklines200Response.md create mode 100644 sdk/python/sdk/zrok/docs/GetSparklinesRequest.md create mode 100644 sdk/python/sdk/zrok/docs/InviteRequest.md create mode 100644 sdk/python/sdk/zrok/docs/InviteTokenGenerateRequest.md create mode 100644 sdk/python/sdk/zrok/docs/ListFrontends200ResponseInner.md create mode 100644 sdk/python/sdk/zrok/docs/ListMemberships200Response.md create mode 100644 sdk/python/sdk/zrok/docs/ListMemberships200ResponseMembershipsInner.md create mode 100644 sdk/python/sdk/zrok/docs/ListOrganizationMembers200Response.md create mode 100644 sdk/python/sdk/zrok/docs/ListOrganizationMembers200ResponseMembersInner.md create mode 100644 sdk/python/sdk/zrok/docs/ListOrganizations200Response.md create mode 100644 sdk/python/sdk/zrok/docs/ListOrganizations200ResponseOrganizationsInner.md create mode 100644 sdk/python/sdk/zrok/docs/LoginRequest.md create mode 100644 sdk/python/sdk/zrok/docs/RegenerateAccountToken200Response.md create mode 100644 sdk/python/sdk/zrok/docs/RegenerateAccountTokenRequest.md create mode 100644 sdk/python/sdk/zrok/docs/RegisterRequest.md create mode 100644 sdk/python/sdk/zrok/docs/RemoveOrganizationMemberRequest.md create mode 100644 sdk/python/sdk/zrok/docs/ResetPasswordRequest.md create mode 100644 sdk/python/sdk/zrok/docs/UnaccessRequest.md create mode 100644 sdk/python/sdk/zrok/docs/UnshareRequest.md create mode 100644 sdk/python/sdk/zrok/docs/UpdateAccessRequest.md create mode 100644 sdk/python/sdk/zrok/docs/UpdateFrontendRequest.md create mode 100644 sdk/python/sdk/zrok/docs/UpdateShareRequest.md create mode 100644 sdk/python/sdk/zrok/docs/Verify200Response.md create mode 100644 sdk/python/sdk/zrok/docs/VerifyRequest.md create mode 100644 sdk/python/sdk/zrok/docs/VersionInventory200Response.md create mode 100644 sdk/python/sdk/zrok/test/test_access201_response.py create mode 100644 sdk/python/sdk/zrok/test/test_access_request.py create mode 100644 sdk/python/sdk/zrok/test/test_add_organization_member_request.py create mode 100644 sdk/python/sdk/zrok/test/test_change_password_request.py create mode 100644 sdk/python/sdk/zrok/test/test_client_version_check_request.py create mode 100644 sdk/python/sdk/zrok/test/test_create_frontend201_response.py create mode 100644 sdk/python/sdk/zrok/test/test_create_frontend_request.py create mode 100644 sdk/python/sdk/zrok/test/test_create_identity201_response.py create mode 100644 sdk/python/sdk/zrok/test/test_create_identity_request.py create mode 100644 sdk/python/sdk/zrok/test/test_create_organization201_response.py create mode 100644 sdk/python/sdk/zrok/test/test_create_organization_request.py create mode 100644 sdk/python/sdk/zrok/test/test_disable_request.py create mode 100644 sdk/python/sdk/zrok/test/test_enable_request.py create mode 100644 sdk/python/sdk/zrok/test/test_get_sparklines200_response.py create mode 100644 sdk/python/sdk/zrok/test/test_get_sparklines_request.py create mode 100644 sdk/python/sdk/zrok/test/test_invite_request.py create mode 100644 sdk/python/sdk/zrok/test/test_invite_token_generate_request.py create mode 100644 sdk/python/sdk/zrok/test/test_list_frontends200_response_inner.py create mode 100644 sdk/python/sdk/zrok/test/test_list_memberships200_response.py create mode 100644 sdk/python/sdk/zrok/test/test_list_memberships200_response_memberships_inner.py create mode 100644 sdk/python/sdk/zrok/test/test_list_organization_members200_response.py create mode 100644 sdk/python/sdk/zrok/test/test_list_organization_members200_response_members_inner.py create mode 100644 sdk/python/sdk/zrok/test/test_list_organizations200_response.py create mode 100644 sdk/python/sdk/zrok/test/test_list_organizations200_response_organizations_inner.py create mode 100644 sdk/python/sdk/zrok/test/test_login_request.py create mode 100644 sdk/python/sdk/zrok/test/test_regenerate_account_token200_response.py create mode 100644 sdk/python/sdk/zrok/test/test_regenerate_account_token_request.py create mode 100644 sdk/python/sdk/zrok/test/test_register_request.py create mode 100644 sdk/python/sdk/zrok/test/test_remove_organization_member_request.py create mode 100644 sdk/python/sdk/zrok/test/test_reset_password_request.py create mode 100644 sdk/python/sdk/zrok/test/test_unaccess_request.py create mode 100644 sdk/python/sdk/zrok/test/test_unshare_request.py create mode 100644 sdk/python/sdk/zrok/test/test_update_access_request.py create mode 100644 sdk/python/sdk/zrok/test/test_update_frontend_request.py create mode 100644 sdk/python/sdk/zrok/test/test_update_share_request.py create mode 100644 sdk/python/sdk/zrok/test/test_verify200_response.py create mode 100644 sdk/python/sdk/zrok/test/test_verify_request.py create mode 100644 sdk/python/sdk/zrok/test/test_version_inventory200_response.py create mode 100644 sdk/python/sdk/zrok/zrok/api_client_wrapper.py create mode 100644 sdk/python/sdk/zrok/zrok_api/api_response.py create mode 100644 sdk/python/sdk/zrok/zrok_api/exceptions.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/access201_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/access_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/access_body1.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/access_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/account_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/add_organization_member_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/change_password_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/change_password_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/client_version_check_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_frontend201_response.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_identity201_response.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_identity_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_organization201_response.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_organization_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/disable_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/disable_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/enable_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/enable_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/environments.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/error_message.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/frontend_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/frontends.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/get_sparklines_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/grants_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/identity_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response200.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response201.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/invite_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/invite_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_frontends200_response_inner.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response_memberships_inner.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response_members_inner.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response_organizations_inner.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/login_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/login_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/organization_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/organization_body1.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token200_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/register_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/register_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/remove_organization_member_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/share_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/shares.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/spark_data.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/unshare_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/unshare_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/update_access_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/update_share_request.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/verify200_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/verify_body.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/verify_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/version.py create mode 100644 sdk/python/sdk/zrok/zrok_api/models/version_inventory200_response.py create mode 100644 sdk/python/sdk/zrok/zrok_api/py.typed diff --git a/sdk/python/sdk/zrok/.gitignore b/sdk/python/sdk/zrok/.gitignore index a655050c..43995bd4 100644 --- a/sdk/python/sdk/zrok/.gitignore +++ b/sdk/python/sdk/zrok/.gitignore @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/sdk/python/sdk/zrok/.openapi-generator/FILES b/sdk/python/sdk/zrok/.openapi-generator/FILES new file mode 100644 index 00000000..1b02d80f --- /dev/null +++ b/sdk/python/sdk/zrok/.openapi-generator/FILES @@ -0,0 +1,125 @@ +.gitignore +README.md +docs/Access201Response.md +docs/AccessRequest.md +docs/AccountApi.md +docs/AddOrganizationMemberRequest.md +docs/AdminApi.md +docs/AuthUser.md +docs/ChangePasswordRequest.md +docs/ClientVersionCheckRequest.md +docs/Configuration.md +docs/CreateFrontend201Response.md +docs/CreateFrontendRequest.md +docs/CreateIdentity201Response.md +docs/CreateIdentityRequest.md +docs/CreateOrganization201Response.md +docs/CreateOrganizationRequest.md +docs/DisableRequest.md +docs/EnableRequest.md +docs/Environment.md +docs/EnvironmentAndResources.md +docs/EnvironmentApi.md +docs/Frontend.md +docs/GetSparklines200Response.md +docs/GetSparklinesRequest.md +docs/InviteRequest.md +docs/InviteTokenGenerateRequest.md +docs/ListFrontends200ResponseInner.md +docs/ListMemberships200Response.md +docs/ListMemberships200ResponseMembershipsInner.md +docs/ListOrganizationMembers200Response.md +docs/ListOrganizationMembers200ResponseMembersInner.md +docs/ListOrganizations200Response.md +docs/ListOrganizations200ResponseOrganizationsInner.md +docs/LoginRequest.md +docs/MetadataApi.md +docs/Metrics.md +docs/MetricsSample.md +docs/Overview.md +docs/Principal.md +docs/RegenerateAccountToken200Response.md +docs/RegenerateAccountTokenRequest.md +docs/RegisterRequest.md +docs/RemoveOrganizationMemberRequest.md +docs/ResetPasswordRequest.md +docs/Share.md +docs/ShareApi.md +docs/ShareRequest.md +docs/ShareResponse.md +docs/SparkDataSample.md +docs/UnaccessRequest.md +docs/UnshareRequest.md +docs/UpdateAccessRequest.md +docs/UpdateFrontendRequest.md +docs/UpdateShareRequest.md +docs/Verify200Response.md +docs/VerifyRequest.md +docs/VersionInventory200Response.md +requirements.txt +test/__init__.py +zrok_api/__init__.py +zrok_api/api/__init__.py +zrok_api/api/account_api.py +zrok_api/api/admin_api.py +zrok_api/api/environment_api.py +zrok_api/api/metadata_api.py +zrok_api/api/share_api.py +zrok_api/api_client.py +zrok_api/api_response.py +zrok_api/configuration.py +zrok_api/exceptions.py +zrok_api/models/__init__.py +zrok_api/models/access201_response.py +zrok_api/models/access_request.py +zrok_api/models/add_organization_member_request.py +zrok_api/models/auth_user.py +zrok_api/models/change_password_request.py +zrok_api/models/client_version_check_request.py +zrok_api/models/configuration.py +zrok_api/models/create_frontend201_response.py +zrok_api/models/create_frontend_request.py +zrok_api/models/create_identity201_response.py +zrok_api/models/create_identity_request.py +zrok_api/models/create_organization201_response.py +zrok_api/models/create_organization_request.py +zrok_api/models/disable_request.py +zrok_api/models/enable_request.py +zrok_api/models/environment.py +zrok_api/models/environment_and_resources.py +zrok_api/models/frontend.py +zrok_api/models/get_sparklines200_response.py +zrok_api/models/get_sparklines_request.py +zrok_api/models/invite_request.py +zrok_api/models/invite_token_generate_request.py +zrok_api/models/list_frontends200_response_inner.py +zrok_api/models/list_memberships200_response.py +zrok_api/models/list_memberships200_response_memberships_inner.py +zrok_api/models/list_organization_members200_response.py +zrok_api/models/list_organization_members200_response_members_inner.py +zrok_api/models/list_organizations200_response.py +zrok_api/models/list_organizations200_response_organizations_inner.py +zrok_api/models/login_request.py +zrok_api/models/metrics.py +zrok_api/models/metrics_sample.py +zrok_api/models/overview.py +zrok_api/models/principal.py +zrok_api/models/regenerate_account_token200_response.py +zrok_api/models/regenerate_account_token_request.py +zrok_api/models/register_request.py +zrok_api/models/remove_organization_member_request.py +zrok_api/models/reset_password_request.py +zrok_api/models/share.py +zrok_api/models/share_request.py +zrok_api/models/share_response.py +zrok_api/models/spark_data_sample.py +zrok_api/models/unaccess_request.py +zrok_api/models/unshare_request.py +zrok_api/models/update_access_request.py +zrok_api/models/update_frontend_request.py +zrok_api/models/update_share_request.py +zrok_api/models/verify200_response.py +zrok_api/models/verify_request.py +zrok_api/models/version_inventory200_response.py +zrok_api/py.typed +zrok_api/rest.py diff --git a/sdk/python/sdk/zrok/.openapi-generator/VERSION b/sdk/python/sdk/zrok/.openapi-generator/VERSION new file mode 100644 index 00000000..1985849f --- /dev/null +++ b/sdk/python/sdk/zrok/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.7.0 diff --git a/sdk/python/sdk/zrok/.swagger-codegen-ignore b/sdk/python/sdk/zrok/.swagger-codegen-ignore deleted file mode 100644 index f86cf33f..00000000 --- a/sdk/python/sdk/zrok/.swagger-codegen-ignore +++ /dev/null @@ -1,32 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md - -.travis.yml -git_push.sh -tox.ini -test-requirements.txt -test/ -docs/ -README.md -setup.py diff --git a/sdk/python/sdk/zrok/README.md b/sdk/python/sdk/zrok/README.md index 1ec5f374..b337c9e0 100644 --- a/sdk/python/sdk/zrok/README.md +++ b/sdk/python/sdk/zrok/README.md @@ -1,21 +1,21 @@ # zrok_sdk - zrok client access -This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 - Package version: 1.0.0 -- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen +- Generator version: 7.7.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. -Python 2.7 and 3.4+ +Python 3.7+ ## Installation & Usage ### pip install -If the python package is hosted on Github, you can install directly from Github +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 @@ -24,7 +24,7 @@ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git Then import the package: ```python -import zrok_api +import zrok_api ``` ### Setuptools @@ -41,104 +41,49 @@ Then import the package: import zrok_api ``` +### Tests + +Execute `pytest` to run the tests. + ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: ```python -from __future__ import print_function -import time + import zrok_api from zrok_api.rest import ApiException from pprint import pprint -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ChangePasswordBody() # ChangePasswordBody | (optional) - -try: - api_instance.change_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.InviteBody() # InviteBody | (optional) - -try: - api_instance.invite(body=body) -except ApiException as e: - print("Exception when calling AccountApi->invite: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.LoginBody() # LoginBody | (optional) - -try: - api_response = api_instance.login(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->login: %s\n" % e) +# 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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.RegenerateAccountTokenBody() # RegenerateAccountTokenBody | (optional) -try: - api_response = api_instance.regenerate_account_token(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.RegisterBody() # RegisterBody | (optional) + try: + api_instance.change_password(body=body) + except ApiException as e: + print("Exception when calling AccountApi->change_password: %s\n" % e) -try: - api_response = api_instance.register(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->register: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ResetPasswordBody() # ResetPasswordBody | (optional) - -try: - api_instance.reset_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ResetPasswordRequestBody() # ResetPasswordRequestBody | (optional) - -try: - api_instance.reset_password_request(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password_request: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.VerifyBody() # VerifyBody | (optional) - -try: - api_response = api_instance.verify(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->verify: %s\n" % e) ``` ## Documentation for API Endpoints @@ -194,76 +139,69 @@ Class | Method | HTTP request | Description *ShareApi* | [**update_access**](docs/ShareApi.md#update_access) | **PATCH** /access | *ShareApi* | [**update_share**](docs/ShareApi.md#update_share) | **PATCH** /share | + ## Documentation For Models - - [AccessBody](docs/AccessBody.md) - - [AccessBody1](docs/AccessBody1.md) - - [AccountBody](docs/AccountBody.md) + - [Access201Response](docs/Access201Response.md) + - [AccessRequest](docs/AccessRequest.md) + - [AddOrganizationMemberRequest](docs/AddOrganizationMemberRequest.md) - [AuthUser](docs/AuthUser.md) - - [ChangePasswordBody](docs/ChangePasswordBody.md) - - [ClientVersionCheckBody](docs/ClientVersionCheckBody.md) + - [ChangePasswordRequest](docs/ChangePasswordRequest.md) + - [ClientVersionCheckRequest](docs/ClientVersionCheckRequest.md) - [Configuration](docs/Configuration.md) - - [DisableBody](docs/DisableBody.md) - - [EnableBody](docs/EnableBody.md) + - [CreateFrontend201Response](docs/CreateFrontend201Response.md) + - [CreateFrontendRequest](docs/CreateFrontendRequest.md) + - [CreateIdentity201Response](docs/CreateIdentity201Response.md) + - [CreateIdentityRequest](docs/CreateIdentityRequest.md) + - [CreateOrganization201Response](docs/CreateOrganization201Response.md) + - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md) + - [DisableRequest](docs/DisableRequest.md) + - [EnableRequest](docs/EnableRequest.md) - [Environment](docs/Environment.md) - [EnvironmentAndResources](docs/EnvironmentAndResources.md) - - [Environments](docs/Environments.md) - - [ErrorMessage](docs/ErrorMessage.md) - [Frontend](docs/Frontend.md) - - [FrontendBody](docs/FrontendBody.md) - - [FrontendBody1](docs/FrontendBody1.md) - - [FrontendBody2](docs/FrontendBody2.md) - - [Frontends](docs/Frontends.md) - - [GrantsBody](docs/GrantsBody.md) - - [IdentityBody](docs/IdentityBody.md) - - [InlineResponse200](docs/InlineResponse200.md) - - [InlineResponse2001](docs/InlineResponse2001.md) - - [InlineResponse2002](docs/InlineResponse2002.md) - - [InlineResponse2003](docs/InlineResponse2003.md) - - [InlineResponse2003Members](docs/InlineResponse2003Members.md) - - [InlineResponse2004](docs/InlineResponse2004.md) - - [InlineResponse2004Organizations](docs/InlineResponse2004Organizations.md) - - [InlineResponse2005](docs/InlineResponse2005.md) - - [InlineResponse2005Memberships](docs/InlineResponse2005Memberships.md) - - [InlineResponse2006](docs/InlineResponse2006.md) - - [InlineResponse2007](docs/InlineResponse2007.md) - - [InlineResponse201](docs/InlineResponse201.md) - - [InlineResponse2011](docs/InlineResponse2011.md) - - [InlineResponse2012](docs/InlineResponse2012.md) - - [InlineResponse2013](docs/InlineResponse2013.md) - - [InviteBody](docs/InviteBody.md) - - [LoginBody](docs/LoginBody.md) + - [GetSparklines200Response](docs/GetSparklines200Response.md) + - [GetSparklinesRequest](docs/GetSparklinesRequest.md) + - [InviteRequest](docs/InviteRequest.md) + - [InviteTokenGenerateRequest](docs/InviteTokenGenerateRequest.md) + - [ListFrontends200ResponseInner](docs/ListFrontends200ResponseInner.md) + - [ListMemberships200Response](docs/ListMemberships200Response.md) + - [ListMemberships200ResponseMembershipsInner](docs/ListMemberships200ResponseMembershipsInner.md) + - [ListOrganizationMembers200Response](docs/ListOrganizationMembers200Response.md) + - [ListOrganizationMembers200ResponseMembersInner](docs/ListOrganizationMembers200ResponseMembersInner.md) + - [ListOrganizations200Response](docs/ListOrganizations200Response.md) + - [ListOrganizations200ResponseOrganizationsInner](docs/ListOrganizations200ResponseOrganizationsInner.md) + - [LoginRequest](docs/LoginRequest.md) - [Metrics](docs/Metrics.md) - [MetricsSample](docs/MetricsSample.md) - - [OrganizationAddBody](docs/OrganizationAddBody.md) - - [OrganizationBody](docs/OrganizationBody.md) - - [OrganizationBody1](docs/OrganizationBody1.md) - - [OrganizationListBody](docs/OrganizationListBody.md) - - [OrganizationRemoveBody](docs/OrganizationRemoveBody.md) - [Overview](docs/Overview.md) - [Principal](docs/Principal.md) - - [RegenerateAccountTokenBody](docs/RegenerateAccountTokenBody.md) - - [RegisterBody](docs/RegisterBody.md) - - [ResetPasswordBody](docs/ResetPasswordBody.md) - - [ResetPasswordRequestBody](docs/ResetPasswordRequestBody.md) + - [RegenerateAccountToken200Response](docs/RegenerateAccountToken200Response.md) + - [RegenerateAccountTokenRequest](docs/RegenerateAccountTokenRequest.md) + - [RegisterRequest](docs/RegisterRequest.md) + - [RemoveOrganizationMemberRequest](docs/RemoveOrganizationMemberRequest.md) + - [ResetPasswordRequest](docs/ResetPasswordRequest.md) - [Share](docs/Share.md) - - [ShareBody](docs/ShareBody.md) - [ShareRequest](docs/ShareRequest.md) - [ShareResponse](docs/ShareResponse.md) - - [Shares](docs/Shares.md) - - [SparkData](docs/SparkData.md) - [SparkDataSample](docs/SparkDataSample.md) - - [SparklinesBody](docs/SparklinesBody.md) - - [TokenGenerateBody](docs/TokenGenerateBody.md) - - [UnaccessBody](docs/UnaccessBody.md) - - [UnshareBody](docs/UnshareBody.md) - - [VerifyBody](docs/VerifyBody.md) - - [Version](docs/Version.md) + - [UnaccessRequest](docs/UnaccessRequest.md) + - [UnshareRequest](docs/UnshareRequest.md) + - [UpdateAccessRequest](docs/UpdateAccessRequest.md) + - [UpdateFrontendRequest](docs/UpdateFrontendRequest.md) + - [UpdateShareRequest](docs/UpdateShareRequest.md) + - [Verify200Response](docs/Verify200Response.md) + - [VerifyRequest](docs/VerifyRequest.md) + - [VersionInventory200Response](docs/VersionInventory200Response.md) + + ## Documentation For Authorization -## key +Authentication schemes defined for the API: + +### key - **Type**: API key - **API key parameter name**: x-token @@ -273,3 +211,5 @@ Class | Method | HTTP request | Description ## Author + + diff --git a/sdk/python/sdk/zrok/docs/Access201Response.md b/sdk/python/sdk/zrok/docs/Access201Response.md new file mode 100644 index 00000000..bc12a97a --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Access201Response.md @@ -0,0 +1,30 @@ +# Access201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**backend_mode** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.access201_response import Access201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of Access201Response from a JSON string +access201_response_instance = Access201Response.from_json(json) +# print the JSON string representation of the object +print(Access201Response.to_json()) + +# convert the object into a dict +access201_response_dict = access201_response_instance.to_dict() +# create an instance of Access201Response from a dict +access201_response_from_dict = Access201Response.from_dict(access201_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/sdk/python/sdk/zrok/docs/AccessRequest.md b/sdk/python/sdk/zrok/docs/AccessRequest.md new file mode 100644 index 00000000..288b82ae --- /dev/null +++ b/sdk/python/sdk/zrok/docs/AccessRequest.md @@ -0,0 +1,32 @@ +# AccessRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] +**bind_address** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.access_request import AccessRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AccessRequest from a JSON string +access_request_instance = AccessRequest.from_json(json) +# print the JSON string representation of the object +print(AccessRequest.to_json()) + +# convert the object into a dict +access_request_dict = access_request_instance.to_dict() +# create an instance of AccessRequest from a dict +access_request_from_dict = AccessRequest.from_dict(access_request_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/sdk/python/sdk/zrok/docs/AccountApi.md b/sdk/python/sdk/zrok/docs/AccountApi.md index 531caa12..669bfbc6 100644 --- a/sdk/python/sdk/zrok/docs/AccountApi.md +++ b/sdk/python/sdk/zrok/docs/AccountApi.md @@ -13,40 +13,59 @@ Method | HTTP request | Description [**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | [**verify**](AccountApi.md#verify) | **POST** /verify | + # **change_password** > change_password(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.change_password_request import ChangePasswordRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ChangePasswordBody() # ChangePasswordBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) -try: - api_instance.change_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) + try: + api_instance.change_password(body=body) + except Exception as e: + print("Exception when calling AccountApi->change_password: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ChangePasswordBody**](ChangePasswordBody.md)| | [optional] + **body** | [**ChangePasswordRequest**](ChangePasswordRequest.md)| | [optional] ### Return type @@ -61,6 +80,16 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | password changed | - | +**400** | password not changed | - | +**401** | unauthorized | - | +**422** | password validation failure | - | +**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) # **invite** @@ -69,28 +98,41 @@ void (empty response body) ### Example + + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.invite_request import InviteRequest from zrok_api.rest import ApiException from pprint import pprint -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.InviteBody() # InviteBody | (optional) +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) -try: - api_instance.invite(body=body) -except ApiException as e: - print("Exception when calling AccountApi->invite: %s\n" % e) + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.InviteRequest() # InviteRequest | (optional) + + try: + api_instance.invite(body=body) + except Exception as e: + print("Exception when calling AccountApi->invite: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**InviteBody**](InviteBody.md)| | [optional] + **body** | [**InviteRequest**](InviteRequest.md)| | [optional] ### Return type @@ -105,6 +147,15 @@ No authorization required - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | invitation created | - | +**400** | invitation not created (already exists) | - | +**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) # **login** @@ -113,29 +164,43 @@ No authorization required ### Example + + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.login_request import LoginRequest from zrok_api.rest import ApiException from pprint import pprint -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.LoginBody() # LoginBody | (optional) +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) -try: - api_response = api_instance.login(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->login: %s\n" % e) + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.LoginRequest() # LoginRequest | (optional) + + try: + api_response = api_instance.login(body=body) + print("The response of AccountApi->login:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->login: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**LoginBody**](LoginBody.md)| | [optional] + **body** | [**LoginRequest**](LoginRequest.md)| | [optional] ### Return type @@ -150,47 +215,74 @@ No authorization required - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | login successful | - | +**401** | invalid login | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **regenerate_account_token** -> InlineResponse200 regenerate_account_token(body=body) +> RegenerateAccountToken200Response regenerate_account_token(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.RegenerateAccountTokenBody() # RegenerateAccountTokenBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) -try: - api_response = api_instance.regenerate_account_token(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) + try: + api_response = api_instance.regenerate_account_token(body=body) + print("The response of AccountApi->regenerate_account_token:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**RegenerateAccountTokenBody**](RegenerateAccountTokenBody.md)| | [optional] + **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) ### Authorization @@ -201,41 +293,64 @@ Name | Type | Description | Notes - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | regenerate account token | - | +**404** | account 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) # **register** -> InlineResponse200 register(body=body) +> RegenerateAccountToken200Response register(body=body) ### Example + + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.register_request import RegisterRequest from zrok_api.rest import ApiException from pprint import pprint -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.RegisterBody() # RegisterBody | (optional) +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) -try: - api_response = api_instance.register(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->register: %s\n" % e) + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.RegisterRequest() # RegisterRequest | (optional) + + try: + api_response = api_instance.register(body=body) + print("The response of AccountApi->register:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->register: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**RegisterBody**](RegisterBody.md)| | [optional] + **body** | [**RegisterRequest**](RegisterRequest.md)| | [optional] ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) ### Authorization @@ -246,6 +361,15 @@ No authorization required - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | account created | - | +**404** | request not found | - | +**422** | password validation failure | - | +**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) # **reset_password** @@ -254,28 +378,41 @@ No authorization required ### Example + + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.reset_password_request import ResetPasswordRequest from zrok_api.rest import ApiException from pprint import pprint -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.ResetPasswordBody() # ResetPasswordBody | (optional) +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) -try: - api_instance.reset_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password: %s\n" % e) + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.ResetPasswordRequest() # ResetPasswordRequest | (optional) + + try: + api_instance.reset_password(body=body) + except Exception as e: + print("Exception when calling AccountApi->reset_password: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ResetPasswordBody**](ResetPasswordBody.md)| | [optional] + **body** | [**ResetPasswordRequest**](ResetPasswordRequest.md)| | [optional] ### Return type @@ -290,6 +427,15 @@ No authorization required - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | password reset | - | +**404** | request not found | - | +**422** | password validation failure | - | +**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) # **reset_password_request** @@ -298,28 +444,41 @@ No authorization required ### Example + + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest from zrok_api.rest import ApiException from pprint import pprint -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.ResetPasswordRequestBody() # ResetPasswordRequestBody | (optional) +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) -try: - api_instance.reset_password_request(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password_request: %s\n" % e) + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) + + try: + api_instance.reset_password_request(body=body) + except Exception as e: + print("Exception when calling AccountApi->reset_password_request: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ResetPasswordRequestBody**](ResetPasswordRequestBody.md)| | [optional] + **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] ### Return type @@ -334,41 +493,64 @@ No authorization required - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | reset password request created | - | +**400** | reset password request not created | - | +**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) # **verify** -> InlineResponse2001 verify(body=body) +> Verify200Response verify(body=body) ### Example + + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest from zrok_api.rest import ApiException from pprint import pprint -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.VerifyBody() # VerifyBody | (optional) +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) -try: - api_response = api_instance.verify(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->verify: %s\n" % e) + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.VerifyRequest() # VerifyRequest | (optional) + + try: + api_response = api_instance.verify(body=body) + print("The response of AccountApi->verify:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->verify: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**VerifyBody**](VerifyBody.md)| | [optional] + **body** | [**VerifyRequest**](VerifyRequest.md)| | [optional] ### Return type -[**InlineResponse2001**](InlineResponse2001.md) +[**Verify200Response**](Verify200Response.md) ### Authorization @@ -379,5 +561,13 @@ No authorization required - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | registration token ready | - | +**404** | registration token 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/sdk/python/sdk/zrok/docs/AddOrganizationMemberRequest.md b/sdk/python/sdk/zrok/docs/AddOrganizationMemberRequest.md new file mode 100644 index 00000000..c866784a --- /dev/null +++ b/sdk/python/sdk/zrok/docs/AddOrganizationMemberRequest.md @@ -0,0 +1,31 @@ +# AddOrganizationMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**email** | **str** | | [optional] +**admin** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AddOrganizationMemberRequest from a JSON string +add_organization_member_request_instance = AddOrganizationMemberRequest.from_json(json) +# print the JSON string representation of the object +print(AddOrganizationMemberRequest.to_json()) + +# convert the object into a dict +add_organization_member_request_dict = add_organization_member_request_instance.to_dict() +# create an instance of AddOrganizationMemberRequest from a dict +add_organization_member_request_from_dict = AddOrganizationMemberRequest.from_dict(add_organization_member_request_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/sdk/python/sdk/zrok/docs/AdminApi.md b/sdk/python/sdk/zrok/docs/AdminApi.md index 34977dd4..153aa3ea 100644 --- a/sdk/python/sdk/zrok/docs/AdminApi.md +++ b/sdk/python/sdk/zrok/docs/AdminApi.md @@ -19,40 +19,59 @@ Method | HTTP request | Description [**remove_organization_member**](AdminApi.md#remove_organization_member) | **POST** /organization/remove | [**update_frontend**](AdminApi.md#update_frontend) | **PATCH** /frontend | + # **add_organization_member** > add_organization_member(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationAddBody() # OrganizationAddBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.AddOrganizationMemberRequest() # AddOrganizationMemberRequest | (optional) -try: - api_instance.add_organization_member(body=body) -except ApiException as e: - print("Exception when calling AdminApi->add_organization_member: %s\n" % e) + try: + api_instance.add_organization_member(body=body) + except Exception as e: + print("Exception when calling AdminApi->add_organization_member: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationAddBody**](OrganizationAddBody.md)| | [optional] + **body** | [**AddOrganizationMemberRequest**](AddOrganizationMemberRequest.md)| | [optional] ### Return type @@ -67,47 +86,76 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | member added | - | +**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_account** -> InlineResponse200 create_account(body=body) +> RegenerateAccountToken200Response create_account(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.AccountBody() # AccountBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.LoginRequest() # LoginRequest | (optional) -try: - api_response = api_instance.create_account(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_account: %s\n" % e) + try: + api_response = api_instance.create_account(body=body) + print("The response of AdminApi->create_account:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_account: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**AccountBody**](AccountBody.md)| | [optional] + **body** | [**LoginRequest**](LoginRequest.md)| | [optional] ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) ### Authorization @@ -118,47 +166,75 @@ Name | Type | Description | Notes - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | created | - | +**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) # **create_frontend** -> InlineResponse201 create_frontend(body=body) +> CreateFrontend201Response create_frontend(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.FrontendBody() # FrontendBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateFrontendRequest() # CreateFrontendRequest | (optional) -try: - api_response = api_instance.create_frontend(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_frontend: %s\n" % e) + try: + api_response = api_instance.create_frontend(body=body) + print("The response of AdminApi->create_frontend:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_frontend: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**FrontendBody**](FrontendBody.md)| | [optional] + **body** | [**CreateFrontendRequest**](CreateFrontendRequest.md)| | [optional] ### Return type -[**InlineResponse201**](InlineResponse201.md) +[**CreateFrontend201Response**](CreateFrontend201Response.md) ### Authorization @@ -169,47 +245,77 @@ Name | Type | Description | Notes - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | frontend created | - | +**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_identity** -> InlineResponse2011 create_identity(body=body) +> CreateIdentity201Response create_identity(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.IdentityBody() # IdentityBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateIdentityRequest() # CreateIdentityRequest | (optional) -try: - api_response = api_instance.create_identity(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_identity: %s\n" % e) + try: + api_response = api_instance.create_identity(body=body) + print("The response of AdminApi->create_identity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_identity: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**IdentityBody**](IdentityBody.md)| | [optional] + **body** | [**CreateIdentityRequest**](CreateIdentityRequest.md)| | [optional] ### Return type -[**InlineResponse2011**](InlineResponse2011.md) +[**CreateIdentity201Response**](CreateIdentity201Response.md) ### Authorization @@ -220,47 +326,75 @@ Name | Type | Description | Notes - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | created | - | +**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) # **create_organization** -> InlineResponse2012 create_organization(body=body) +> CreateOrganization201Response create_organization(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationBody() # OrganizationBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateOrganizationRequest() # CreateOrganizationRequest | (optional) -try: - api_response = api_instance.create_organization(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_organization: %s\n" % e) + try: + api_response = api_instance.create_organization(body=body) + print("The response of AdminApi->create_organization:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_organization: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationBody**](OrganizationBody.md)| | [optional] + **body** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md)| | [optional] ### Return type -[**InlineResponse2012**](InlineResponse2012.md) +[**CreateOrganization201Response**](CreateOrganization201Response.md) ### Authorization @@ -271,6 +405,14 @@ Name | Type | Description | Notes - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | organization created | - | +**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) # **delete_frontend** @@ -279,34 +421,52 @@ Name | Type | Description | Notes ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.create_frontend201_response import CreateFrontend201Response from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.FrontendBody1() # FrontendBody1 | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateFrontend201Response() # CreateFrontend201Response | (optional) -try: - api_instance.delete_frontend(body=body) -except ApiException as e: - print("Exception when calling AdminApi->delete_frontend: %s\n" % e) + try: + api_instance.delete_frontend(body=body) + except Exception as e: + print("Exception when calling AdminApi->delete_frontend: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**FrontendBody1**](FrontendBody1.md)| | [optional] + **body** | [**CreateFrontend201Response**](CreateFrontend201Response.md)| | [optional] ### Return type @@ -321,6 +481,15 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | frontend deleted | - | +**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) # **delete_organization** @@ -329,34 +498,52 @@ void (empty response body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.create_organization201_response import CreateOrganization201Response from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationBody1() # OrganizationBody1 | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) -try: - api_instance.delete_organization(body=body) -except ApiException as e: - print("Exception when calling AdminApi->delete_organization: %s\n" % e) + try: + api_instance.delete_organization(body=body) + except Exception as e: + print("Exception when calling AdminApi->delete_organization: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationBody1**](OrganizationBody1.md)| | [optional] + **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] ### Return type @@ -371,6 +558,15 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | organization deleted | - | +**401** | unauthorized | - | +**404** | organization 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) # **grants** @@ -379,34 +575,52 @@ void (empty response body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.verify200_response import Verify200Response from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.GrantsBody() # GrantsBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.Verify200Response() # Verify200Response | (optional) -try: - api_instance.grants(body=body) -except ApiException as e: - print("Exception when calling AdminApi->grants: %s\n" % e) + try: + api_instance.grants(body=body) + except Exception as e: + print("Exception when calling AdminApi->grants: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**GrantsBody**](GrantsBody.md)| | [optional] + **body** | [**Verify200Response**](Verify200Response.md)| | [optional] ### Return type @@ -421,6 +635,15 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) # **invite_token_generate** @@ -429,34 +652,52 @@ void (empty response body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.TokenGenerateBody() # TokenGenerateBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.InviteTokenGenerateRequest() # InviteTokenGenerateRequest | (optional) -try: - api_instance.invite_token_generate(body=body) -except ApiException as e: - print("Exception when calling AdminApi->invite_token_generate: %s\n" % e) + try: + api_instance.invite_token_generate(body=body) + except Exception as e: + print("Exception when calling AdminApi->invite_token_generate: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**TokenGenerateBody**](TokenGenerateBody.md)| | [optional] + **body** | [**InviteTokenGenerateRequest**](InviteTokenGenerateRequest.md)| | [optional] ### Return type @@ -471,43 +712,71 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | invite tokens created | - | +**400** | invite tokens not created | - | +**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) # **list_frontends** -> list[InlineResponse2002] list_frontends() +> List[ListFrontends200ResponseInner] list_frontends() ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) -try: - api_response = api_instance.list_frontends() - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->list_frontends: %s\n" % e) + try: + api_response = api_instance.list_frontends() + print("The response of AdminApi->list_frontends:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->list_frontends: %s\n" % e) ``` + + ### Parameters + This endpoint does not need any parameter. ### Return type -[**list[InlineResponse2002]**](InlineResponse2002.md) +[**List[ListFrontends200ResponseInner]**](ListFrontends200ResponseInner.md) ### Authorization @@ -518,47 +787,75 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) # **list_organization_members** -> InlineResponse2003 list_organization_members(body=body) +> ListOrganizationMembers200Response list_organization_members(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationListBody() # OrganizationListBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) -try: - api_response = api_instance.list_organization_members(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->list_organization_members: %s\n" % e) + try: + api_response = api_instance.list_organization_members(body=body) + print("The response of AdminApi->list_organization_members:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->list_organization_members: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationListBody**](OrganizationListBody.md)| | [optional] + **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] ### Return type -[**InlineResponse2003**](InlineResponse2003.md) +[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) ### Authorization @@ -569,43 +866,71 @@ Name | Type | Description | Notes - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | list organization members | - | +**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_organizations** -> InlineResponse2004 list_organizations() +> ListOrganizations200Response list_organizations() ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.list_organizations200_response import ListOrganizations200Response from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) -try: - api_response = api_instance.list_organizations() - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->list_organizations: %s\n" % e) + try: + api_response = api_instance.list_organizations() + print("The response of AdminApi->list_organizations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->list_organizations: %s\n" % e) ``` + + ### Parameters + This endpoint does not need any parameter. ### Return type -[**InlineResponse2004**](InlineResponse2004.md) +[**ListOrganizations200Response**](ListOrganizations200Response.md) ### Authorization @@ -616,6 +941,14 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) # **remove_organization_member** @@ -624,34 +957,52 @@ This endpoint does not need any parameter. ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationRemoveBody() # OrganizationRemoveBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.RemoveOrganizationMemberRequest() # RemoveOrganizationMemberRequest | (optional) -try: - api_instance.remove_organization_member(body=body) -except ApiException as e: - print("Exception when calling AdminApi->remove_organization_member: %s\n" % e) + try: + api_instance.remove_organization_member(body=body) + except Exception as e: + print("Exception when calling AdminApi->remove_organization_member: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationRemoveBody**](OrganizationRemoveBody.md)| | [optional] + **body** | [**RemoveOrganizationMemberRequest**](RemoveOrganizationMemberRequest.md)| | [optional] ### Return type @@ -666,6 +1017,15 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | member removed | - | +**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_frontend** @@ -674,34 +1034,52 @@ void (empty response body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.update_frontend_request import UpdateFrontendRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.FrontendBody2() # FrontendBody2 | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.UpdateFrontendRequest() # UpdateFrontendRequest | (optional) -try: - api_instance.update_frontend(body=body) -except ApiException as e: - print("Exception when calling AdminApi->update_frontend: %s\n" % e) + try: + api_instance.update_frontend(body=body) + except Exception as e: + print("Exception when calling AdminApi->update_frontend: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**FrontendBody2**](FrontendBody2.md)| | [optional] + **body** | [**UpdateFrontendRequest**](UpdateFrontendRequest.md)| | [optional] ### Return type @@ -716,5 +1094,14 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | frontend updated | - | +**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/sdk/python/sdk/zrok/docs/AuthUser.md b/sdk/python/sdk/zrok/docs/AuthUser.md index 2abe24ba..99960687 100644 --- a/sdk/python/sdk/zrok/docs/AuthUser.md +++ b/sdk/python/sdk/zrok/docs/AuthUser.md @@ -1,10 +1,30 @@ # AuthUser + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **username** | **str** | | [optional] **password** | **str** | | [optional] +## Example + +```python +from zrok_api.models.auth_user import AuthUser + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthUser from a JSON string +auth_user_instance = AuthUser.from_json(json) +# print the JSON string representation of the object +print(AuthUser.to_json()) + +# convert the object into a dict +auth_user_dict = auth_user_instance.to_dict() +# create an instance of AuthUser from a dict +auth_user_from_dict = AuthUser.from_dict(auth_user_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/sdk/python/sdk/zrok/docs/ChangePasswordRequest.md b/sdk/python/sdk/zrok/docs/ChangePasswordRequest.md new file mode 100644 index 00000000..5fea099e --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ChangePasswordRequest.md @@ -0,0 +1,31 @@ +# ChangePasswordRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**old_password** | **str** | | [optional] +**new_password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.change_password_request import ChangePasswordRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ChangePasswordRequest from a JSON string +change_password_request_instance = ChangePasswordRequest.from_json(json) +# print the JSON string representation of the object +print(ChangePasswordRequest.to_json()) + +# convert the object into a dict +change_password_request_dict = change_password_request_instance.to_dict() +# create an instance of ChangePasswordRequest from a dict +change_password_request_from_dict = ChangePasswordRequest.from_dict(change_password_request_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/sdk/python/sdk/zrok/docs/ClientVersionCheckRequest.md b/sdk/python/sdk/zrok/docs/ClientVersionCheckRequest.md new file mode 100644 index 00000000..53d9e16e --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ClientVersionCheckRequest.md @@ -0,0 +1,29 @@ +# ClientVersionCheckRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_version** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ClientVersionCheckRequest from a JSON string +client_version_check_request_instance = ClientVersionCheckRequest.from_json(json) +# print the JSON string representation of the object +print(ClientVersionCheckRequest.to_json()) + +# convert the object into a dict +client_version_check_request_dict = client_version_check_request_instance.to_dict() +# create an instance of ClientVersionCheckRequest from a dict +client_version_check_request_from_dict = ClientVersionCheckRequest.from_dict(client_version_check_request_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/sdk/python/sdk/zrok/docs/Configuration.md b/sdk/python/sdk/zrok/docs/Configuration.md index ee94f24b..07eec945 100644 --- a/sdk/python/sdk/zrok/docs/Configuration.md +++ b/sdk/python/sdk/zrok/docs/Configuration.md @@ -1,6 +1,8 @@ # Configuration + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **version** | **str** | | [optional] @@ -9,5 +11,23 @@ Name | Type | Description | Notes **requires_invite_token** | **bool** | | [optional] **invite_token_contact** | **str** | | [optional] +## Example + +```python +from zrok_api.models.configuration import Configuration + +# TODO update the JSON string below +json = "{}" +# create an instance of Configuration from a JSON string +configuration_instance = Configuration.from_json(json) +# print the JSON string representation of the object +print(Configuration.to_json()) + +# convert the object into a dict +configuration_dict = configuration_instance.to_dict() +# create an instance of Configuration from a dict +configuration_from_dict = Configuration.from_dict(configuration_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/sdk/python/sdk/zrok/docs/CreateFrontend201Response.md b/sdk/python/sdk/zrok/docs/CreateFrontend201Response.md new file mode 100644 index 00000000..7239add1 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/CreateFrontend201Response.md @@ -0,0 +1,29 @@ +# CreateFrontend201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_frontend201_response import CreateFrontend201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFrontend201Response from a JSON string +create_frontend201_response_instance = CreateFrontend201Response.from_json(json) +# print the JSON string representation of the object +print(CreateFrontend201Response.to_json()) + +# convert the object into a dict +create_frontend201_response_dict = create_frontend201_response_instance.to_dict() +# create an instance of CreateFrontend201Response from a dict +create_frontend201_response_from_dict = CreateFrontend201Response.from_dict(create_frontend201_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/sdk/python/sdk/zrok/docs/CreateFrontendRequest.md b/sdk/python/sdk/zrok/docs/CreateFrontendRequest.md new file mode 100644 index 00000000..63fe8779 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/CreateFrontendRequest.md @@ -0,0 +1,32 @@ +# CreateFrontendRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**z_id** | **str** | | [optional] +**url_template** | **str** | | [optional] +**public_name** | **str** | | [optional] +**permission_mode** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_frontend_request import CreateFrontendRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFrontendRequest from a JSON string +create_frontend_request_instance = CreateFrontendRequest.from_json(json) +# print the JSON string representation of the object +print(CreateFrontendRequest.to_json()) + +# convert the object into a dict +create_frontend_request_dict = create_frontend_request_instance.to_dict() +# create an instance of CreateFrontendRequest from a dict +create_frontend_request_from_dict = CreateFrontendRequest.from_dict(create_frontend_request_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/sdk/python/sdk/zrok/docs/CreateIdentity201Response.md b/sdk/python/sdk/zrok/docs/CreateIdentity201Response.md new file mode 100644 index 00000000..245275e2 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/CreateIdentity201Response.md @@ -0,0 +1,30 @@ +# CreateIdentity201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity** | **str** | | [optional] +**cfg** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_identity201_response import CreateIdentity201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateIdentity201Response from a JSON string +create_identity201_response_instance = CreateIdentity201Response.from_json(json) +# print the JSON string representation of the object +print(CreateIdentity201Response.to_json()) + +# convert the object into a dict +create_identity201_response_dict = create_identity201_response_instance.to_dict() +# create an instance of CreateIdentity201Response from a dict +create_identity201_response_from_dict = CreateIdentity201Response.from_dict(create_identity201_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/sdk/python/sdk/zrok/docs/CreateIdentityRequest.md b/sdk/python/sdk/zrok/docs/CreateIdentityRequest.md new file mode 100644 index 00000000..50cb9457 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/CreateIdentityRequest.md @@ -0,0 +1,29 @@ +# CreateIdentityRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_identity_request import CreateIdentityRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateIdentityRequest from a JSON string +create_identity_request_instance = CreateIdentityRequest.from_json(json) +# print the JSON string representation of the object +print(CreateIdentityRequest.to_json()) + +# convert the object into a dict +create_identity_request_dict = create_identity_request_instance.to_dict() +# create an instance of CreateIdentityRequest from a dict +create_identity_request_from_dict = CreateIdentityRequest.from_dict(create_identity_request_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/sdk/python/sdk/zrok/docs/CreateOrganization201Response.md b/sdk/python/sdk/zrok/docs/CreateOrganization201Response.md new file mode 100644 index 00000000..26bc640c --- /dev/null +++ b/sdk/python/sdk/zrok/docs/CreateOrganization201Response.md @@ -0,0 +1,29 @@ +# CreateOrganization201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_organization201_response import CreateOrganization201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOrganization201Response from a JSON string +create_organization201_response_instance = CreateOrganization201Response.from_json(json) +# print the JSON string representation of the object +print(CreateOrganization201Response.to_json()) + +# convert the object into a dict +create_organization201_response_dict = create_organization201_response_instance.to_dict() +# create an instance of CreateOrganization201Response from a dict +create_organization201_response_from_dict = CreateOrganization201Response.from_dict(create_organization201_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/sdk/python/sdk/zrok/docs/CreateOrganizationRequest.md b/sdk/python/sdk/zrok/docs/CreateOrganizationRequest.md new file mode 100644 index 00000000..458e339b --- /dev/null +++ b/sdk/python/sdk/zrok/docs/CreateOrganizationRequest.md @@ -0,0 +1,29 @@ +# CreateOrganizationRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_organization_request import CreateOrganizationRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOrganizationRequest from a JSON string +create_organization_request_instance = CreateOrganizationRequest.from_json(json) +# print the JSON string representation of the object +print(CreateOrganizationRequest.to_json()) + +# convert the object into a dict +create_organization_request_dict = create_organization_request_instance.to_dict() +# create an instance of CreateOrganizationRequest from a dict +create_organization_request_from_dict = CreateOrganizationRequest.from_dict(create_organization_request_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/sdk/python/sdk/zrok/docs/DisableRequest.md b/sdk/python/sdk/zrok/docs/DisableRequest.md new file mode 100644 index 00000000..4e4490f1 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/DisableRequest.md @@ -0,0 +1,29 @@ +# DisableRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.disable_request import DisableRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DisableRequest from a JSON string +disable_request_instance = DisableRequest.from_json(json) +# print the JSON string representation of the object +print(DisableRequest.to_json()) + +# convert the object into a dict +disable_request_dict = disable_request_instance.to_dict() +# create an instance of DisableRequest from a dict +disable_request_from_dict = DisableRequest.from_dict(disable_request_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/sdk/python/sdk/zrok/docs/EnableRequest.md b/sdk/python/sdk/zrok/docs/EnableRequest.md new file mode 100644 index 00000000..7720b3b9 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/EnableRequest.md @@ -0,0 +1,30 @@ +# EnableRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**host** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.enable_request import EnableRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of EnableRequest from a JSON string +enable_request_instance = EnableRequest.from_json(json) +# print the JSON string representation of the object +print(EnableRequest.to_json()) + +# convert the object into a dict +enable_request_dict = enable_request_instance.to_dict() +# create an instance of EnableRequest from a dict +enable_request_from_dict = EnableRequest.from_dict(enable_request_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/sdk/python/sdk/zrok/docs/Environment.md b/sdk/python/sdk/zrok/docs/Environment.md index bd71fee9..44a9356b 100644 --- a/sdk/python/sdk/zrok/docs/Environment.md +++ b/sdk/python/sdk/zrok/docs/Environment.md @@ -1,16 +1,36 @@ # Environment + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **str** | | [optional] **host** | **str** | | [optional] **address** | **str** | | [optional] **z_id** | **str** | | [optional] -**activity** | [**SparkData**](SparkData.md) | | [optional] +**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] **limited** | **bool** | | [optional] **created_at** | **int** | | [optional] **updated_at** | **int** | | [optional] +## Example + +```python +from zrok_api.models.environment import Environment + +# TODO update the JSON string below +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()) + +# convert the object into a dict +environment_dict = environment_instance.to_dict() +# create an instance of Environment from a dict +environment_from_dict = Environment.from_dict(environment_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/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md b/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md index 7ed1a39a..a218ae3c 100644 --- a/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md +++ b/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md @@ -1,11 +1,31 @@ # EnvironmentAndResources + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **environment** | [**Environment**](Environment.md) | | [optional] -**frontends** | [**Frontends**](Frontends.md) | | [optional] -**shares** | [**Shares**](Shares.md) | | [optional] +**frontends** | [**List[Frontend]**](Frontend.md) | | [optional] +**shares** | [**List[Share]**](Share.md) | | [optional] +## Example + +```python +from zrok_api.models.environment_and_resources import EnvironmentAndResources + +# TODO update the JSON string below +json = "{}" +# create an instance of EnvironmentAndResources from a JSON string +environment_and_resources_instance = EnvironmentAndResources.from_json(json) +# print the JSON string representation of the object +print(EnvironmentAndResources.to_json()) + +# convert the object into a dict +environment_and_resources_dict = environment_and_resources_instance.to_dict() +# create an instance of EnvironmentAndResources from a dict +environment_and_resources_from_dict = EnvironmentAndResources.from_dict(environment_and_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/sdk/python/sdk/zrok/docs/EnvironmentApi.md b/sdk/python/sdk/zrok/docs/EnvironmentApi.md index f9e49447..b55009de 100644 --- a/sdk/python/sdk/zrok/docs/EnvironmentApi.md +++ b/sdk/python/sdk/zrok/docs/EnvironmentApi.md @@ -7,40 +7,59 @@ Method | HTTP request | Description [**disable**](EnvironmentApi.md#disable) | **POST** /disable | [**enable**](EnvironmentApi.md#enable) | **POST** /enable | + # **disable** > disable(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.disable_request import DisableRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.EnvironmentApi(zrok_api.ApiClient(configuration)) -body = zrok_api.DisableBody() # DisableBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.EnvironmentApi(api_client) + body = zrok_api.DisableRequest() # DisableRequest | (optional) -try: - api_instance.disable(body=body) -except ApiException as e: - print("Exception when calling EnvironmentApi->disable: %s\n" % e) + try: + api_instance.disable(body=body) + except Exception as e: + print("Exception when calling EnvironmentApi->disable: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**DisableBody**](DisableBody.md)| | [optional] + **body** | [**DisableRequest**](DisableRequest.md)| | [optional] ### Return type @@ -55,47 +74,75 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | environment disabled | - | +**401** | invalid environment | - | +**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) # **enable** -> InlineResponse2011 enable(body=body) +> CreateIdentity201Response enable(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.enable_request import EnableRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.EnvironmentApi(zrok_api.ApiClient(configuration)) -body = zrok_api.EnableBody() # EnableBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.EnvironmentApi(api_client) + body = zrok_api.EnableRequest() # EnableRequest | (optional) -try: - api_response = api_instance.enable(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling EnvironmentApi->enable: %s\n" % e) + try: + api_response = api_instance.enable(body=body) + print("The response of EnvironmentApi->enable:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvironmentApi->enable: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**EnableBody**](EnableBody.md)| | [optional] + **body** | [**EnableRequest**](EnableRequest.md)| | [optional] ### Return type -[**InlineResponse2011**](InlineResponse2011.md) +[**CreateIdentity201Response**](CreateIdentity201Response.md) ### Authorization @@ -106,5 +153,14 @@ Name | Type | Description | Notes - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | environment enabled | - | +**401** | unauthorized | - | +**404** | account 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/sdk/python/sdk/zrok/docs/Frontend.md b/sdk/python/sdk/zrok/docs/Frontend.md index 428eb19d..ce41a9b7 100644 --- a/sdk/python/sdk/zrok/docs/Frontend.md +++ b/sdk/python/sdk/zrok/docs/Frontend.md @@ -1,6 +1,8 @@ # Frontend + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] @@ -13,5 +15,23 @@ Name | Type | Description | Notes **created_at** | **int** | | [optional] **updated_at** | **int** | | [optional] +## Example + +```python +from zrok_api.models.frontend import Frontend + +# TODO update the JSON string below +json = "{}" +# create an instance of Frontend from a JSON string +frontend_instance = Frontend.from_json(json) +# print the JSON string representation of the object +print(Frontend.to_json()) + +# convert the object into a dict +frontend_dict = frontend_instance.to_dict() +# create an instance of Frontend from a dict +frontend_from_dict = Frontend.from_dict(frontend_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/sdk/python/sdk/zrok/docs/GetSparklines200Response.md b/sdk/python/sdk/zrok/docs/GetSparklines200Response.md new file mode 100644 index 00000000..66528c7e --- /dev/null +++ b/sdk/python/sdk/zrok/docs/GetSparklines200Response.md @@ -0,0 +1,29 @@ +# GetSparklines200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sparklines** | [**List[Metrics]**](Metrics.md) | | [optional] + +## Example + +```python +from zrok_api.models.get_sparklines200_response import GetSparklines200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetSparklines200Response from a JSON string +get_sparklines200_response_instance = GetSparklines200Response.from_json(json) +# print the JSON string representation of the object +print(GetSparklines200Response.to_json()) + +# convert the object into a dict +get_sparklines200_response_dict = get_sparklines200_response_instance.to_dict() +# create an instance of GetSparklines200Response from a dict +get_sparklines200_response_from_dict = GetSparklines200Response.from_dict(get_sparklines200_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/sdk/python/sdk/zrok/docs/GetSparklinesRequest.md b/sdk/python/sdk/zrok/docs/GetSparklinesRequest.md new file mode 100644 index 00000000..29369ebc --- /dev/null +++ b/sdk/python/sdk/zrok/docs/GetSparklinesRequest.md @@ -0,0 +1,31 @@ +# GetSparklinesRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account** | **bool** | | [optional] +**environments** | **List[str]** | | [optional] +**shares** | **List[str]** | | [optional] + +## Example + +```python +from zrok_api.models.get_sparklines_request import GetSparklinesRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of GetSparklinesRequest from a JSON string +get_sparklines_request_instance = GetSparklinesRequest.from_json(json) +# print the JSON string representation of the object +print(GetSparklinesRequest.to_json()) + +# convert the object into a dict +get_sparklines_request_dict = get_sparklines_request_instance.to_dict() +# create an instance of GetSparklinesRequest from a dict +get_sparklines_request_from_dict = GetSparklinesRequest.from_dict(get_sparklines_request_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/sdk/python/sdk/zrok/docs/InviteRequest.md b/sdk/python/sdk/zrok/docs/InviteRequest.md new file mode 100644 index 00000000..039132e8 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InviteRequest.md @@ -0,0 +1,30 @@ +# InviteRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**invite_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.invite_request import InviteRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteRequest from a JSON string +invite_request_instance = InviteRequest.from_json(json) +# print the JSON string representation of the object +print(InviteRequest.to_json()) + +# convert the object into a dict +invite_request_dict = invite_request_instance.to_dict() +# create an instance of InviteRequest from a dict +invite_request_from_dict = InviteRequest.from_dict(invite_request_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/sdk/python/sdk/zrok/docs/InviteTokenGenerateRequest.md b/sdk/python/sdk/zrok/docs/InviteTokenGenerateRequest.md new file mode 100644 index 00000000..33a20d70 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InviteTokenGenerateRequest.md @@ -0,0 +1,29 @@ +# InviteTokenGenerateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_tokens** | **List[str]** | | [optional] + +## Example + +```python +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteTokenGenerateRequest from a JSON string +invite_token_generate_request_instance = InviteTokenGenerateRequest.from_json(json) +# print the JSON string representation of the object +print(InviteTokenGenerateRequest.to_json()) + +# convert the object into a dict +invite_token_generate_request_dict = invite_token_generate_request_instance.to_dict() +# create an instance of InviteTokenGenerateRequest from a dict +invite_token_generate_request_from_dict = InviteTokenGenerateRequest.from_dict(invite_token_generate_request_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/sdk/python/sdk/zrok/docs/ListFrontends200ResponseInner.md b/sdk/python/sdk/zrok/docs/ListFrontends200ResponseInner.md new file mode 100644 index 00000000..625ea343 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ListFrontends200ResponseInner.md @@ -0,0 +1,34 @@ +# ListFrontends200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**z_id** | **str** | | [optional] +**url_template** | **str** | | [optional] +**public_name** | **str** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +## Example + +```python +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListFrontends200ResponseInner from a JSON string +list_frontends200_response_inner_instance = ListFrontends200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ListFrontends200ResponseInner.to_json()) + +# convert the object into a dict +list_frontends200_response_inner_dict = list_frontends200_response_inner_instance.to_dict() +# create an instance of ListFrontends200ResponseInner from a dict +list_frontends200_response_inner_from_dict = ListFrontends200ResponseInner.from_dict(list_frontends200_response_inner_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/sdk/python/sdk/zrok/docs/ListMemberships200Response.md b/sdk/python/sdk/zrok/docs/ListMemberships200Response.md new file mode 100644 index 00000000..48e19dbf --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ListMemberships200Response.md @@ -0,0 +1,29 @@ +# ListMemberships200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memberships** | [**List[ListMemberships200ResponseMembershipsInner]**](ListMemberships200ResponseMembershipsInner.md) | | [optional] + +## Example + +```python +from zrok_api.models.list_memberships200_response import ListMemberships200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ListMemberships200Response from a JSON string +list_memberships200_response_instance = ListMemberships200Response.from_json(json) +# print the JSON string representation of the object +print(ListMemberships200Response.to_json()) + +# convert the object into a dict +list_memberships200_response_dict = list_memberships200_response_instance.to_dict() +# create an instance of ListMemberships200Response from a dict +list_memberships200_response_from_dict = ListMemberships200Response.from_dict(list_memberships200_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/sdk/python/sdk/zrok/docs/ListMemberships200ResponseMembershipsInner.md b/sdk/python/sdk/zrok/docs/ListMemberships200ResponseMembershipsInner.md new file mode 100644 index 00000000..e85c7440 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ListMemberships200ResponseMembershipsInner.md @@ -0,0 +1,31 @@ +# ListMemberships200ResponseMembershipsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**description** | **str** | | [optional] +**admin** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListMemberships200ResponseMembershipsInner from a JSON string +list_memberships200_response_memberships_inner_instance = ListMemberships200ResponseMembershipsInner.from_json(json) +# print the JSON string representation of the object +print(ListMemberships200ResponseMembershipsInner.to_json()) + +# convert the object into a dict +list_memberships200_response_memberships_inner_dict = list_memberships200_response_memberships_inner_instance.to_dict() +# create an instance of ListMemberships200ResponseMembershipsInner from a dict +list_memberships200_response_memberships_inner_from_dict = ListMemberships200ResponseMembershipsInner.from_dict(list_memberships200_response_memberships_inner_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/sdk/python/sdk/zrok/docs/ListOrganizationMembers200Response.md b/sdk/python/sdk/zrok/docs/ListOrganizationMembers200Response.md new file mode 100644 index 00000000..e05a28bf --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ListOrganizationMembers200Response.md @@ -0,0 +1,29 @@ +# ListOrganizationMembers200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | [**List[ListOrganizationMembers200ResponseMembersInner]**](ListOrganizationMembers200ResponseMembersInner.md) | | [optional] + +## Example + +```python +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizationMembers200Response from a JSON string +list_organization_members200_response_instance = ListOrganizationMembers200Response.from_json(json) +# print the JSON string representation of the object +print(ListOrganizationMembers200Response.to_json()) + +# convert the object into a dict +list_organization_members200_response_dict = list_organization_members200_response_instance.to_dict() +# create an instance of ListOrganizationMembers200Response from a dict +list_organization_members200_response_from_dict = ListOrganizationMembers200Response.from_dict(list_organization_members200_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/sdk/python/sdk/zrok/docs/ListOrganizationMembers200ResponseMembersInner.md b/sdk/python/sdk/zrok/docs/ListOrganizationMembers200ResponseMembersInner.md new file mode 100644 index 00000000..8ebbb35e --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ListOrganizationMembers200ResponseMembersInner.md @@ -0,0 +1,30 @@ +# ListOrganizationMembers200ResponseMembersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**admin** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizationMembers200ResponseMembersInner from a JSON string +list_organization_members200_response_members_inner_instance = ListOrganizationMembers200ResponseMembersInner.from_json(json) +# print the JSON string representation of the object +print(ListOrganizationMembers200ResponseMembersInner.to_json()) + +# convert the object into a dict +list_organization_members200_response_members_inner_dict = list_organization_members200_response_members_inner_instance.to_dict() +# create an instance of ListOrganizationMembers200ResponseMembersInner from a dict +list_organization_members200_response_members_inner_from_dict = ListOrganizationMembers200ResponseMembersInner.from_dict(list_organization_members200_response_members_inner_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/sdk/python/sdk/zrok/docs/ListOrganizations200Response.md b/sdk/python/sdk/zrok/docs/ListOrganizations200Response.md new file mode 100644 index 00000000..46fe4d60 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ListOrganizations200Response.md @@ -0,0 +1,29 @@ +# ListOrganizations200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organizations** | [**List[ListOrganizations200ResponseOrganizationsInner]**](ListOrganizations200ResponseOrganizationsInner.md) | | [optional] + +## Example + +```python +from zrok_api.models.list_organizations200_response import ListOrganizations200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizations200Response from a JSON string +list_organizations200_response_instance = ListOrganizations200Response.from_json(json) +# print the JSON string representation of the object +print(ListOrganizations200Response.to_json()) + +# convert the object into a dict +list_organizations200_response_dict = list_organizations200_response_instance.to_dict() +# create an instance of ListOrganizations200Response from a dict +list_organizations200_response_from_dict = ListOrganizations200Response.from_dict(list_organizations200_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/sdk/python/sdk/zrok/docs/ListOrganizations200ResponseOrganizationsInner.md b/sdk/python/sdk/zrok/docs/ListOrganizations200ResponseOrganizationsInner.md new file mode 100644 index 00000000..468447f2 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ListOrganizations200ResponseOrganizationsInner.md @@ -0,0 +1,30 @@ +# ListOrganizations200ResponseOrganizationsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizations200ResponseOrganizationsInner from a JSON string +list_organizations200_response_organizations_inner_instance = ListOrganizations200ResponseOrganizationsInner.from_json(json) +# print the JSON string representation of the object +print(ListOrganizations200ResponseOrganizationsInner.to_json()) + +# convert the object into a dict +list_organizations200_response_organizations_inner_dict = list_organizations200_response_organizations_inner_instance.to_dict() +# create an instance of ListOrganizations200ResponseOrganizationsInner from a dict +list_organizations200_response_organizations_inner_from_dict = ListOrganizations200ResponseOrganizationsInner.from_dict(list_organizations200_response_organizations_inner_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/sdk/python/sdk/zrok/docs/LoginRequest.md b/sdk/python/sdk/zrok/docs/LoginRequest.md new file mode 100644 index 00000000..05728618 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/LoginRequest.md @@ -0,0 +1,30 @@ +# LoginRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.login_request import LoginRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginRequest from a JSON string +login_request_instance = LoginRequest.from_json(json) +# print the JSON string representation of the object +print(LoginRequest.to_json()) + +# convert the object into a dict +login_request_dict = login_request_instance.to_dict() +# create an instance of LoginRequest from a dict +login_request_from_dict = LoginRequest.from_dict(login_request_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/sdk/python/sdk/zrok/docs/MetadataApi.md b/sdk/python/sdk/zrok/docs/MetadataApi.md index 4d205435..22c06b51 100644 --- a/sdk/python/sdk/zrok/docs/MetadataApi.md +++ b/sdk/python/sdk/zrok/docs/MetadataApi.md @@ -21,34 +21,48 @@ Method | HTTP request | Description [**version**](MetadataApi.md#version) | **GET** /version | [**version_inventory**](MetadataApi.md#version_inventory) | **GET** /versions | + # **client_version_check** > client_version_check(body=body) ### Example + + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest from zrok_api.rest import ApiException from pprint import pprint -# create an instance of the API class -api_instance = zrok_api.MetadataApi() -body = zrok_api.ClientVersionCheckBody() # ClientVersionCheckBody | (optional) +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) -try: - api_instance.client_version_check(body=body) -except ApiException as e: - print("Exception when calling MetadataApi->client_version_check: %s\n" % e) + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + body = zrok_api.ClientVersionCheckRequest() # ClientVersionCheckRequest | (optional) + + try: + api_instance.client_version_check(body=body) + except Exception as e: + print("Exception when calling MetadataApi->client_version_check: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ClientVersionCheckBody**](ClientVersionCheckBody.md)| | [optional] + **body** | [**ClientVersionCheckRequest**](ClientVersionCheckRequest.md)| | [optional] ### Return type @@ -63,6 +77,13 @@ No authorization required - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | compatible | - | +**400** | not compatible | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **configuration** @@ -71,24 +92,38 @@ No authorization required ### Example + + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.configuration import Configuration from zrok_api.rest import ApiException from pprint import pprint -# create an instance of the API class -api_instance = zrok_api.MetadataApi() +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) -try: - api_response = api_instance.configuration() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->configuration: %s\n" % e) + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.configuration() + print("The response of MetadataApi->configuration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->configuration: %s\n" % e) ``` + + ### Parameters + This endpoint does not need any parameter. ### Return type @@ -104,43 +139,68 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | current configuration | - | + [[Back to top]](#) [[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_account_detail** -> Environments get_account_detail() +> List[Environment] get_account_detail() ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.environment import Environment from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) -try: - api_response = api_instance.get_account_detail() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_account_detail: %s\n" % e) + try: + api_response = api_instance.get_account_detail() + print("The response of MetadataApi->get_account_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_account_detail: %s\n" % e) ``` + + ### Parameters + This endpoint does not need any parameter. ### Return type -[**Environments**](Environments.md) +[**List[Environment]**](Environment.md) ### Authorization @@ -151,6 +211,13 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_account_metrics** @@ -159,32 +226,51 @@ This endpoint does not need any parameter. ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.metrics import Metrics from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -duration = 'duration_example' # str | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + duration = 'duration_example' # str | (optional) -try: - api_response = api_instance.get_account_metrics(duration=duration) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e) + try: + api_response = api_instance.get_account_metrics(duration=duration) + print("The response of MetadataApi->get_account_metrics:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **duration** | **str**| | [optional] @@ -202,6 +288,14 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | account metrics | - | +**400** | bad request | - | +**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_environment_detail** @@ -210,32 +304,51 @@ Name | Type | Description | Notes ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.environment_and_resources import EnvironmentAndResources from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -env_zid = 'env_zid_example' # str | +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + env_zid = 'env_zid_example' # str | -try: - api_response = api_instance.get_environment_detail(env_zid) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e) + try: + api_response = api_instance.get_environment_detail(env_zid) + print("The response of MetadataApi->get_environment_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **env_zid** | **str**| | @@ -253,6 +366,15 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_environment_metrics** @@ -261,33 +383,52 @@ Name | Type | Description | Notes ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.metrics import Metrics from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -env_id = 'env_id_example' # str | -duration = 'duration_example' # str | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + env_id = 'env_id_example' # str | + duration = 'duration_example' # str | (optional) -try: - api_response = api_instance.get_environment_metrics(env_id, duration=duration) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e) + try: + api_response = api_instance.get_environment_metrics(env_id, duration=duration) + print("The response of MetadataApi->get_environment_metrics:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **env_id** | **str**| | @@ -306,6 +447,15 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | environment metrics | - | +**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) # **get_frontend_detail** @@ -314,32 +464,51 @@ Name | Type | Description | Notes ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.frontend import Frontend from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -frontend_id = 56 # int | +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + frontend_id = 56 # int | -try: - api_response = api_instance.get_frontend_detail(frontend_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e) + try: + api_response = api_instance.get_frontend_detail(frontend_id) + print("The response of MetadataApi->get_frontend_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **frontend_id** | **int**| | @@ -357,6 +526,15 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_share_detail** @@ -365,32 +543,51 @@ Name | Type | Description | Notes ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.share import Share from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -share_token = 'share_token_example' # str | +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + share_token = 'share_token_example' # str | -try: - api_response = api_instance.get_share_detail(share_token) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_share_detail: %s\n" % e) + try: + api_response = api_instance.get_share_detail(share_token) + print("The response of MetadataApi->get_share_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_share_detail: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **share_token** | **str**| | @@ -408,6 +605,15 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_share_metrics** @@ -416,33 +622,52 @@ Name | Type | Description | Notes ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.metrics import Metrics from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -share_token = 'share_token_example' # str | -duration = 'duration_example' # str | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + share_token = 'share_token_example' # str | + duration = 'duration_example' # str | (optional) -try: - api_response = api_instance.get_share_metrics(share_token, duration=duration) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e) + try: + api_response = api_instance.get_share_metrics(share_token, duration=duration) + print("The response of MetadataApi->get_share_metrics:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **share_token** | **str**| | @@ -461,47 +686,76 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | share metrics | - | +**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) # **get_sparklines** -> InlineResponse2006 get_sparklines(body=body) +> GetSparklines200Response get_sparklines(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -body = zrok_api.SparklinesBody() # SparklinesBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + body = zrok_api.GetSparklinesRequest() # GetSparklinesRequest | (optional) -try: - api_response = api_instance.get_sparklines(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_sparklines: %s\n" % e) + try: + api_response = api_instance.get_sparklines(body=body) + print("The response of MetadataApi->get_sparklines:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_sparklines: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SparklinesBody**](SparklinesBody.md)| | [optional] + **body** | [**GetSparklinesRequest**](GetSparklinesRequest.md)| | [optional] ### Return type -[**InlineResponse2006**](InlineResponse2006.md) +[**GetSparklines200Response**](GetSparklines200Response.md) ### Authorization @@ -512,43 +766,70 @@ Name | Type | Description | Notes - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | sparklines data | - | +**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) # **list_memberships** -> InlineResponse2005 list_memberships() +> ListMemberships200Response list_memberships() ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.list_memberships200_response import ListMemberships200Response from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) -try: - api_response = api_instance.list_memberships() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->list_memberships: %s\n" % e) + try: + api_response = api_instance.list_memberships() + print("The response of MetadataApi->list_memberships:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->list_memberships: %s\n" % e) ``` + + ### Parameters + This endpoint does not need any parameter. ### Return type -[**InlineResponse2005**](InlineResponse2005.md) +[**ListMemberships200Response**](ListMemberships200Response.md) ### Authorization @@ -559,47 +840,73 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_org_members** -> InlineResponse2003 list_org_members(organization_token) +> ListOrganizationMembers200Response list_org_members(organization_token) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -organization_token = 'organization_token_example' # str | +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + organization_token = 'organization_token_example' # str | -try: - api_response = api_instance.list_org_members(organization_token) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->list_org_members: %s\n" % e) + try: + api_response = api_instance.list_org_members(organization_token) + print("The response of MetadataApi->list_org_members:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->list_org_members: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **organization_token** | **str**| | ### Return type -[**InlineResponse2003**](InlineResponse2003.md) +[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) ### Authorization @@ -610,6 +917,14 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) # **org_account_overview** @@ -618,33 +933,52 @@ Name | Type | Description | Notes ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.overview import Overview from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -organization_token = 'organization_token_example' # str | -account_email = 'account_email_example' # str | +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + organization_token = 'organization_token_example' # str | + account_email = 'account_email_example' # str | -try: - api_response = api_instance.org_account_overview(organization_token, account_email) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->org_account_overview: %s\n" % e) + try: + api_response = api_instance.org_account_overview(organization_token, account_email) + print("The response of MetadataApi->org_account_overview:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->org_account_overview: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **organization_token** | **str**| | @@ -663,6 +997,14 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) # **overview** @@ -671,30 +1013,49 @@ Name | Type | Description | Notes ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.overview import Overview from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) -try: - api_response = api_instance.overview() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->overview: %s\n" % e) + try: + api_response = api_instance.overview() + print("The response of MetadataApi->overview:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->overview: %s\n" % e) ``` + + ### Parameters + This endpoint does not need any parameter. ### Return type @@ -710,37 +1071,57 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | overview returned | - | +**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) # **version** -> Version version() +> str version() ### Example + + ```python -from __future__ import print_function -import time import zrok_api from zrok_api.rest import ApiException from pprint import pprint -# create an instance of the API class -api_instance = zrok_api.MetadataApi() +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) -try: - api_response = api_instance.version() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->version: %s\n" % e) + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.version() + print("The response of MetadataApi->version:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->version: %s\n" % e) ``` + + ### Parameters + This endpoint does not need any parameter. ### Return type -[**Version**](Version.md) +**str** ### Authorization @@ -751,37 +1132,57 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | legacy upgrade required | - | + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **version_inventory** -> InlineResponse2007 version_inventory() +> VersionInventory200Response version_inventory() ### Example + + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.version_inventory200_response import VersionInventory200Response from zrok_api.rest import ApiException from pprint import pprint -# create an instance of the API class -api_instance = zrok_api.MetadataApi() +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) -try: - api_response = api_instance.version_inventory() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->version_inventory: %s\n" % e) + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.version_inventory() + print("The response of MetadataApi->version_inventory:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->version_inventory: %s\n" % e) ``` + + ### Parameters + This endpoint does not need any parameter. ### Return type -[**InlineResponse2007**](InlineResponse2007.md) +[**VersionInventory200Response**](VersionInventory200Response.md) ### Authorization @@ -792,5 +1193,11 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | + [[Back to top]](#) [[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/sdk/python/sdk/zrok/docs/Metrics.md b/sdk/python/sdk/zrok/docs/Metrics.md index 0be4994b..9216f700 100644 --- a/sdk/python/sdk/zrok/docs/Metrics.md +++ b/sdk/python/sdk/zrok/docs/Metrics.md @@ -1,12 +1,32 @@ # Metrics + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **scope** | **str** | | [optional] **id** | **str** | | [optional] **period** | **float** | | [optional] -**samples** | [**list[MetricsSample]**](MetricsSample.md) | | [optional] +**samples** | [**List[MetricsSample]**](MetricsSample.md) | | [optional] +## Example + +```python +from zrok_api.models.metrics import Metrics + +# TODO update the JSON string below +json = "{}" +# create an instance of Metrics from a JSON string +metrics_instance = Metrics.from_json(json) +# print the JSON string representation of the object +print(Metrics.to_json()) + +# convert the object into a dict +metrics_dict = metrics_instance.to_dict() +# create an instance of Metrics from a dict +metrics_from_dict = Metrics.from_dict(metrics_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/sdk/python/sdk/zrok/docs/MetricsSample.md b/sdk/python/sdk/zrok/docs/MetricsSample.md index 60863b05..96c1d94e 100644 --- a/sdk/python/sdk/zrok/docs/MetricsSample.md +++ b/sdk/python/sdk/zrok/docs/MetricsSample.md @@ -1,11 +1,31 @@ # MetricsSample + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rx** | **float** | | [optional] **tx** | **float** | | [optional] **timestamp** | **float** | | [optional] +## Example + +```python +from zrok_api.models.metrics_sample import MetricsSample + +# TODO update the JSON string below +json = "{}" +# create an instance of MetricsSample from a JSON string +metrics_sample_instance = MetricsSample.from_json(json) +# print the JSON string representation of the object +print(MetricsSample.to_json()) + +# convert the object into a dict +metrics_sample_dict = metrics_sample_instance.to_dict() +# create an instance of MetricsSample from a dict +metrics_sample_from_dict = MetricsSample.from_dict(metrics_sample_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/sdk/python/sdk/zrok/docs/Overview.md b/sdk/python/sdk/zrok/docs/Overview.md index 4d477740..f50d6232 100644 --- a/sdk/python/sdk/zrok/docs/Overview.md +++ b/sdk/python/sdk/zrok/docs/Overview.md @@ -1,10 +1,30 @@ # Overview + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_limited** | **bool** | | [optional] -**environments** | [**list[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional] +**environments** | [**List[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional] +## Example + +```python +from zrok_api.models.overview import Overview + +# TODO update the JSON string below +json = "{}" +# create an instance of Overview from a JSON string +overview_instance = Overview.from_json(json) +# print the JSON string representation of the object +print(Overview.to_json()) + +# convert the object into a dict +overview_dict = overview_instance.to_dict() +# create an instance of Overview from a dict +overview_from_dict = Overview.from_dict(overview_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/sdk/python/sdk/zrok/docs/Principal.md b/sdk/python/sdk/zrok/docs/Principal.md index c45a677a..0a6d399c 100644 --- a/sdk/python/sdk/zrok/docs/Principal.md +++ b/sdk/python/sdk/zrok/docs/Principal.md @@ -1,6 +1,8 @@ # Principal + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] @@ -9,5 +11,23 @@ Name | Type | Description | Notes **limitless** | **bool** | | [optional] **admin** | **bool** | | [optional] +## Example + +```python +from zrok_api.models.principal import Principal + +# TODO update the JSON string below +json = "{}" +# create an instance of Principal from a JSON string +principal_instance = Principal.from_json(json) +# print the JSON string representation of the object +print(Principal.to_json()) + +# convert the object into a dict +principal_dict = principal_instance.to_dict() +# create an instance of Principal from a dict +principal_from_dict = Principal.from_dict(principal_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/sdk/python/sdk/zrok/docs/RegenerateAccountToken200Response.md b/sdk/python/sdk/zrok/docs/RegenerateAccountToken200Response.md new file mode 100644 index 00000000..e86cc294 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/RegenerateAccountToken200Response.md @@ -0,0 +1,29 @@ +# RegenerateAccountToken200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of RegenerateAccountToken200Response from a JSON string +regenerate_account_token200_response_instance = RegenerateAccountToken200Response.from_json(json) +# print the JSON string representation of the object +print(RegenerateAccountToken200Response.to_json()) + +# convert the object into a dict +regenerate_account_token200_response_dict = regenerate_account_token200_response_instance.to_dict() +# create an instance of RegenerateAccountToken200Response from a dict +regenerate_account_token200_response_from_dict = RegenerateAccountToken200Response.from_dict(regenerate_account_token200_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/sdk/python/sdk/zrok/docs/RegenerateAccountTokenRequest.md b/sdk/python/sdk/zrok/docs/RegenerateAccountTokenRequest.md new file mode 100644 index 00000000..113262a6 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/RegenerateAccountTokenRequest.md @@ -0,0 +1,29 @@ +# RegenerateAccountTokenRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_address** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RegenerateAccountTokenRequest from a JSON string +regenerate_account_token_request_instance = RegenerateAccountTokenRequest.from_json(json) +# print the JSON string representation of the object +print(RegenerateAccountTokenRequest.to_json()) + +# convert the object into a dict +regenerate_account_token_request_dict = regenerate_account_token_request_instance.to_dict() +# create an instance of RegenerateAccountTokenRequest from a dict +regenerate_account_token_request_from_dict = RegenerateAccountTokenRequest.from_dict(regenerate_account_token_request_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/sdk/python/sdk/zrok/docs/RegisterRequest.md b/sdk/python/sdk/zrok/docs/RegisterRequest.md new file mode 100644 index 00000000..6e268aff --- /dev/null +++ b/sdk/python/sdk/zrok/docs/RegisterRequest.md @@ -0,0 +1,30 @@ +# RegisterRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**register_token** | **str** | | [optional] +**password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.register_request import RegisterRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RegisterRequest from a JSON string +register_request_instance = RegisterRequest.from_json(json) +# print the JSON string representation of the object +print(RegisterRequest.to_json()) + +# convert the object into a dict +register_request_dict = register_request_instance.to_dict() +# create an instance of RegisterRequest from a dict +register_request_from_dict = RegisterRequest.from_dict(register_request_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/sdk/python/sdk/zrok/docs/RemoveOrganizationMemberRequest.md b/sdk/python/sdk/zrok/docs/RemoveOrganizationMemberRequest.md new file mode 100644 index 00000000..75743291 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/RemoveOrganizationMemberRequest.md @@ -0,0 +1,30 @@ +# RemoveOrganizationMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**email** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RemoveOrganizationMemberRequest from a JSON string +remove_organization_member_request_instance = RemoveOrganizationMemberRequest.from_json(json) +# print the JSON string representation of the object +print(RemoveOrganizationMemberRequest.to_json()) + +# convert the object into a dict +remove_organization_member_request_dict = remove_organization_member_request_instance.to_dict() +# create an instance of RemoveOrganizationMemberRequest from a dict +remove_organization_member_request_from_dict = RemoveOrganizationMemberRequest.from_dict(remove_organization_member_request_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/sdk/python/sdk/zrok/docs/ResetPasswordRequest.md b/sdk/python/sdk/zrok/docs/ResetPasswordRequest.md new file mode 100644 index 00000000..e91e841a --- /dev/null +++ b/sdk/python/sdk/zrok/docs/ResetPasswordRequest.md @@ -0,0 +1,30 @@ +# ResetPasswordRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reset_token** | **str** | | [optional] +**password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.reset_password_request import ResetPasswordRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ResetPasswordRequest from a JSON string +reset_password_request_instance = ResetPasswordRequest.from_json(json) +# print the JSON string representation of the object +print(ResetPasswordRequest.to_json()) + +# convert the object into a dict +reset_password_request_dict = reset_password_request_instance.to_dict() +# create an instance of ResetPasswordRequest from a dict +reset_password_request_from_dict = ResetPasswordRequest.from_dict(reset_password_request_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/sdk/python/sdk/zrok/docs/Share.md b/sdk/python/sdk/zrok/docs/Share.md index 8a5d67ab..4fbfc430 100644 --- a/sdk/python/sdk/zrok/docs/Share.md +++ b/sdk/python/sdk/zrok/docs/Share.md @@ -1,6 +1,8 @@ # Share + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **share_token** | **str** | | [optional] @@ -11,10 +13,28 @@ Name | Type | Description | Notes **frontend_endpoint** | **str** | | [optional] **backend_proxy_endpoint** | **str** | | [optional] **reserved** | **bool** | | [optional] -**activity** | [**SparkData**](SparkData.md) | | [optional] +**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] **limited** | **bool** | | [optional] **created_at** | **int** | | [optional] **updated_at** | **int** | | [optional] +## Example + +```python +from zrok_api.models.share import Share + +# TODO update the JSON string below +json = "{}" +# create an instance of Share from a JSON string +share_instance = Share.from_json(json) +# print the JSON string representation of the object +print(Share.to_json()) + +# convert the object into a dict +share_dict = share_instance.to_dict() +# create an instance of Share from a dict +share_from_dict = Share.from_dict(share_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/sdk/python/sdk/zrok/docs/ShareApi.md b/sdk/python/sdk/zrok/docs/ShareApi.md index 86a8b390..244b6f11 100644 --- a/sdk/python/sdk/zrok/docs/ShareApi.md +++ b/sdk/python/sdk/zrok/docs/ShareApi.md @@ -11,45 +11,66 @@ Method | HTTP request | Description [**update_access**](ShareApi.md#update_access) | **PATCH** /access | [**update_share**](ShareApi.md#update_share) | **PATCH** /share | + # **access** -> InlineResponse2013 access(body=body) +> Access201Response access(body=body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.AccessBody() # AccessBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.AccessRequest() # AccessRequest | (optional) -try: - api_response = api_instance.access(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ShareApi->access: %s\n" % e) + try: + api_response = api_instance.access(body=body) + print("The response of ShareApi->access:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ShareApi->access: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**AccessBody**](AccessBody.md)| | [optional] + **body** | [**AccessRequest**](AccessRequest.md)| | [optional] ### Return type -[**InlineResponse2013**](InlineResponse2013.md) +[**Access201Response**](Access201Response.md) ### Authorization @@ -60,6 +81,15 @@ Name | Type | Description | Notes - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | access created | - | +**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) # **share** @@ -68,32 +98,52 @@ Name | Type | Description | Notes ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.share_response import ShareResponse from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ShareRequest() # ShareRequest | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.ShareRequest() # ShareRequest | (optional) -try: - api_response = api_instance.share(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ShareApi->share: %s\n" % e) + try: + api_response = api_instance.share(body=body) + print("The response of ShareApi->share:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ShareApi->share: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**ShareRequest**](ShareRequest.md)| | [optional] @@ -111,6 +161,17 @@ Name | Type | Description | Notes - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | share created | - | +**401** | unauthorized | - | +**404** | not found | - | +**409** | conflict | - | +**422** | unprocessable | - | +**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) # **unaccess** @@ -119,34 +180,52 @@ Name | Type | Description | Notes ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.unaccess_request import UnaccessRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.UnaccessBody() # UnaccessBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UnaccessRequest() # UnaccessRequest | (optional) -try: - api_instance.unaccess(body=body) -except ApiException as e: - print("Exception when calling ShareApi->unaccess: %s\n" % e) + try: + api_instance.unaccess(body=body) + except Exception as e: + print("Exception when calling ShareApi->unaccess: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**UnaccessBody**](UnaccessBody.md)| | [optional] + **body** | [**UnaccessRequest**](UnaccessRequest.md)| | [optional] ### Return type @@ -161,6 +240,15 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | access removed | - | +**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) # **unshare** @@ -169,34 +257,52 @@ void (empty response body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.unshare_request import UnshareRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.UnshareBody() # UnshareBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UnshareRequest() # UnshareRequest | (optional) -try: - api_instance.unshare(body=body) -except ApiException as e: - print("Exception when calling ShareApi->unshare: %s\n" % e) + try: + api_instance.unshare(body=body) + except Exception as e: + print("Exception when calling ShareApi->unshare: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**UnshareBody**](UnshareBody.md)| | [optional] + **body** | [**UnshareRequest**](UnshareRequest.md)| | [optional] ### Return type @@ -211,6 +317,15 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: application/zrok.v1+json +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | share removed | - | +**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_access** @@ -219,34 +334,52 @@ void (empty response body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.update_access_request import UpdateAccessRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.AccessBody1() # AccessBody1 | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UpdateAccessRequest() # UpdateAccessRequest | (optional) -try: - api_instance.update_access(body=body) -except ApiException as e: - print("Exception when calling ShareApi->update_access: %s\n" % e) + try: + api_instance.update_access(body=body) + except Exception as e: + print("Exception when calling ShareApi->update_access: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**AccessBody1**](AccessBody1.md)| | [optional] + **body** | [**UpdateAccessRequest**](UpdateAccessRequest.md)| | [optional] ### Return type @@ -261,6 +394,15 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | access updated | - | +**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_share** @@ -269,34 +411,52 @@ void (empty response body) ### Example + +* Api Key Authentication (key): + ```python -from __future__ import print_function -import time import zrok_api +from zrok_api.models.update_share_request import UpdateShareRequest from zrok_api.rest import ApiException from pprint import pprint +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' +configuration.api_key['key'] = os.environ["API_KEY"] + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' +# configuration.api_key_prefix['key'] = 'Bearer' -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ShareBody() # ShareBody | (optional) +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UpdateShareRequest() # UpdateShareRequest | (optional) -try: - api_instance.update_share(body=body) -except ApiException as e: - print("Exception when calling ShareApi->update_share: %s\n" % e) + try: + api_instance.update_share(body=body) + except Exception as e: + print("Exception when calling ShareApi->update_share: %s\n" % e) ``` + + ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ShareBody**](ShareBody.md)| | [optional] + **body** | [**UpdateShareRequest**](UpdateShareRequest.md)| | [optional] ### Return type @@ -311,5 +471,15 @@ void (empty response body) - **Content-Type**: application/zrok.v1+json - **Accept**: Not defined +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | share updated | - | +**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/sdk/python/sdk/zrok/docs/ShareRequest.md b/sdk/python/sdk/zrok/docs/ShareRequest.md index d1054fc7..eb92f07a 100644 --- a/sdk/python/sdk/zrok/docs/ShareRequest.md +++ b/sdk/python/sdk/zrok/docs/ShareRequest.md @@ -1,22 +1,42 @@ # ShareRequest + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **env_zid** | **str** | | [optional] **share_mode** | **str** | | [optional] -**frontend_selection** | **list[str]** | | [optional] +**frontend_selection** | **List[str]** | | [optional] **backend_mode** | **str** | | [optional] **backend_proxy_endpoint** | **str** | | [optional] **auth_scheme** | **str** | | [optional] -**auth_users** | [**list[AuthUser]**](AuthUser.md) | | [optional] +**auth_users** | [**List[AuthUser]**](AuthUser.md) | | [optional] **oauth_provider** | **str** | | [optional] -**oauth_email_domains** | **list[str]** | | [optional] +**oauth_email_domains** | **List[str]** | | [optional] **oauth_authorization_check_interval** | **str** | | [optional] **reserved** | **bool** | | [optional] **permission_mode** | **str** | | [optional] -**access_grants** | **list[str]** | | [optional] +**access_grants** | **List[str]** | | [optional] **unique_name** | **str** | | [optional] +## Example + +```python +from zrok_api.models.share_request import ShareRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ShareRequest from a JSON string +share_request_instance = ShareRequest.from_json(json) +# print the JSON string representation of the object +print(ShareRequest.to_json()) + +# convert the object into a dict +share_request_dict = share_request_instance.to_dict() +# create an instance of ShareRequest from a dict +share_request_from_dict = ShareRequest.from_dict(share_request_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/sdk/python/sdk/zrok/docs/ShareResponse.md b/sdk/python/sdk/zrok/docs/ShareResponse.md index f6d09e89..9bbedd0c 100644 --- a/sdk/python/sdk/zrok/docs/ShareResponse.md +++ b/sdk/python/sdk/zrok/docs/ShareResponse.md @@ -1,10 +1,30 @@ # ShareResponse + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**frontend_proxy_endpoints** | **list[str]** | | [optional] +**frontend_proxy_endpoints** | **List[str]** | | [optional] **share_token** | **str** | | [optional] +## Example + +```python +from zrok_api.models.share_response import ShareResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ShareResponse from a JSON string +share_response_instance = ShareResponse.from_json(json) +# print the JSON string representation of the object +print(ShareResponse.to_json()) + +# convert the object into a dict +share_response_dict = share_response_instance.to_dict() +# create an instance of ShareResponse from a dict +share_response_from_dict = ShareResponse.from_dict(share_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/sdk/python/sdk/zrok/docs/SparkDataSample.md b/sdk/python/sdk/zrok/docs/SparkDataSample.md index 192675b6..6479404c 100644 --- a/sdk/python/sdk/zrok/docs/SparkDataSample.md +++ b/sdk/python/sdk/zrok/docs/SparkDataSample.md @@ -1,10 +1,30 @@ # SparkDataSample + ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rx** | **float** | | [optional] **tx** | **float** | | [optional] +## Example + +```python +from zrok_api.models.spark_data_sample import SparkDataSample + +# TODO update the JSON string below +json = "{}" +# create an instance of SparkDataSample from a JSON string +spark_data_sample_instance = SparkDataSample.from_json(json) +# print the JSON string representation of the object +print(SparkDataSample.to_json()) + +# convert the object into a dict +spark_data_sample_dict = spark_data_sample_instance.to_dict() +# create an instance of SparkDataSample from a dict +spark_data_sample_from_dict = SparkDataSample.from_dict(spark_data_sample_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/sdk/python/sdk/zrok/docs/UnaccessRequest.md b/sdk/python/sdk/zrok/docs/UnaccessRequest.md new file mode 100644 index 00000000..c7d57fd8 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/UnaccessRequest.md @@ -0,0 +1,31 @@ +# UnaccessRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.unaccess_request import UnaccessRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnaccessRequest from a JSON string +unaccess_request_instance = UnaccessRequest.from_json(json) +# print the JSON string representation of the object +print(UnaccessRequest.to_json()) + +# convert the object into a dict +unaccess_request_dict = unaccess_request_instance.to_dict() +# create an instance of UnaccessRequest from a dict +unaccess_request_from_dict = UnaccessRequest.from_dict(unaccess_request_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/sdk/python/sdk/zrok/docs/UnshareRequest.md b/sdk/python/sdk/zrok/docs/UnshareRequest.md new file mode 100644 index 00000000..d376f008 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/UnshareRequest.md @@ -0,0 +1,31 @@ +# UnshareRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] +**reserved** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.unshare_request import UnshareRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnshareRequest from a JSON string +unshare_request_instance = UnshareRequest.from_json(json) +# print the JSON string representation of the object +print(UnshareRequest.to_json()) + +# convert the object into a dict +unshare_request_dict = unshare_request_instance.to_dict() +# create an instance of UnshareRequest from a dict +unshare_request_from_dict = UnshareRequest.from_dict(unshare_request_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/sdk/python/sdk/zrok/docs/UpdateAccessRequest.md b/sdk/python/sdk/zrok/docs/UpdateAccessRequest.md new file mode 100644 index 00000000..7d9027da --- /dev/null +++ b/sdk/python/sdk/zrok/docs/UpdateAccessRequest.md @@ -0,0 +1,31 @@ +# UpdateAccessRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**bind_address** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.update_access_request import UpdateAccessRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateAccessRequest from a JSON string +update_access_request_instance = UpdateAccessRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateAccessRequest.to_json()) + +# convert the object into a dict +update_access_request_dict = update_access_request_instance.to_dict() +# create an instance of UpdateAccessRequest from a dict +update_access_request_from_dict = UpdateAccessRequest.from_dict(update_access_request_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/sdk/python/sdk/zrok/docs/UpdateFrontendRequest.md b/sdk/python/sdk/zrok/docs/UpdateFrontendRequest.md new file mode 100644 index 00000000..754bf4b6 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/UpdateFrontendRequest.md @@ -0,0 +1,31 @@ +# UpdateFrontendRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**public_name** | **str** | | [optional] +**url_template** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.update_frontend_request import UpdateFrontendRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFrontendRequest from a JSON string +update_frontend_request_instance = UpdateFrontendRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateFrontendRequest.to_json()) + +# convert the object into a dict +update_frontend_request_dict = update_frontend_request_instance.to_dict() +# create an instance of UpdateFrontendRequest from a dict +update_frontend_request_from_dict = UpdateFrontendRequest.from_dict(update_frontend_request_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/sdk/python/sdk/zrok/docs/UpdateShareRequest.md b/sdk/python/sdk/zrok/docs/UpdateShareRequest.md new file mode 100644 index 00000000..8719ab10 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/UpdateShareRequest.md @@ -0,0 +1,32 @@ +# UpdateShareRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**share_token** | **str** | | [optional] +**backend_proxy_endpoint** | **str** | | [optional] +**add_access_grants** | **List[str]** | | [optional] +**remove_access_grants** | **List[str]** | | [optional] + +## Example + +```python +from zrok_api.models.update_share_request import UpdateShareRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateShareRequest from a JSON string +update_share_request_instance = UpdateShareRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateShareRequest.to_json()) + +# convert the object into a dict +update_share_request_dict = update_share_request_instance.to_dict() +# create an instance of UpdateShareRequest from a dict +update_share_request_from_dict = UpdateShareRequest.from_dict(update_share_request_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/sdk/python/sdk/zrok/docs/Verify200Response.md b/sdk/python/sdk/zrok/docs/Verify200Response.md new file mode 100644 index 00000000..5ca1769d --- /dev/null +++ b/sdk/python/sdk/zrok/docs/Verify200Response.md @@ -0,0 +1,29 @@ +# Verify200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.verify200_response import Verify200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of Verify200Response from a JSON string +verify200_response_instance = Verify200Response.from_json(json) +# print the JSON string representation of the object +print(Verify200Response.to_json()) + +# convert the object into a dict +verify200_response_dict = verify200_response_instance.to_dict() +# create an instance of Verify200Response from a dict +verify200_response_from_dict = Verify200Response.from_dict(verify200_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/sdk/python/sdk/zrok/docs/VerifyRequest.md b/sdk/python/sdk/zrok/docs/VerifyRequest.md new file mode 100644 index 00000000..da6a0728 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/VerifyRequest.md @@ -0,0 +1,29 @@ +# VerifyRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**register_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.verify_request import VerifyRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifyRequest from a JSON string +verify_request_instance = VerifyRequest.from_json(json) +# print the JSON string representation of the object +print(VerifyRequest.to_json()) + +# convert the object into a dict +verify_request_dict = verify_request_instance.to_dict() +# create an instance of VerifyRequest from a dict +verify_request_from_dict = VerifyRequest.from_dict(verify_request_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/sdk/python/sdk/zrok/docs/VersionInventory200Response.md b/sdk/python/sdk/zrok/docs/VersionInventory200Response.md new file mode 100644 index 00000000..2c08de2c --- /dev/null +++ b/sdk/python/sdk/zrok/docs/VersionInventory200Response.md @@ -0,0 +1,29 @@ +# VersionInventory200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**controller_version** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.version_inventory200_response import VersionInventory200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of VersionInventory200Response from a JSON string +version_inventory200_response_instance = VersionInventory200Response.from_json(json) +# print the JSON string representation of the object +print(VersionInventory200Response.to_json()) + +# convert the object into a dict +version_inventory200_response_dict = version_inventory200_response_instance.to_dict() +# create an instance of VersionInventory200Response from a dict +version_inventory200_response_from_dict = VersionInventory200Response.from_dict(version_inventory200_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/sdk/python/sdk/zrok/requirements.txt b/sdk/python/sdk/zrok/requirements.txt index bafdc075..cc85509e 100644 --- a/sdk/python/sdk/zrok/requirements.txt +++ b/sdk/python/sdk/zrok/requirements.txt @@ -1,5 +1,5 @@ -certifi >= 14.05.14 -six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.0 -urllib3 >= 1.15.1 +urllib3 >= 1.25.3, < 2.1.0 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/sdk/python/sdk/zrok/test/__init__.py b/sdk/python/sdk/zrok/test/__init__.py index 576f56f8..e69de29b 100644 --- a/sdk/python/sdk/zrok/test/__init__.py +++ b/sdk/python/sdk/zrok/test/__init__.py @@ -1 +0,0 @@ -# coding: utf-8 \ No newline at end of file diff --git a/sdk/python/sdk/zrok/test/test_access201_response.py b/sdk/python/sdk/zrok/test/test_access201_response.py new file mode 100644 index 00000000..9b698d1c --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_access201_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.access201_response import Access201Response + +class TestAccess201Response(unittest.TestCase): + """Access201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Access201Response: + """Test Access201Response + include_optional 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 `Access201Response` + """ + model = Access201Response() + if include_optional: + return Access201Response( + frontend_token = '', + backend_mode = '' + ) + else: + return Access201Response( + ) + """ + + def testAccess201Response(self): + """Test Access201Response""" + # 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/sdk/python/sdk/zrok/test/test_access_request.py b/sdk/python/sdk/zrok/test/test_access_request.py new file mode 100644 index 00000000..070903e9 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_access_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.access_request import AccessRequest + +class TestAccessRequest(unittest.TestCase): + """AccessRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccessRequest: + """Test AccessRequest + include_optional 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 `AccessRequest` + """ + model = AccessRequest() + if include_optional: + return AccessRequest( + env_zid = '', + share_token = '', + bind_address = '', + description = '' + ) + else: + return AccessRequest( + ) + """ + + def testAccessRequest(self): + """Test AccessRequest""" + # 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/sdk/python/sdk/zrok/test/test_add_organization_member_request.py b/sdk/python/sdk/zrok/test/test_add_organization_member_request.py new file mode 100644 index 00000000..7a08de67 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_add_organization_member_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest + +class TestAddOrganizationMemberRequest(unittest.TestCase): + """AddOrganizationMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddOrganizationMemberRequest: + """Test AddOrganizationMemberRequest + include_optional 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 `AddOrganizationMemberRequest` + """ + model = AddOrganizationMemberRequest() + if include_optional: + return AddOrganizationMemberRequest( + organization_token = '', + email = '', + admin = True + ) + else: + return AddOrganizationMemberRequest( + ) + """ + + def testAddOrganizationMemberRequest(self): + """Test AddOrganizationMemberRequest""" + # 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/sdk/python/sdk/zrok/test/test_change_password_request.py b/sdk/python/sdk/zrok/test/test_change_password_request.py new file mode 100644 index 00000000..592e8be1 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_change_password_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.change_password_request import ChangePasswordRequest + +class TestChangePasswordRequest(unittest.TestCase): + """ChangePasswordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChangePasswordRequest: + """Test ChangePasswordRequest + include_optional 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 `ChangePasswordRequest` + """ + model = ChangePasswordRequest() + if include_optional: + return ChangePasswordRequest( + email = '', + old_password = '', + new_password = '' + ) + else: + return ChangePasswordRequest( + ) + """ + + def testChangePasswordRequest(self): + """Test ChangePasswordRequest""" + # 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/sdk/python/sdk/zrok/test/test_client_version_check_request.py b/sdk/python/sdk/zrok/test/test_client_version_check_request.py new file mode 100644 index 00000000..169017d6 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_client_version_check_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest + +class TestClientVersionCheckRequest(unittest.TestCase): + """ClientVersionCheckRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClientVersionCheckRequest: + """Test ClientVersionCheckRequest + include_optional 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 `ClientVersionCheckRequest` + """ + model = ClientVersionCheckRequest() + if include_optional: + return ClientVersionCheckRequest( + client_version = '' + ) + else: + return ClientVersionCheckRequest( + ) + """ + + def testClientVersionCheckRequest(self): + """Test ClientVersionCheckRequest""" + # 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/sdk/python/sdk/zrok/test/test_create_frontend201_response.py b/sdk/python/sdk/zrok/test/test_create_frontend201_response.py new file mode 100644 index 00000000..3f983a1a --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_create_frontend201_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_frontend201_response import CreateFrontend201Response + +class TestCreateFrontend201Response(unittest.TestCase): + """CreateFrontend201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateFrontend201Response: + """Test CreateFrontend201Response + include_optional 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 `CreateFrontend201Response` + """ + model = CreateFrontend201Response() + if include_optional: + return CreateFrontend201Response( + frontend_token = '' + ) + else: + return CreateFrontend201Response( + ) + """ + + def testCreateFrontend201Response(self): + """Test CreateFrontend201Response""" + # 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/sdk/python/sdk/zrok/test/test_create_frontend_request.py b/sdk/python/sdk/zrok/test/test_create_frontend_request.py new file mode 100644 index 00000000..8fc35754 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_create_frontend_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_frontend_request import CreateFrontendRequest + +class TestCreateFrontendRequest(unittest.TestCase): + """CreateFrontendRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateFrontendRequest: + """Test CreateFrontendRequest + include_optional 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 `CreateFrontendRequest` + """ + model = CreateFrontendRequest() + if include_optional: + return CreateFrontendRequest( + z_id = '', + url_template = '', + public_name = '', + permission_mode = 'open' + ) + else: + return CreateFrontendRequest( + ) + """ + + def testCreateFrontendRequest(self): + """Test CreateFrontendRequest""" + # 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/sdk/python/sdk/zrok/test/test_create_identity201_response.py b/sdk/python/sdk/zrok/test/test_create_identity201_response.py new file mode 100644 index 00000000..2a9c8f2b --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_create_identity201_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_identity201_response import CreateIdentity201Response + +class TestCreateIdentity201Response(unittest.TestCase): + """CreateIdentity201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateIdentity201Response: + """Test CreateIdentity201Response + include_optional 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 `CreateIdentity201Response` + """ + model = CreateIdentity201Response() + if include_optional: + return CreateIdentity201Response( + identity = '', + cfg = '' + ) + else: + return CreateIdentity201Response( + ) + """ + + def testCreateIdentity201Response(self): + """Test CreateIdentity201Response""" + # 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/sdk/python/sdk/zrok/test/test_create_identity_request.py b/sdk/python/sdk/zrok/test/test_create_identity_request.py new file mode 100644 index 00000000..9bf33031 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_create_identity_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_identity_request import CreateIdentityRequest + +class TestCreateIdentityRequest(unittest.TestCase): + """CreateIdentityRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateIdentityRequest: + """Test CreateIdentityRequest + include_optional 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 `CreateIdentityRequest` + """ + model = CreateIdentityRequest() + if include_optional: + return CreateIdentityRequest( + name = '' + ) + else: + return CreateIdentityRequest( + ) + """ + + def testCreateIdentityRequest(self): + """Test CreateIdentityRequest""" + # 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/sdk/python/sdk/zrok/test/test_create_organization201_response.py b/sdk/python/sdk/zrok/test/test_create_organization201_response.py new file mode 100644 index 00000000..d4dc7c81 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_create_organization201_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_organization201_response import CreateOrganization201Response + +class TestCreateOrganization201Response(unittest.TestCase): + """CreateOrganization201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOrganization201Response: + """Test CreateOrganization201Response + include_optional 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 `CreateOrganization201Response` + """ + model = CreateOrganization201Response() + if include_optional: + return CreateOrganization201Response( + organization_token = '' + ) + else: + return CreateOrganization201Response( + ) + """ + + def testCreateOrganization201Response(self): + """Test CreateOrganization201Response""" + # 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/sdk/python/sdk/zrok/test/test_create_organization_request.py b/sdk/python/sdk/zrok/test/test_create_organization_request.py new file mode 100644 index 00000000..da880237 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_create_organization_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_organization_request import CreateOrganizationRequest + +class TestCreateOrganizationRequest(unittest.TestCase): + """CreateOrganizationRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOrganizationRequest: + """Test CreateOrganizationRequest + include_optional 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 `CreateOrganizationRequest` + """ + model = CreateOrganizationRequest() + if include_optional: + return CreateOrganizationRequest( + description = '' + ) + else: + return CreateOrganizationRequest( + ) + """ + + def testCreateOrganizationRequest(self): + """Test CreateOrganizationRequest""" + # 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/sdk/python/sdk/zrok/test/test_disable_request.py b/sdk/python/sdk/zrok/test/test_disable_request.py new file mode 100644 index 00000000..c4837b4b --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_disable_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.disable_request import DisableRequest + +class TestDisableRequest(unittest.TestCase): + """DisableRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DisableRequest: + """Test DisableRequest + include_optional 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 `DisableRequest` + """ + model = DisableRequest() + if include_optional: + return DisableRequest( + identity = '' + ) + else: + return DisableRequest( + ) + """ + + def testDisableRequest(self): + """Test DisableRequest""" + # 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/sdk/python/sdk/zrok/test/test_enable_request.py b/sdk/python/sdk/zrok/test/test_enable_request.py new file mode 100644 index 00000000..49689df4 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_enable_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.enable_request import EnableRequest + +class TestEnableRequest(unittest.TestCase): + """EnableRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnableRequest: + """Test EnableRequest + include_optional 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 `EnableRequest` + """ + model = EnableRequest() + if include_optional: + return EnableRequest( + description = '', + host = '' + ) + else: + return EnableRequest( + ) + """ + + def testEnableRequest(self): + """Test EnableRequest""" + # 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/sdk/python/sdk/zrok/test/test_frontends.py b/sdk/python/sdk/zrok/test/test_frontends.py index cb96d34b..0a7a8e45 100644 --- a/sdk/python/sdk/zrok/test/test_frontends.py +++ b/sdk/python/sdk/zrok/test/test_frontends.py @@ -15,7 +15,7 @@ from __future__ import absolute_import import unittest import zrok_api -from zrok_api.models.frontends import Frontends # noqa: E501 +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner # noqa: E501 from zrok_api.rest import ApiException diff --git a/sdk/python/sdk/zrok/test/test_get_sparklines200_response.py b/sdk/python/sdk/zrok/test/test_get_sparklines200_response.py new file mode 100644 index 00000000..8367cc34 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_get_sparklines200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.get_sparklines200_response import GetSparklines200Response + +class TestGetSparklines200Response(unittest.TestCase): + """GetSparklines200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetSparklines200Response: + """Test GetSparklines200Response + include_optional 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 `GetSparklines200Response` + """ + model = GetSparklines200Response() + if include_optional: + return GetSparklines200Response( + sparklines = [ + zrok_api.models.metrics.metrics( + scope = '', + id = '', + period = 1.337, + samples = [ + zrok_api.models.metrics_sample.metricsSample( + rx = 1.337, + tx = 1.337, + timestamp = 1.337, ) + ], ) + ] + ) + else: + return GetSparklines200Response( + ) + """ + + def testGetSparklines200Response(self): + """Test GetSparklines200Response""" + # 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/sdk/python/sdk/zrok/test/test_get_sparklines_request.py b/sdk/python/sdk/zrok/test/test_get_sparklines_request.py new file mode 100644 index 00000000..cd46979b --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_get_sparklines_request.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.get_sparklines_request import GetSparklinesRequest + +class TestGetSparklinesRequest(unittest.TestCase): + """GetSparklinesRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetSparklinesRequest: + """Test GetSparklinesRequest + include_optional 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 `GetSparklinesRequest` + """ + model = GetSparklinesRequest() + if include_optional: + return GetSparklinesRequest( + account = True, + environments = [ + '' + ], + shares = [ + '' + ] + ) + else: + return GetSparklinesRequest( + ) + """ + + def testGetSparklinesRequest(self): + """Test GetSparklinesRequest""" + # 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/sdk/python/sdk/zrok/test/test_invite_request.py b/sdk/python/sdk/zrok/test/test_invite_request.py new file mode 100644 index 00000000..a181ad3b --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_invite_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.invite_request import InviteRequest + +class TestInviteRequest(unittest.TestCase): + """InviteRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteRequest: + """Test InviteRequest + include_optional 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 `InviteRequest` + """ + model = InviteRequest() + if include_optional: + return InviteRequest( + email = '', + invite_token = '' + ) + else: + return InviteRequest( + ) + """ + + def testInviteRequest(self): + """Test InviteRequest""" + # 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/sdk/python/sdk/zrok/test/test_invite_token_generate_request.py b/sdk/python/sdk/zrok/test/test_invite_token_generate_request.py new file mode 100644 index 00000000..1a8c2c10 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_invite_token_generate_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest + +class TestInviteTokenGenerateRequest(unittest.TestCase): + """InviteTokenGenerateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteTokenGenerateRequest: + """Test InviteTokenGenerateRequest + include_optional 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 `InviteTokenGenerateRequest` + """ + model = InviteTokenGenerateRequest() + if include_optional: + return InviteTokenGenerateRequest( + invite_tokens = [ + '' + ] + ) + else: + return InviteTokenGenerateRequest( + ) + """ + + def testInviteTokenGenerateRequest(self): + """Test InviteTokenGenerateRequest""" + # 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/sdk/python/sdk/zrok/test/test_list_frontends200_response_inner.py b/sdk/python/sdk/zrok/test/test_list_frontends200_response_inner.py new file mode 100644 index 00000000..2e21b24d --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_list_frontends200_response_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner + +class TestListFrontends200ResponseInner(unittest.TestCase): + """ListFrontends200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListFrontends200ResponseInner: + """Test ListFrontends200ResponseInner + include_optional 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 `ListFrontends200ResponseInner` + """ + model = ListFrontends200ResponseInner() + if include_optional: + return ListFrontends200ResponseInner( + frontend_token = '', + z_id = '', + url_template = '', + public_name = '', + created_at = 56, + updated_at = 56 + ) + else: + return ListFrontends200ResponseInner( + ) + """ + + def testListFrontends200ResponseInner(self): + """Test ListFrontends200ResponseInner""" + # 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/sdk/python/sdk/zrok/test/test_list_memberships200_response.py b/sdk/python/sdk/zrok/test/test_list_memberships200_response.py new file mode 100644 index 00000000..d23ac2dd --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_list_memberships200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_memberships200_response import ListMemberships200Response + +class TestListMemberships200Response(unittest.TestCase): + """ListMemberships200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListMemberships200Response: + """Test ListMemberships200Response + include_optional 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 `ListMemberships200Response` + """ + model = ListMemberships200Response() + if include_optional: + return ListMemberships200Response( + memberships = [ + zrok_api.models.list_memberships_200_response_memberships_inner.listMemberships_200_response_memberships_inner( + organization_token = '', + description = '', + admin = True, ) + ] + ) + else: + return ListMemberships200Response( + ) + """ + + def testListMemberships200Response(self): + """Test ListMemberships200Response""" + # 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/sdk/python/sdk/zrok/test/test_list_memberships200_response_memberships_inner.py b/sdk/python/sdk/zrok/test/test_list_memberships200_response_memberships_inner.py new file mode 100644 index 00000000..2f7cf7ff --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_list_memberships200_response_memberships_inner.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner + +class TestListMemberships200ResponseMembershipsInner(unittest.TestCase): + """ListMemberships200ResponseMembershipsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListMemberships200ResponseMembershipsInner: + """Test ListMemberships200ResponseMembershipsInner + include_optional 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 `ListMemberships200ResponseMembershipsInner` + """ + model = ListMemberships200ResponseMembershipsInner() + if include_optional: + return ListMemberships200ResponseMembershipsInner( + organization_token = '', + description = '', + admin = True + ) + else: + return ListMemberships200ResponseMembershipsInner( + ) + """ + + def testListMemberships200ResponseMembershipsInner(self): + """Test ListMemberships200ResponseMembershipsInner""" + # 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/sdk/python/sdk/zrok/test/test_list_organization_members200_response.py b/sdk/python/sdk/zrok/test/test_list_organization_members200_response.py new file mode 100644 index 00000000..8020c6c7 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_list_organization_members200_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response + +class TestListOrganizationMembers200Response(unittest.TestCase): + """ListOrganizationMembers200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizationMembers200Response: + """Test ListOrganizationMembers200Response + include_optional 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 `ListOrganizationMembers200Response` + """ + model = ListOrganizationMembers200Response() + if include_optional: + return ListOrganizationMembers200Response( + members = [ + zrok_api.models.list_organization_members_200_response_members_inner.listOrganizationMembers_200_response_members_inner( + email = '', + admin = True, ) + ] + ) + else: + return ListOrganizationMembers200Response( + ) + """ + + def testListOrganizationMembers200Response(self): + """Test ListOrganizationMembers200Response""" + # 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/sdk/python/sdk/zrok/test/test_list_organization_members200_response_members_inner.py b/sdk/python/sdk/zrok/test/test_list_organization_members200_response_members_inner.py new file mode 100644 index 00000000..28cea33f --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_list_organization_members200_response_members_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner + +class TestListOrganizationMembers200ResponseMembersInner(unittest.TestCase): + """ListOrganizationMembers200ResponseMembersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizationMembers200ResponseMembersInner: + """Test ListOrganizationMembers200ResponseMembersInner + include_optional 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 `ListOrganizationMembers200ResponseMembersInner` + """ + model = ListOrganizationMembers200ResponseMembersInner() + if include_optional: + return ListOrganizationMembers200ResponseMembersInner( + email = '', + admin = True + ) + else: + return ListOrganizationMembers200ResponseMembersInner( + ) + """ + + def testListOrganizationMembers200ResponseMembersInner(self): + """Test ListOrganizationMembers200ResponseMembersInner""" + # 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/sdk/python/sdk/zrok/test/test_list_organizations200_response.py b/sdk/python/sdk/zrok/test/test_list_organizations200_response.py new file mode 100644 index 00000000..7133529e --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_list_organizations200_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organizations200_response import ListOrganizations200Response + +class TestListOrganizations200Response(unittest.TestCase): + """ListOrganizations200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizations200Response: + """Test ListOrganizations200Response + include_optional 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 `ListOrganizations200Response` + """ + model = ListOrganizations200Response() + if include_optional: + return ListOrganizations200Response( + organizations = [ + zrok_api.models.list_organizations_200_response_organizations_inner.listOrganizations_200_response_organizations_inner( + organization_token = '', + description = '', ) + ] + ) + else: + return ListOrganizations200Response( + ) + """ + + def testListOrganizations200Response(self): + """Test ListOrganizations200Response""" + # 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/sdk/python/sdk/zrok/test/test_list_organizations200_response_organizations_inner.py b/sdk/python/sdk/zrok/test/test_list_organizations200_response_organizations_inner.py new file mode 100644 index 00000000..6d857ae1 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_list_organizations200_response_organizations_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner + +class TestListOrganizations200ResponseOrganizationsInner(unittest.TestCase): + """ListOrganizations200ResponseOrganizationsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizations200ResponseOrganizationsInner: + """Test ListOrganizations200ResponseOrganizationsInner + include_optional 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 `ListOrganizations200ResponseOrganizationsInner` + """ + model = ListOrganizations200ResponseOrganizationsInner() + if include_optional: + return ListOrganizations200ResponseOrganizationsInner( + organization_token = '', + description = '' + ) + else: + return ListOrganizations200ResponseOrganizationsInner( + ) + """ + + def testListOrganizations200ResponseOrganizationsInner(self): + """Test ListOrganizations200ResponseOrganizationsInner""" + # 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/sdk/python/sdk/zrok/test/test_login_request.py b/sdk/python/sdk/zrok/test/test_login_request.py new file mode 100644 index 00000000..1a4c2642 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_login_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.login_request import LoginRequest + +class TestLoginRequest(unittest.TestCase): + """LoginRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginRequest: + """Test LoginRequest + include_optional 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 `LoginRequest` + """ + model = LoginRequest() + if include_optional: + return LoginRequest( + email = '', + password = '' + ) + else: + return LoginRequest( + ) + """ + + def testLoginRequest(self): + """Test LoginRequest""" + # 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/sdk/python/sdk/zrok/test/test_regenerate_account_token200_response.py b/sdk/python/sdk/zrok/test/test_regenerate_account_token200_response.py new file mode 100644 index 00000000..a94c4678 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_regenerate_account_token200_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response + +class TestRegenerateAccountToken200Response(unittest.TestCase): + """RegenerateAccountToken200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RegenerateAccountToken200Response: + """Test RegenerateAccountToken200Response + include_optional 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 `RegenerateAccountToken200Response` + """ + model = RegenerateAccountToken200Response() + if include_optional: + return RegenerateAccountToken200Response( + account_token = '' + ) + else: + return RegenerateAccountToken200Response( + ) + """ + + def testRegenerateAccountToken200Response(self): + """Test RegenerateAccountToken200Response""" + # 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/sdk/python/sdk/zrok/test/test_regenerate_account_token_request.py b/sdk/python/sdk/zrok/test/test_regenerate_account_token_request.py new file mode 100644 index 00000000..b6e0b4bd --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_regenerate_account_token_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest + +class TestRegenerateAccountTokenRequest(unittest.TestCase): + """RegenerateAccountTokenRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RegenerateAccountTokenRequest: + """Test RegenerateAccountTokenRequest + include_optional 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 `RegenerateAccountTokenRequest` + """ + model = RegenerateAccountTokenRequest() + if include_optional: + return RegenerateAccountTokenRequest( + email_address = '' + ) + else: + return RegenerateAccountTokenRequest( + ) + """ + + def testRegenerateAccountTokenRequest(self): + """Test RegenerateAccountTokenRequest""" + # 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/sdk/python/sdk/zrok/test/test_register_request.py b/sdk/python/sdk/zrok/test/test_register_request.py new file mode 100644 index 00000000..e026b200 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_register_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.register_request import RegisterRequest + +class TestRegisterRequest(unittest.TestCase): + """RegisterRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RegisterRequest: + """Test RegisterRequest + include_optional 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 `RegisterRequest` + """ + model = RegisterRequest() + if include_optional: + return RegisterRequest( + register_token = '', + password = '' + ) + else: + return RegisterRequest( + ) + """ + + def testRegisterRequest(self): + """Test RegisterRequest""" + # 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/sdk/python/sdk/zrok/test/test_remove_organization_member_request.py b/sdk/python/sdk/zrok/test/test_remove_organization_member_request.py new file mode 100644 index 00000000..abf89606 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_remove_organization_member_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest + +class TestRemoveOrganizationMemberRequest(unittest.TestCase): + """RemoveOrganizationMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemoveOrganizationMemberRequest: + """Test RemoveOrganizationMemberRequest + include_optional 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 `RemoveOrganizationMemberRequest` + """ + model = RemoveOrganizationMemberRequest() + if include_optional: + return RemoveOrganizationMemberRequest( + organization_token = '', + email = '' + ) + else: + return RemoveOrganizationMemberRequest( + ) + """ + + def testRemoveOrganizationMemberRequest(self): + """Test RemoveOrganizationMemberRequest""" + # 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/sdk/python/sdk/zrok/test/test_reset_password_request.py b/sdk/python/sdk/zrok/test/test_reset_password_request.py new file mode 100644 index 00000000..2c047502 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_reset_password_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.reset_password_request import ResetPasswordRequest + +class TestResetPasswordRequest(unittest.TestCase): + """ResetPasswordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResetPasswordRequest: + """Test ResetPasswordRequest + include_optional 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 `ResetPasswordRequest` + """ + model = ResetPasswordRequest() + if include_optional: + return ResetPasswordRequest( + reset_token = '', + password = '' + ) + else: + return ResetPasswordRequest( + ) + """ + + def testResetPasswordRequest(self): + """Test ResetPasswordRequest""" + # 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/sdk/python/sdk/zrok/test/test_unaccess_request.py b/sdk/python/sdk/zrok/test/test_unaccess_request.py new file mode 100644 index 00000000..ade50dff --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_unaccess_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.unaccess_request import UnaccessRequest + +class TestUnaccessRequest(unittest.TestCase): + """UnaccessRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnaccessRequest: + """Test UnaccessRequest + include_optional 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 `UnaccessRequest` + """ + model = UnaccessRequest() + if include_optional: + return UnaccessRequest( + frontend_token = '', + env_zid = '', + share_token = '' + ) + else: + return UnaccessRequest( + ) + """ + + def testUnaccessRequest(self): + """Test UnaccessRequest""" + # 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/sdk/python/sdk/zrok/test/test_unshare_request.py b/sdk/python/sdk/zrok/test/test_unshare_request.py new file mode 100644 index 00000000..f0eccf47 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_unshare_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.unshare_request import UnshareRequest + +class TestUnshareRequest(unittest.TestCase): + """UnshareRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnshareRequest: + """Test UnshareRequest + include_optional 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 `UnshareRequest` + """ + model = UnshareRequest() + if include_optional: + return UnshareRequest( + env_zid = '', + share_token = '', + reserved = True + ) + else: + return UnshareRequest( + ) + """ + + def testUnshareRequest(self): + """Test UnshareRequest""" + # 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/sdk/python/sdk/zrok/test/test_update_access_request.py b/sdk/python/sdk/zrok/test/test_update_access_request.py new file mode 100644 index 00000000..02c028bf --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_update_access_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.update_access_request import UpdateAccessRequest + +class TestUpdateAccessRequest(unittest.TestCase): + """UpdateAccessRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateAccessRequest: + """Test UpdateAccessRequest + include_optional 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 `UpdateAccessRequest` + """ + model = UpdateAccessRequest() + if include_optional: + return UpdateAccessRequest( + frontend_token = '', + bind_address = '', + description = '' + ) + else: + return UpdateAccessRequest( + ) + """ + + def testUpdateAccessRequest(self): + """Test UpdateAccessRequest""" + # 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/sdk/python/sdk/zrok/test/test_update_frontend_request.py b/sdk/python/sdk/zrok/test/test_update_frontend_request.py new file mode 100644 index 00000000..9546bbac --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_update_frontend_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.update_frontend_request import UpdateFrontendRequest + +class TestUpdateFrontendRequest(unittest.TestCase): + """UpdateFrontendRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateFrontendRequest: + """Test UpdateFrontendRequest + include_optional 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 `UpdateFrontendRequest` + """ + model = UpdateFrontendRequest() + if include_optional: + return UpdateFrontendRequest( + frontend_token = '', + public_name = '', + url_template = '' + ) + else: + return UpdateFrontendRequest( + ) + """ + + def testUpdateFrontendRequest(self): + """Test UpdateFrontendRequest""" + # 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/sdk/python/sdk/zrok/test/test_update_share_request.py b/sdk/python/sdk/zrok/test/test_update_share_request.py new file mode 100644 index 00000000..1d8df185 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_update_share_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.update_share_request import UpdateShareRequest + +class TestUpdateShareRequest(unittest.TestCase): + """UpdateShareRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateShareRequest: + """Test UpdateShareRequest + include_optional 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 `UpdateShareRequest` + """ + model = UpdateShareRequest() + if include_optional: + return UpdateShareRequest( + share_token = '', + backend_proxy_endpoint = '', + add_access_grants = [ + '' + ], + remove_access_grants = [ + '' + ] + ) + else: + return UpdateShareRequest( + ) + """ + + def testUpdateShareRequest(self): + """Test UpdateShareRequest""" + # 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/sdk/python/sdk/zrok/test/test_verify200_response.py b/sdk/python/sdk/zrok/test/test_verify200_response.py new file mode 100644 index 00000000..bf257b65 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_verify200_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.verify200_response import Verify200Response + +class TestVerify200Response(unittest.TestCase): + """Verify200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Verify200Response: + """Test Verify200Response + include_optional 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 `Verify200Response` + """ + model = Verify200Response() + if include_optional: + return Verify200Response( + email = '' + ) + else: + return Verify200Response( + ) + """ + + def testVerify200Response(self): + """Test Verify200Response""" + # 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/sdk/python/sdk/zrok/test/test_verify_request.py b/sdk/python/sdk/zrok/test/test_verify_request.py new file mode 100644 index 00000000..c6f45d94 --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_verify_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.verify_request import VerifyRequest + +class TestVerifyRequest(unittest.TestCase): + """VerifyRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VerifyRequest: + """Test VerifyRequest + include_optional 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 `VerifyRequest` + """ + model = VerifyRequest() + if include_optional: + return VerifyRequest( + register_token = '' + ) + else: + return VerifyRequest( + ) + """ + + def testVerifyRequest(self): + """Test VerifyRequest""" + # 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/sdk/python/sdk/zrok/test/test_version_inventory200_response.py b/sdk/python/sdk/zrok/test/test_version_inventory200_response.py new file mode 100644 index 00000000..7343fd1f --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_version_inventory200_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.version_inventory200_response import VersionInventory200Response + +class TestVersionInventory200Response(unittest.TestCase): + """VersionInventory200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VersionInventory200Response: + """Test VersionInventory200Response + include_optional 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 `VersionInventory200Response` + """ + model = VersionInventory200Response() + if include_optional: + return VersionInventory200Response( + controller_version = '' + ) + else: + return VersionInventory200Response( + ) + """ + + def testVersionInventory200Response(self): + """Test VersionInventory200Response""" + # 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/sdk/python/sdk/zrok/zrok/api_client_wrapper.py b/sdk/python/sdk/zrok/zrok/api_client_wrapper.py new file mode 100644 index 00000000..801608cc --- /dev/null +++ b/sdk/python/sdk/zrok/zrok/api_client_wrapper.py @@ -0,0 +1,50 @@ +""" +Custom API client wrapper for zrok_api that handles zrok-specific content types. +""" + +import json +import re +from typing import Dict, Optional, Any, List, Tuple, Union + +from zrok_api.api_client import ApiClient +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponse +from zrok_api.exceptions import ApiException + +class ZrokApiClient(ApiClient): + """ + Custom API client that extends the generated ApiClient to handle zrok-specific content types. + """ + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """ + Overrides the default deserialize method to handle zrok-specific content types. + """ + # Handle application/zrok.v1+json as if it were application/json + if content_type and content_type.startswith("application/zrok.v1+json"): + if response_text == "": + data = "" + else: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif content_type.startswith("application/json"): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif content_type.startswith("text/plain"): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self._ApiClient__deserialize(data, response_type) # Access private method using name mangling diff --git a/sdk/python/sdk/zrok/zrok/environment/root.py b/sdk/python/sdk/zrok/zrok/environment/root.py index f12a18ba..df76324b 100644 --- a/sdk/python/sdk/zrok/zrok/environment/root.py +++ b/sdk/python/sdk/zrok/zrok/environment/root.py @@ -5,6 +5,7 @@ import os import json import zrok_api as zrok from zrok_api.configuration import Configuration +from ..api_client_wrapper import ZrokApiClient import re V = "v1.0" @@ -42,7 +43,7 @@ class Root: def HasConfig(self) -> bool: return self.cfg != Config() - def Client(self) -> zrok.ApiClient: + def Client(self) -> ZrokApiClient: apiEndpoint = self.ApiEndpoint() cfg = Configuration() @@ -50,9 +51,16 @@ class Root: cfg.api_key["x-token"] = self.env.Token cfg.api_key_prefix['Authorization'] = 'Bearer' - zrock_client = zrok.ApiClient(configuration=cfg) - self.client_version_check(zrock_client) # Perform version check - return zrock_client + version_check_client = ZrokApiClient(configuration=cfg) + # Perform version check without authentication + self.client_version_check(version_check_client) + + # Create a new client with the same configuration for authenticated requests + auth_client = ZrokApiClient(configuration=cfg) + # Explicitly set the x-token header in default_headers to ensure it's used + auth_client.set_default_header('x-token', self.env.Token) + + return auth_client def ApiEndpoint(self) -> ApiEndpoint: apiEndpoint = "https://api.zrok.io" @@ -89,11 +97,22 @@ class Root: """Check if the client version is compatible with the API.""" metadata_api = zrok.MetadataApi(zrock_client) try: - data, status_code, headers = metadata_api.client_version_check_with_http_info(body={"clientVersion": V}) + # Create a request with NO authentication for version check + # We'll remove any authentication headers for this initial check + # The client's default_headers might already have x-token, so let's ensure this call doesn't use it + custom_headers = {} + for key, value in zrock_client.default_headers.items(): + if key.lower() != 'x-token': # Skip the auth token header + custom_headers[key] = value + + response = metadata_api.client_version_check_with_http_info( + body={"clientVersion": V}, + _headers=custom_headers # Pass custom headers without auth token + ) # Check if the response status code is 200 OK - if status_code != 200: - raise Exception(f"Client version check failed: Unexpected status code {status_code}") + if response.status_code != 200: + raise Exception(f"Client version check failed: Unexpected status code {response.status_code}") # Success case - status code is 200 and empty response body is expected return diff --git a/sdk/python/sdk/zrok/zrok/overview.py b/sdk/python/sdk/zrok/zrok/overview.py index f7b981eb..ccacfd35 100644 --- a/sdk/python/sdk/zrok/zrok/overview.py +++ b/sdk/python/sdk/zrok/zrok/overview.py @@ -6,7 +6,7 @@ import urllib3 from zrok.environment.root import Root from zrok_api.models.environment import Environment from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.frontends import Frontends +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner from zrok_api.models.share import Share @@ -71,7 +71,7 @@ class Overview: env_resources = EnvironmentAndResources( environment=environment, shares=share_list, - frontends=Frontends() # Empty frontends for now as it's not in the input data + frontends=ListFrontends200ResponseInner() # Empty frontends for now as it's not in the input data ) overview.environments.append(env_resources) diff --git a/sdk/python/sdk/zrok/zrok_api/__init__.py b/sdk/python/sdk/zrok/zrok_api/__init__.py index a231330e..bf54fba9 100644 --- a/sdk/python/sdk/zrok/zrok_api/__init__.py +++ b/sdk/python/sdk/zrok/zrok_api/__init__.py @@ -5,14 +5,16 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) -from __future__ import absolute_import + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" # import apis into sdk package from zrok_api.api.account_api import AccountApi @@ -20,70 +22,67 @@ from zrok_api.api.admin_api import AdminApi from zrok_api.api.environment_api import EnvironmentApi from zrok_api.api.metadata_api import MetadataApi from zrok_api.api.share_api import ShareApi + # import ApiClient +from zrok_api.api_response import ApiResponse from zrok_api.api_client import ApiClient from zrok_api.configuration import Configuration +from zrok_api.exceptions import OpenApiException +from zrok_api.exceptions import ApiTypeError +from zrok_api.exceptions import ApiValueError +from zrok_api.exceptions import ApiKeyError +from zrok_api.exceptions import ApiAttributeError +from zrok_api.exceptions import ApiException + # import models into sdk package -from zrok_api.models.access_body import AccessBody -from zrok_api.models.access_body1 import AccessBody1 -from zrok_api.models.account_body import AccountBody +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_body import ChangePasswordBody -from zrok_api.models.client_version_check_body import ClientVersionCheckBody +from zrok_api.models.change_password_request import ChangePasswordRequest +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest from zrok_api.models.configuration import Configuration -from zrok_api.models.disable_body import DisableBody -from zrok_api.models.enable_body import EnableBody +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest +from zrok_api.models.disable_request import DisableRequest +from zrok_api.models.enable_request import EnableRequest from zrok_api.models.environment import Environment from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.environments import Environments -from zrok_api.models.error_message import ErrorMessage from zrok_api.models.frontend import Frontend -from zrok_api.models.frontend_body import FrontendBody -from zrok_api.models.frontend_body1 import FrontendBody1 -from zrok_api.models.frontend_body2 import FrontendBody2 -from zrok_api.models.frontends import Frontends -from zrok_api.models.grants_body import GrantsBody -from zrok_api.models.identity_body import IdentityBody -from zrok_api.models.inline_response200 import InlineResponse200 -from zrok_api.models.inline_response2001 import InlineResponse2001 -from zrok_api.models.inline_response2002 import InlineResponse2002 -from zrok_api.models.inline_response2003 import InlineResponse2003 -from zrok_api.models.inline_response2003_members import InlineResponse2003Members -from zrok_api.models.inline_response2004 import InlineResponse2004 -from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations -from zrok_api.models.inline_response2005 import InlineResponse2005 -from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships -from zrok_api.models.inline_response2006 import InlineResponse2006 -from zrok_api.models.inline_response2007 import InlineResponse2007 -from zrok_api.models.inline_response201 import InlineResponse201 -from zrok_api.models.inline_response2011 import InlineResponse2011 -from zrok_api.models.inline_response2012 import InlineResponse2012 -from zrok_api.models.inline_response2013 import InlineResponse2013 -from zrok_api.models.invite_body import InviteBody -from zrok_api.models.login_body import LoginBody +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest +from zrok_api.models.invite_request import InviteRequest +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.models.list_memberships200_response import ListMemberships200Response +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner +from zrok_api.models.list_organizations200_response import ListOrganizations200Response +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner +from zrok_api.models.login_request import LoginRequest from zrok_api.models.metrics import Metrics from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.organization_add_body import OrganizationAddBody -from zrok_api.models.organization_body import OrganizationBody -from zrok_api.models.organization_body1 import OrganizationBody1 -from zrok_api.models.organization_list_body import OrganizationListBody -from zrok_api.models.organization_remove_body import OrganizationRemoveBody from zrok_api.models.overview import Overview from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody -from zrok_api.models.register_body import RegisterBody -from zrok_api.models.reset_password_body import ResetPasswordBody -from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.models.register_request import RegisterRequest +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest +from zrok_api.models.reset_password_request import ResetPasswordRequest from zrok_api.models.share import Share -from zrok_api.models.share_body import ShareBody from zrok_api.models.share_request import ShareRequest from zrok_api.models.share_response import ShareResponse -from zrok_api.models.shares import Shares -from zrok_api.models.spark_data import SparkData from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.sparklines_body import SparklinesBody -from zrok_api.models.token_generate_body import TokenGenerateBody -from zrok_api.models.unaccess_body import UnaccessBody -from zrok_api.models.unshare_body import UnshareBody -from zrok_api.models.verify_body import VerifyBody -from zrok_api.models.version import Version +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.models.unshare_request import UnshareRequest +from zrok_api.models.update_access_request import UpdateAccessRequest +from zrok_api.models.update_frontend_request import UpdateFrontendRequest +from zrok_api.models.update_share_request import UpdateShareRequest +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest +from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/sdk/zrok/zrok_api/api/__init__.py b/sdk/python/sdk/zrok/zrok_api/api/__init__.py index d07ab757..714f0a37 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/__init__.py +++ b/sdk/python/sdk/zrok/zrok_api/api/__init__.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - # flake8: noqa # import apis into api package @@ -8,3 +6,4 @@ from zrok_api.api.admin_api import AdminApi from zrok_api.api.environment_api import EnvironmentApi from zrok_api.api.metadata_api import MetadataApi from zrok_api.api.share_api import ShareApi + diff --git a/sdk/python/sdk/zrok/zrok_api/api/account_api.py b/sdk/python/sdk/zrok/zrok_api/api/account_api.py index 8a85d9e1..7565f4a7 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/account_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/account_api.py @@ -3,771 +3,2243 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from zrok_api.api_client import ApiClient - - -class AccountApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 StrictStr +from typing import Optional +from zrok_api.models.change_password_request import ChangePasswordRequest +from zrok_api.models.invite_request import InviteRequest +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.models.register_request import RegisterRequest +from zrok_api.models.reset_password_request import ResetPasswordRequest +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class AccountApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - def change_password(self, **kwargs): # noqa: E501 - """change_password # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.change_password(async_req=True) - >>> result = thread.get() + @validate_call + def change_password( + self, + body: Optional[ChangePasswordRequest] = 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, + ) -> None: + """change_password - :param async_req bool - :param ChangePasswordBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.change_password_with_http_info(**kwargs) # noqa: E501 + + :param body: + :type body: ChangePasswordRequest + :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._change_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '422': "str", + '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 change_password_with_http_info( + self, + body: Optional[ChangePasswordRequest] = 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[None]: + """change_password + + + :param body: + :type body: ChangePasswordRequest + :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._change_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '422': "str", + '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 change_password_without_preload_content( + self, + body: Optional[ChangePasswordRequest] = 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: + """change_password + + + :param body: + :type body: ChangePasswordRequest + :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._change_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '422': "str", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _change_password_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.change_password_with_http_info(**kwargs) # noqa: E501 - return data - - def change_password_with_http_info(self, **kwargs): # noqa: E501 - """change_password # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.change_password_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ChangePasswordBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method change_password" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/changePassword', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def invite( + self, + body: Optional[InviteRequest] = 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, + ) -> None: + """invite - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = ['key'] # noqa: E501 + :param body: + :type body: InviteRequest + :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 - return self.api_client.call_api( - '/changePassword', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._invite_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def invite(self, **kwargs): # noqa: E501 - """invite # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': "str", + '401': None, + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.invite(async_req=True) - >>> result = thread.get() - :param async_req bool - :param InviteBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.invite_with_http_info(**kwargs) # noqa: E501 + @validate_call + def invite_with_http_info( + self, + body: Optional[InviteRequest] = 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[None]: + """invite + + + :param body: + :type body: InviteRequest + :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._invite_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': "str", + '401': None, + '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 invite_without_preload_content( + self, + body: Optional[InviteRequest] = 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: + """invite + + + :param body: + :type body: InviteRequest + :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._invite_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': "str", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _invite_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.invite_with_http_info(**kwargs) # noqa: E501 - return data - - def invite_with_http_info(self, **kwargs): # noqa: E501 - """invite # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.invite_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param InviteBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method invite" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/invite', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def login( + self, + body: Optional[LoginRequest] = 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, + ) -> str: + """login - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = [] # noqa: E501 + :param body: + :type body: LoginRequest + :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 - return self.api_client.call_api( - '/invite', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def login(self, **kwargs): # noqa: E501 - """login # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': 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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.login(async_req=True) - >>> result = thread.get() - :param async_req bool - :param LoginBody body: - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.login_with_http_info(**kwargs) # noqa: E501 + @validate_call + def login_with_http_info( + self, + body: Optional[LoginRequest] = 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[str]: + """login + + + :param body: + :type body: LoginRequest + :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._login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': 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 login_without_preload_content( + self, + body: Optional[LoginRequest] = 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: + """login + + + :param body: + :type body: LoginRequest + :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._login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _login_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.login_with_http_info(**kwargs) # noqa: E501 - return data - - def login_with_http_info(self, **kwargs): # noqa: E501 - """login # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.login_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LoginBody body: - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method login" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/login', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def regenerate_account_token( + self, + body: Optional[RegenerateAccountTokenRequest] = 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, + ) -> RegenerateAccountToken200Response: + """regenerate_account_token - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = [] # noqa: E501 + :param body: + :type body: RegenerateAccountTokenRequest + :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 - return self.api_client.call_api( - '/login', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._regenerate_account_token_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def regenerate_account_token(self, **kwargs): # noqa: E501 - """regenerate_account_token # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.regenerate_account_token(async_req=True) - >>> result = thread.get() - :param async_req bool - :param RegenerateAccountTokenBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.regenerate_account_token_with_http_info(**kwargs) # noqa: E501 + @validate_call + def regenerate_account_token_with_http_info( + self, + body: Optional[RegenerateAccountTokenRequest] = 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[RegenerateAccountToken200Response]: + """regenerate_account_token + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._regenerate_account_token_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '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 regenerate_account_token_without_preload_content( + self, + body: Optional[RegenerateAccountTokenRequest] = 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: + """regenerate_account_token + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._regenerate_account_token_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _regenerate_account_token_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.regenerate_account_token_with_http_info(**kwargs) # noqa: E501 - return data - - def regenerate_account_token_with_http_info(self, **kwargs): # noqa: E501 - """regenerate_account_token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.regenerate_account_token_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param RegenerateAccountTokenBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method regenerate_account_token" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/regenerateAccountToken', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def register( + self, + body: Optional[RegisterRequest] = 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, + ) -> RegenerateAccountToken200Response: + """register - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = ['key'] # noqa: E501 + :param body: + :type body: RegisterRequest + :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 - return self.api_client.call_api( - '/regenerateAccountToken', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse200', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._register_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def register(self, **kwargs): # noqa: E501 - """register # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '422': "str", + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.register(async_req=True) - >>> result = thread.get() - :param async_req bool - :param RegisterBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.register_with_http_info(**kwargs) # noqa: E501 + @validate_call + def register_with_http_info( + self, + body: Optional[RegisterRequest] = 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[RegenerateAccountToken200Response]: + """register + + + :param body: + :type body: RegisterRequest + :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._register_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '422': "str", + '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 register_without_preload_content( + self, + body: Optional[RegisterRequest] = 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: + """register + + + :param body: + :type body: RegisterRequest + :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._register_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '422': "str", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _register_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.register_with_http_info(**kwargs) # noqa: E501 - return data - - def register_with_http_info(self, **kwargs): # noqa: E501 - """register # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.register_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param RegisterBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method register" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/register', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def reset_password( + self, + body: Optional[ResetPasswordRequest] = 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, + ) -> None: + """reset_password - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = [] # noqa: E501 + :param body: + :type body: ResetPasswordRequest + :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 - return self.api_client.call_api( - '/register', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse200', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._reset_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def reset_password(self, **kwargs): # noqa: E501 - """reset_password # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '404': None, + '422': "str", + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.reset_password(async_req=True) - >>> result = thread.get() - :param async_req bool - :param ResetPasswordBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.reset_password_with_http_info(**kwargs) # noqa: E501 + @validate_call + def reset_password_with_http_info( + self, + body: Optional[ResetPasswordRequest] = 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[None]: + """reset_password + + + :param body: + :type body: ResetPasswordRequest + :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._reset_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '404': None, + '422': "str", + '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 reset_password_without_preload_content( + self, + body: Optional[ResetPasswordRequest] = 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: + """reset_password + + + :param body: + :type body: ResetPasswordRequest + :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._reset_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '404': None, + '422': "str", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reset_password_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.reset_password_with_http_info(**kwargs) # noqa: E501 - return data - - def reset_password_with_http_info(self, **kwargs): # noqa: E501 - """reset_password # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.reset_password_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ResetPasswordBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method reset_password" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/resetPassword', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def reset_password_request( + self, + body: Optional[RegenerateAccountTokenRequest] = 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, + ) -> None: + """reset_password_request - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = [] # noqa: E501 + :param body: + :type body: RegenerateAccountTokenRequest + :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 - return self.api_client.call_api( - '/resetPassword', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._reset_password_request_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def reset_password_request(self, **kwargs): # noqa: E501 - """reset_password_request # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.reset_password_request(async_req=True) - >>> result = thread.get() - :param async_req bool - :param ResetPasswordRequestBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.reset_password_request_with_http_info(**kwargs) # noqa: E501 + @validate_call + def reset_password_request_with_http_info( + self, + body: Optional[RegenerateAccountTokenRequest] = 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[None]: + """reset_password_request + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._reset_password_request_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '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 reset_password_request_without_preload_content( + self, + body: Optional[RegenerateAccountTokenRequest] = 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: + """reset_password_request + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._reset_password_request_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reset_password_request_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.reset_password_request_with_http_info(**kwargs) # noqa: E501 - return data - - def reset_password_request_with_http_info(self, **kwargs): # noqa: E501 - """reset_password_request # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.reset_password_request_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ResetPasswordRequestBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method reset_password_request" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/resetPasswordRequest', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def verify( + self, + body: Optional[VerifyRequest] = 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, + ) -> Verify200Response: + """verify - # Authentication setting - auth_settings = [] # noqa: E501 - return self.api_client.call_api( - '/resetPasswordRequest', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + :param body: + :type body: VerifyRequest + :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 - def verify(self, **kwargs): # noqa: E501 - """verify # noqa: E501 + _param = self._verify_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.verify(async_req=True) - >>> result = thread.get() + _response_types_map: Dict[str, Optional[str]] = { + '200': "Verify200Response", + '404': None, + '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 - :param async_req bool - :param VerifyBody body: - :return: InlineResponse2001 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.verify_with_http_info(**kwargs) # noqa: E501 + + @validate_call + def verify_with_http_info( + self, + body: Optional[VerifyRequest] = 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[Verify200Response]: + """verify + + + :param body: + :type body: VerifyRequest + :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._verify_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Verify200Response", + '404': None, + '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 verify_without_preload_content( + self, + body: Optional[VerifyRequest] = 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: + """verify + + + :param body: + :type body: VerifyRequest + :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._verify_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Verify200Response", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _verify_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.verify_with_http_info(**kwargs) # noqa: E501 - return data - - def verify_with_http_info(self, **kwargs): # noqa: E501 - """verify # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.verify_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param VerifyBody body: - :return: InlineResponse2001 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method verify" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/verify', + 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 + ) - query_params = [] - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/verify', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2001', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py index 081dbe65..d99d3d3b 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py @@ -3,1289 +3,3825 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from zrok_api.api_client import ApiClient - - -class AdminApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 typing import List, Optional +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.list_organizations200_response import ListOrganizations200Response +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest +from zrok_api.models.update_frontend_request import UpdateFrontendRequest +from zrok_api.models.verify200_response import Verify200Response + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class AdminApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - def add_organization_member(self, **kwargs): # noqa: E501 - """add_organization_member # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_organization_member(async_req=True) - >>> result = thread.get() + @validate_call + def add_organization_member( + self, + body: Optional[AddOrganizationMemberRequest] = 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, + ) -> None: + """add_organization_member - :param async_req bool - :param OrganizationAddBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_organization_member_with_http_info(**kwargs) # noqa: E501 + + :param body: + :type body: AddOrganizationMemberRequest + :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_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '401': None, + '404': None, + '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_organization_member_with_http_info( + self, + body: Optional[AddOrganizationMemberRequest] = 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[None]: + """add_organization_member + + + :param body: + :type body: AddOrganizationMemberRequest + :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_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '401': None, + '404': None, + '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_organization_member_without_preload_content( + self, + body: Optional[AddOrganizationMemberRequest] = 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: + """add_organization_member + + + :param body: + :type body: AddOrganizationMemberRequest + :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_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_organization_member_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.add_organization_member_with_http_info(**kwargs) # noqa: E501 - return data - - def add_organization_member_with_http_info(self, **kwargs): # noqa: E501 - """add_organization_member # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_organization_member_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationAddBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method add_organization_member" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/organization/add', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def create_account( + self, + body: Optional[LoginRequest] = 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, + ) -> RegenerateAccountToken200Response: + """create_account - # Authentication setting - auth_settings = ['key'] # noqa: E501 - return self.api_client.call_api( - '/organization/add', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + :param body: + :type body: LoginRequest + :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 - def create_account(self, **kwargs): # noqa: E501 - """create_account # noqa: E501 + _param = self._create_account_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_account(async_req=True) - >>> result = thread.get() + _response_types_map: Dict[str, Optional[str]] = { + '201': "RegenerateAccountToken200Response", + '401': None, + '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 - :param async_req bool - :param AccountBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_account_with_http_info(**kwargs) # noqa: E501 + + @validate_call + def create_account_with_http_info( + self, + body: Optional[LoginRequest] = 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[RegenerateAccountToken200Response]: + """create_account + + + :param body: + :type body: LoginRequest + :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_account_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RegenerateAccountToken200Response", + '401': None, + '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_account_without_preload_content( + self, + body: Optional[LoginRequest] = 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: + """create_account + + + :param body: + :type body: LoginRequest + :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_account_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RegenerateAccountToken200Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_account_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.create_account_with_http_info(**kwargs) # noqa: E501 - return data - - def create_account_with_http_info(self, **kwargs): # noqa: E501 - """create_account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_account_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AccountBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_account" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/account', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def create_frontend( + self, + body: Optional[CreateFrontendRequest] = 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, + ) -> CreateFrontend201Response: + """create_frontend - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = ['key'] # noqa: E501 + :param body: + :type body: CreateFrontendRequest + :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 - return self.api_client.call_api( - '/account', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse200', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._create_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def create_frontend(self, **kwargs): # noqa: E501 - """create_frontend # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFrontend201Response", + '400': None, + '401': None, + '404': None, + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_frontend(async_req=True) - >>> result = thread.get() - :param async_req bool - :param FrontendBody body: - :return: InlineResponse201 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_frontend_with_http_info(**kwargs) # noqa: E501 + @validate_call + def create_frontend_with_http_info( + self, + body: Optional[CreateFrontendRequest] = 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[CreateFrontend201Response]: + """create_frontend + + + :param body: + :type body: CreateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFrontend201Response", + '400': None, + '401': None, + '404': None, + '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_frontend_without_preload_content( + self, + body: Optional[CreateFrontendRequest] = 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: + """create_frontend + + + :param body: + :type body: CreateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFrontend201Response", + '400': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_frontend_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.create_frontend_with_http_info(**kwargs) # noqa: E501 - return data - - def create_frontend_with_http_info(self, **kwargs): # noqa: E501 - """create_frontend # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_frontend_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param FrontendBody body: - :return: InlineResponse201 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_frontend" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/frontend', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def create_identity( + self, + body: Optional[CreateIdentityRequest] = 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, + ) -> CreateIdentity201Response: + """create_identity - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = ['key'] # noqa: E501 + :param body: + :type body: CreateIdentityRequest + :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 - return self.api_client.call_api( - '/frontend', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse201', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._create_identity_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def create_identity(self, **kwargs): # noqa: E501 - """create_identity # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_identity(async_req=True) - >>> result = thread.get() - :param async_req bool - :param IdentityBody body: - :return: InlineResponse2011 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_identity_with_http_info(**kwargs) # noqa: E501 + @validate_call + def create_identity_with_http_info( + self, + body: Optional[CreateIdentityRequest] = 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[CreateIdentity201Response]: + """create_identity + + + :param body: + :type body: CreateIdentityRequest + :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_identity_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '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_identity_without_preload_content( + self, + body: Optional[CreateIdentityRequest] = 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: + """create_identity + + + :param body: + :type body: CreateIdentityRequest + :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_identity_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_identity_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.create_identity_with_http_info(**kwargs) # noqa: E501 - return data - - def create_identity_with_http_info(self, **kwargs): # noqa: E501 - """create_identity # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_identity_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param IdentityBody body: - :return: InlineResponse2011 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_identity" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/identity', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def create_organization( + self, + body: Optional[CreateOrganizationRequest] = 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, + ) -> CreateOrganization201Response: + """create_organization - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = ['key'] # noqa: E501 + :param body: + :type body: CreateOrganizationRequest + :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 - return self.api_client.call_api( - '/identity', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2011', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._create_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def create_organization(self, **kwargs): # noqa: E501 - """create_organization # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateOrganization201Response", + '401': None, + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization(async_req=True) - >>> result = thread.get() - :param async_req bool - :param OrganizationBody body: - :return: InlineResponse2012 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_organization_with_http_info(**kwargs) # noqa: E501 + @validate_call + def create_organization_with_http_info( + self, + body: Optional[CreateOrganizationRequest] = 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[CreateOrganization201Response]: + """create_organization + + + :param body: + :type body: CreateOrganizationRequest + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateOrganization201Response", + '401': None, + '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_organization_without_preload_content( + self, + body: Optional[CreateOrganizationRequest] = 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: + """create_organization + + + :param body: + :type body: CreateOrganizationRequest + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateOrganization201Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_organization_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.create_organization_with_http_info(**kwargs) # noqa: E501 - return data - - def create_organization_with_http_info(self, **kwargs): # noqa: E501 - """create_organization # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationBody body: - :return: InlineResponse2012 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_organization" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/organization', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def delete_frontend( + self, + body: Optional[CreateFrontend201Response] = 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, + ) -> None: + """delete_frontend - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = ['key'] # noqa: E501 + :param body: + :type body: CreateFrontend201Response + :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 - return self.api_client.call_api( - '/organization', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2012', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._delete_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def delete_frontend(self, **kwargs): # noqa: E501 - """delete_frontend # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_frontend(async_req=True) - >>> result = thread.get() - :param async_req bool - :param FrontendBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_frontend_with_http_info(**kwargs) # noqa: E501 + @validate_call + def delete_frontend_with_http_info( + self, + body: Optional[CreateFrontend201Response] = 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[None]: + """delete_frontend + + + :param body: + :type body: CreateFrontend201Response + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_frontend_without_preload_content( + self, + body: Optional[CreateFrontend201Response] = 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: + """delete_frontend + + + :param body: + :type body: CreateFrontend201Response + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_frontend_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.delete_frontend_with_http_info(**kwargs) # noqa: E501 - return data - - def delete_frontend_with_http_info(self, **kwargs): # noqa: E501 - """delete_frontend # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_frontend_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param FrontendBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_frontend" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='DELETE', + resource_path='/frontend', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def delete_organization( + self, + body: Optional[CreateOrganization201Response] = 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, + ) -> None: + """delete_organization - # Authentication setting - auth_settings = ['key'] # noqa: E501 - return self.api_client.call_api( - '/frontend', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + :param body: + :type body: CreateOrganization201Response + :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 - def delete_organization(self, **kwargs): # noqa: E501 - """delete_organization # noqa: E501 + _param = self._delete_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_organization(async_req=True) - >>> result = thread.get() + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 - :param async_req bool - :param OrganizationBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_organization_with_http_info(**kwargs) # noqa: E501 + + @validate_call + def delete_organization_with_http_info( + self, + body: Optional[CreateOrganization201Response] = 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[None]: + """delete_organization + + + :param body: + :type body: CreateOrganization201Response + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_organization_without_preload_content( + self, + body: Optional[CreateOrganization201Response] = 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: + """delete_organization + + + :param body: + :type body: CreateOrganization201Response + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_organization_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.delete_organization_with_http_info(**kwargs) # noqa: E501 - return data - - def delete_organization_with_http_info(self, **kwargs): # noqa: E501 - """delete_organization # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_organization_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_organization" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organization', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def grants( + self, + body: Optional[Verify200Response] = 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, + ) -> None: + """grants - # Authentication setting - auth_settings = ['key'] # noqa: E501 - return self.api_client.call_api( - '/organization', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + :param body: + :type body: Verify200Response + :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 - def grants(self, **kwargs): # noqa: E501 - """grants # noqa: E501 + _param = self._grants_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.grants(async_req=True) - >>> result = thread.get() + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 - :param async_req bool - :param GrantsBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.grants_with_http_info(**kwargs) # noqa: E501 + + @validate_call + def grants_with_http_info( + self, + body: Optional[Verify200Response] = 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[None]: + """grants + + + :param body: + :type body: Verify200Response + :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._grants_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 grants_without_preload_content( + self, + body: Optional[Verify200Response] = 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: + """grants + + + :param body: + :type body: Verify200Response + :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._grants_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.grants_with_http_info(**kwargs) # noqa: E501 - return data - - def grants_with_http_info(self, **kwargs): # noqa: E501 - """grants # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.grants_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param GrantsBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method grants" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/grants', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def invite_token_generate( + self, + body: Optional[InviteTokenGenerateRequest] = 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, + ) -> None: + """invite_token_generate - # Authentication setting - auth_settings = ['key'] # noqa: E501 - return self.api_client.call_api( - '/grants', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + :param body: + :type body: InviteTokenGenerateRequest + :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 - def invite_token_generate(self, **kwargs): # noqa: E501 - """invite_token_generate # noqa: E501 + _param = self._invite_token_generate_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.invite_token_generate(async_req=True) - >>> result = thread.get() + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '401': None, + '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 - :param async_req bool - :param TokenGenerateBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.invite_token_generate_with_http_info(**kwargs) # noqa: E501 + + @validate_call + def invite_token_generate_with_http_info( + self, + body: Optional[InviteTokenGenerateRequest] = 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[None]: + """invite_token_generate + + + :param body: + :type body: InviteTokenGenerateRequest + :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._invite_token_generate_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '401': None, + '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 invite_token_generate_without_preload_content( + self, + body: Optional[InviteTokenGenerateRequest] = 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: + """invite_token_generate + + + :param body: + :type body: InviteTokenGenerateRequest + :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._invite_token_generate_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _invite_token_generate_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.invite_token_generate_with_http_info(**kwargs) # noqa: E501 - return data - - def invite_token_generate_with_http_info(self, **kwargs): # noqa: E501 - """invite_token_generate # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.invite_token_generate_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TokenGenerateBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method invite_token_generate" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/invite/token/generate', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def list_frontends( + 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, + ) -> List[ListFrontends200ResponseInner]: + """list_frontends - # Authentication setting - auth_settings = ['key'] # noqa: E501 - return self.api_client.call_api( - '/invite/token/generate', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + :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 - def list_frontends(self, **kwargs): # noqa: E501 - """list_frontends # noqa: E501 + _param = self._list_frontends_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_frontends(async_req=True) - >>> result = thread.get() + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListFrontends200ResponseInner]", + '401': None, + '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 - :param async_req bool - :return: list[InlineResponse2002] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_frontends_with_http_info(**kwargs) # noqa: E501 + + @validate_call + def list_frontends_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[List[ListFrontends200ResponseInner]]: + """list_frontends + + + :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_frontends_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListFrontends200ResponseInner]", + '401': None, + '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_frontends_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: + """list_frontends + + + :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_frontends_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListFrontends200ResponseInner]", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_frontends_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, Union[str, bytes]] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/frontends', + 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_organization_members( + self, + body: Optional[CreateOrganization201Response] = 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, + ) -> ListOrganizationMembers200Response: + """list_organization_members + + + :param body: + :type body: CreateOrganization201Response + :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_organization_members_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '401': None, + '404': None, + '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_organization_members_with_http_info( + self, + body: Optional[CreateOrganization201Response] = 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[ListOrganizationMembers200Response]: + """list_organization_members + + + :param body: + :type body: CreateOrganization201Response + :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_organization_members_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '401': None, + '404': None, + '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_organization_members_without_preload_content( + self, + body: Optional[CreateOrganization201Response] = 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_organization_members + + + :param body: + :type body: CreateOrganization201Response + :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_organization_members_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_organization_members_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.list_frontends_with_http_info(**kwargs) # noqa: E501 - return data - - def list_frontends_with_http_info(self, **kwargs): # noqa: E501 - """list_frontends # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_frontends_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[InlineResponse2002] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_frontends" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/organization/list', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def list_organizations( + 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, + ) -> ListOrganizations200Response: + """list_organizations - # Authentication setting - auth_settings = ['key'] # noqa: E501 - return self.api_client.call_api( - '/frontends', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[InlineResponse2002]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + :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 - def list_organization_members(self, **kwargs): # noqa: E501 - """list_organization_members # noqa: E501 + _param = self._list_organizations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organization_members(async_req=True) - >>> result = thread.get() + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizations200Response", + '401': None, + '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 - :param async_req bool - :param OrganizationListBody body: - :return: InlineResponse2003 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_organization_members_with_http_info(**kwargs) # noqa: E501 + + @validate_call + def list_organizations_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[ListOrganizations200Response]: + """list_organizations + + + :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_organizations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizations200Response", + '401': None, + '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_organizations_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: + """list_organizations + + + :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_organizations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizations200Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_organizations_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, Union[str, bytes]] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations', + 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 remove_organization_member( + self, + body: Optional[RemoveOrganizationMemberRequest] = 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, + ) -> None: + """remove_organization_member + + + :param body: + :type body: RemoveOrganizationMemberRequest + :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._remove_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 remove_organization_member_with_http_info( + self, + body: Optional[RemoveOrganizationMemberRequest] = 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[None]: + """remove_organization_member + + + :param body: + :type body: RemoveOrganizationMemberRequest + :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._remove_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 remove_organization_member_without_preload_content( + self, + body: Optional[RemoveOrganizationMemberRequest] = 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: + """remove_organization_member + + + :param body: + :type body: RemoveOrganizationMemberRequest + :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._remove_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_organization_member_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.list_organization_members_with_http_info(**kwargs) # noqa: E501 - return data - - def list_organization_members_with_http_info(self, **kwargs): # noqa: E501 - """list_organization_members # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organization_members_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationListBody body: - :return: InlineResponse2003 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_organization_members" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/organization/remove', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def update_frontend( + self, + body: Optional[UpdateFrontendRequest] = 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, + ) -> None: + """update_frontend - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = ['key'] # noqa: E501 + :param body: + :type body: UpdateFrontendRequest + :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 - return self.api_client.call_api( - '/organization/list', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2003', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._update_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def list_organizations(self, **kwargs): # noqa: E501 - """list_organizations # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organizations(async_req=True) - >>> result = thread.get() - :param async_req bool - :return: InlineResponse2004 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_organizations_with_http_info(**kwargs) # noqa: E501 + @validate_call + def update_frontend_with_http_info( + self, + body: Optional[UpdateFrontendRequest] = 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[None]: + """update_frontend + + + :param body: + :type body: UpdateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_frontend_without_preload_content( + self, + body: Optional[UpdateFrontendRequest] = 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: + """update_frontend + + + :param body: + :type body: UpdateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_frontend_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.list_organizations_with_http_info(**kwargs) # noqa: E501 - return data - - def list_organizations_with_http_info(self, **kwargs): # noqa: E501 - """list_organizations # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organizations_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: InlineResponse2004 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_organizations" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='PATCH', + resource_path='/frontend', + 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 + ) - query_params = [] - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/organizations', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2004', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def remove_organization_member(self, **kwargs): # noqa: E501 - """remove_organization_member # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_organization_member(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationRemoveBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.remove_organization_member_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.remove_organization_member_with_http_info(**kwargs) # noqa: E501 - return data - - def remove_organization_member_with_http_info(self, **kwargs): # noqa: E501 - """remove_organization_member # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_organization_member_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationRemoveBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method remove_organization_member" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/organization/remove', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_frontend(self, **kwargs): # noqa: E501 - """update_frontend # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_frontend(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param FrontendBody2 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_frontend_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.update_frontend_with_http_info(**kwargs) # noqa: E501 - return data - - def update_frontend_with_http_info(self, **kwargs): # noqa: E501 - """update_frontend # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_frontend_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param FrontendBody2 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update_frontend" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/frontend', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py b/sdk/python/sdk/zrok/zrok_api/api/environment_api.py index 16bc987e..ded46760 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/environment_api.py @@ -3,213 +3,583 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from zrok_api.api_client import ApiClient - - -class EnvironmentApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 typing import Optional +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.disable_request import DisableRequest +from zrok_api.models.enable_request import EnableRequest + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class EnvironmentApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - def disable(self, **kwargs): # noqa: E501 - """disable # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.disable(async_req=True) - >>> result = thread.get() + @validate_call + def disable( + self, + body: Optional[DisableRequest] = 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, + ) -> None: + """disable - :param async_req bool - :param DisableBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.disable_with_http_info(**kwargs) # noqa: E501 + + :param body: + :type body: DisableRequest + :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._disable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '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 disable_with_http_info( + self, + body: Optional[DisableRequest] = 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[None]: + """disable + + + :param body: + :type body: DisableRequest + :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._disable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '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 disable_without_preload_content( + self, + body: Optional[DisableRequest] = 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: + """disable + + + :param body: + :type body: DisableRequest + :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._disable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _disable_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.disable_with_http_info(**kwargs) # noqa: E501 - return data - - def disable_with_http_info(self, **kwargs): # noqa: E501 - """disable # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.disable_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param DisableBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method disable" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/disable', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def enable( + self, + body: Optional[EnableRequest] = 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, + ) -> CreateIdentity201Response: + """enable - # Authentication setting - auth_settings = ['key'] # noqa: E501 - return self.api_client.call_api( - '/disable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + :param body: + :type body: EnableRequest + :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 - def enable(self, **kwargs): # noqa: E501 - """enable # noqa: E501 + _param = self._enable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.enable(async_req=True) - >>> result = thread.get() + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '404': None, + '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 - :param async_req bool - :param EnableBody body: - :return: InlineResponse2011 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.enable_with_http_info(**kwargs) # noqa: E501 + + @validate_call + def enable_with_http_info( + self, + body: Optional[EnableRequest] = 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[CreateIdentity201Response]: + """enable + + + :param body: + :type body: EnableRequest + :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._enable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '404': None, + '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 enable_without_preload_content( + self, + body: Optional[EnableRequest] = 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: + """enable + + + :param body: + :type body: EnableRequest + :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._enable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _enable_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.enable_with_http_info(**kwargs) # noqa: E501 - return data - - def enable_with_http_info(self, **kwargs): # noqa: E501 - """enable # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.enable_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param EnableBody body: - :return: InlineResponse2011 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method enable" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/enable', + 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 + ) - query_params = [] - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/enable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2011', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py index 6db4a488..8ade5b51 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py @@ -3,1484 +3,4208 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from zrok_api.api_client import ApiClient - - -class MetadataApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import List, Optional +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest +from zrok_api.models.configuration import Configuration +from zrok_api.models.environment import Environment +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from zrok_api.models.frontend import Frontend +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest +from zrok_api.models.list_memberships200_response import ListMemberships200Response +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.metrics import Metrics +from zrok_api.models.overview import Overview +from zrok_api.models.share import Share +from zrok_api.models.version_inventory200_response import VersionInventory200Response + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class MetadataApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - def client_version_check(self, **kwargs): # noqa: E501 - """client_version_check # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.client_version_check(async_req=True) - >>> result = thread.get() + @validate_call + def client_version_check( + self, + body: Optional[ClientVersionCheckRequest] = 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, + ) -> None: + """client_version_check - :param async_req bool - :param ClientVersionCheckBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.client_version_check_with_http_info(**kwargs) # noqa: E501 + + :param body: + :type body: ClientVersionCheckRequest + :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._client_version_check_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "str", + } + 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 client_version_check_with_http_info( + self, + body: Optional[ClientVersionCheckRequest] = 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[None]: + """client_version_check + + + :param body: + :type body: ClientVersionCheckRequest + :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._client_version_check_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "str", + } + 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 client_version_check_without_preload_content( + self, + body: Optional[ClientVersionCheckRequest] = 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: + """client_version_check + + + :param body: + :type body: ClientVersionCheckRequest + :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._client_version_check_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _client_version_check_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.client_version_check_with_http_info(**kwargs) # noqa: E501 - return data - - def client_version_check_with_http_info(self, **kwargs): # noqa: E501 - """client_version_check # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.client_version_check_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ClientVersionCheckBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method client_version_check" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/clientVersionCheck', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def configuration( + 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, + ) -> Configuration: + """configuration - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = [] # noqa: E501 + :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 - return self.api_client.call_api( - # '/version', 'POST', - '/clientVersionCheck', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def configuration(self, **kwargs): # noqa: E501 - """configuration # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '200': "Configuration", + } + 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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.configuration(async_req=True) - >>> result = thread.get() - :param async_req bool - :return: Configuration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.configuration_with_http_info(**kwargs) # noqa: E501 + @validate_call + def configuration_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[Configuration]: + """configuration + + + :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._configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Configuration", + } + 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 configuration_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: + """configuration + + + :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._configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Configuration", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _configuration_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, Union[str, bytes]] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/configuration', + 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 get_account_detail( + 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, + ) -> List[Environment]: + """get_account_detail + + + :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_account_detail_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Environment]", + '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_account_detail_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[List[Environment]]: + """get_account_detail + + + :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_account_detail_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Environment]", + '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_account_detail_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_account_detail + + + :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_account_detail_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Environment]", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_account_detail_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, Union[str, bytes]] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/account', + 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 get_account_metrics( + self, + 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, + ) -> Metrics: + """get_account_metrics + + + :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._get_account_metrics_serialize( + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '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_account_metrics_with_http_info( + self, + 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[Metrics]: + """get_account_metrics + + + :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._get_account_metrics_serialize( + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '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_account_metrics_without_preload_content( + self, + 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: + """get_account_metrics + + + :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._get_account_metrics_serialize( + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_account_metrics_serialize( + self, + 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, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # 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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/metrics/account', + 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 get_environment_detail( + self, + env_zid: StrictStr, + _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, + ) -> EnvironmentAndResources: + """get_environment_detail + + + :param env_zid: (required) + :type env_zid: 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._get_environment_detail_serialize( + env_zid=env_zid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentAndResources", + '401': None, + '404': None, + '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_environment_detail_with_http_info( + self, + env_zid: StrictStr, + _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[EnvironmentAndResources]: + """get_environment_detail + + + :param env_zid: (required) + :type env_zid: 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._get_environment_detail_serialize( + env_zid=env_zid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentAndResources", + '401': None, + '404': None, + '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_environment_detail_without_preload_content( + self, + env_zid: StrictStr, + _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_environment_detail + + + :param env_zid: (required) + :type env_zid: 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._get_environment_detail_serialize( + env_zid=env_zid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentAndResources", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_environment_detail_serialize( + self, + env_zid, + _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, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if env_zid is not None: + _path_params['envZId'] = env_zid + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/environment/{envZId}', + 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 get_environment_metrics( + self, + env_id: StrictStr, + 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, + ) -> Metrics: + """get_environment_metrics + + + :param env_id: (required) + :type env_id: str + :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._get_environment_metrics_serialize( + env_id=env_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': "Metrics", + '400': None, + '401': None, + '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_environment_metrics_with_http_info( + self, + env_id: StrictStr, + 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[Metrics]: + """get_environment_metrics + + + :param env_id: (required) + :type env_id: str + :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._get_environment_metrics_serialize( + env_id=env_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': "Metrics", + '400': None, + '401': None, + '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_environment_metrics_without_preload_content( + self, + env_id: StrictStr, + 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: + """get_environment_metrics + + + :param env_id: (required) + :type env_id: str + :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._get_environment_metrics_serialize( + env_id=env_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': "Metrics", + '400': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_environment_metrics_serialize( + self, + env_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, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if env_id is not None: + _path_params['envId'] = env_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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/metrics/environment/{envId}', + 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 get_frontend_detail( + self, + frontend_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, + ) -> Frontend: + """get_frontend_detail + + + :param frontend_id: (required) + :type frontend_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._get_frontend_detail_serialize( + frontend_id=frontend_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Frontend", + '401': None, + '404': None, + '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_frontend_detail_with_http_info( + self, + frontend_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[Frontend]: + """get_frontend_detail + + + :param frontend_id: (required) + :type frontend_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._get_frontend_detail_serialize( + frontend_id=frontend_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Frontend", + '401': None, + '404': None, + '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_frontend_detail_without_preload_content( + self, + frontend_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: + """get_frontend_detail + + + :param frontend_id: (required) + :type frontend_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._get_frontend_detail_serialize( + frontend_id=frontend_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Frontend", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_frontend_detail_serialize( + self, + frontend_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, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if frontend_id is not None: + _path_params['frontendId'] = frontend_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/frontend/{frontendId}', + 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 get_share_detail( + self, + share_token: StrictStr, + _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, + ) -> Share: + """get_share_detail + + + :param share_token: (required) + :type share_token: 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._get_share_detail_serialize( + share_token=share_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Share", + '401': None, + '404': None, + '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_share_detail_with_http_info( + self, + share_token: StrictStr, + _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[Share]: + """get_share_detail + + + :param share_token: (required) + :type share_token: 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._get_share_detail_serialize( + share_token=share_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Share", + '401': None, + '404': None, + '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_share_detail_without_preload_content( + self, + share_token: StrictStr, + _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_share_detail + + + :param share_token: (required) + :type share_token: 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._get_share_detail_serialize( + share_token=share_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Share", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_share_detail_serialize( + self, + share_token, + _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, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if share_token is not None: + _path_params['shareToken'] = share_token + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/share/{shareToken}', + 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 get_share_metrics( + self, + share_token: StrictStr, + 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, + ) -> Metrics: + """get_share_metrics + + + :param share_token: (required) + :type share_token: str + :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._get_share_metrics_serialize( + share_token=share_token, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '401': None, + '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_share_metrics_with_http_info( + self, + share_token: StrictStr, + 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[Metrics]: + """get_share_metrics + + + :param share_token: (required) + :type share_token: str + :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._get_share_metrics_serialize( + share_token=share_token, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '401': None, + '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_share_metrics_without_preload_content( + self, + share_token: StrictStr, + 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: + """get_share_metrics + + + :param share_token: (required) + :type share_token: str + :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._get_share_metrics_serialize( + share_token=share_token, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_share_metrics_serialize( + self, + share_token, + 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, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if share_token is not None: + _path_params['shareToken'] = share_token + # 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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/metrics/share/{shareToken}', + 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 get_sparklines( + self, + body: Optional[GetSparklinesRequest] = 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, + ) -> GetSparklines200Response: + """get_sparklines + + + :param body: + :type body: GetSparklinesRequest + :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_sparklines_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSparklines200Response", + '401': None, + '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_sparklines_with_http_info( + self, + body: Optional[GetSparklinesRequest] = 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[GetSparklines200Response]: + """get_sparklines + + + :param body: + :type body: GetSparklinesRequest + :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_sparklines_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSparklines200Response", + '401': None, + '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_sparklines_without_preload_content( + self, + body: Optional[GetSparklinesRequest] = 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: + """get_sparklines + + + :param body: + :type body: GetSparklinesRequest + :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_sparklines_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSparklines200Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_sparklines_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.configuration_with_http_info(**kwargs) # noqa: E501 - return data - - def configuration_with_http_info(self, **kwargs): # noqa: E501 - """configuration # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.configuration_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Configuration - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method configuration" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/configuration', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Configuration', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_account_detail(self, **kwargs): # noqa: E501 - """get_account_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_account_detail(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Environments - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_account_detail_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_account_detail_with_http_info(**kwargs) # noqa: E501 - return data - - def get_account_detail_with_http_info(self, **kwargs): # noqa: E501 - """get_account_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_account_detail_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Environments - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_account_detail" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/detail/account', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Environments', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_account_metrics(self, **kwargs): # noqa: E501 - """get_account_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_account_metrics(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_account_metrics_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_account_metrics_with_http_info(**kwargs) # noqa: E501 - return data - - def get_account_metrics_with_http_info(self, **kwargs): # noqa: E501 - """get_account_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_account_metrics_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['duration'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_account_metrics" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'duration' in params: - query_params.append(('duration', params['duration'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/metrics/account', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Metrics', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_environment_detail(self, env_zid, **kwargs): # noqa: E501 - """get_environment_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_environment_detail(env_zid, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str env_zid: (required) - :return: EnvironmentAndResources - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_environment_detail_with_http_info(env_zid, **kwargs) # noqa: E501 - else: - (data) = self.get_environment_detail_with_http_info(env_zid, **kwargs) # noqa: E501 - return data - - def get_environment_detail_with_http_info(self, env_zid, **kwargs): # noqa: E501 - """get_environment_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_environment_detail_with_http_info(env_zid, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str env_zid: (required) - :return: EnvironmentAndResources - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['env_zid'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_environment_detail" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'env_zid' is set - if ('env_zid' not in params or - params['env_zid'] is None): - raise ValueError("Missing the required parameter `env_zid` when calling `get_environment_detail`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'env_zid' in params: - path_params['envZId'] = params['env_zid'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/detail/environment/{envZId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='EnvironmentAndResources', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_environment_metrics(self, env_id, **kwargs): # noqa: E501 - """get_environment_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_environment_metrics(env_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str env_id: (required) - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_environment_metrics_with_http_info(env_id, **kwargs) # noqa: E501 - else: - (data) = self.get_environment_metrics_with_http_info(env_id, **kwargs) # noqa: E501 - return data - - def get_environment_metrics_with_http_info(self, env_id, **kwargs): # noqa: E501 - """get_environment_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_environment_metrics_with_http_info(env_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str env_id: (required) - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['env_id', 'duration'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_environment_metrics" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'env_id' is set - if ('env_id' not in params or - params['env_id'] is None): - raise ValueError("Missing the required parameter `env_id` when calling `get_environment_metrics`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'env_id' in params: - path_params['envId'] = params['env_id'] # noqa: E501 - - query_params = [] - if 'duration' in params: - query_params.append(('duration', params['duration'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/metrics/environment/{envId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Metrics', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_frontend_detail(self, frontend_id, **kwargs): # noqa: E501 - """get_frontend_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_frontend_detail(frontend_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int frontend_id: (required) - :return: Frontend - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_frontend_detail_with_http_info(frontend_id, **kwargs) # noqa: E501 - else: - (data) = self.get_frontend_detail_with_http_info(frontend_id, **kwargs) # noqa: E501 - return data - - def get_frontend_detail_with_http_info(self, frontend_id, **kwargs): # noqa: E501 - """get_frontend_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_frontend_detail_with_http_info(frontend_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int frontend_id: (required) - :return: Frontend - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['frontend_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_frontend_detail" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'frontend_id' is set - if ('frontend_id' not in params or - params['frontend_id'] is None): - raise ValueError("Missing the required parameter `frontend_id` when calling `get_frontend_detail`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'frontend_id' in params: - path_params['frontendId'] = params['frontend_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/detail/frontend/{frontendId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Frontend', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_share_detail(self, share_token, **kwargs): # noqa: E501 - """get_share_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_share_detail(share_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str share_token: (required) - :return: Share - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_share_detail_with_http_info(share_token, **kwargs) # noqa: E501 - else: - (data) = self.get_share_detail_with_http_info(share_token, **kwargs) # noqa: E501 - return data - - def get_share_detail_with_http_info(self, share_token, **kwargs): # noqa: E501 - """get_share_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_share_detail_with_http_info(share_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str share_token: (required) - :return: Share - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['share_token'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_share_detail" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'share_token' is set - if ('share_token' not in params or - params['share_token'] is None): - raise ValueError("Missing the required parameter `share_token` when calling `get_share_detail`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'share_token' in params: - path_params['shareToken'] = params['share_token'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/detail/share/{shareToken}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Share', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_share_metrics(self, share_token, **kwargs): # noqa: E501 - """get_share_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_share_metrics(share_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str share_token: (required) - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_share_metrics_with_http_info(share_token, **kwargs) # noqa: E501 - else: - (data) = self.get_share_metrics_with_http_info(share_token, **kwargs) # noqa: E501 - return data - - def get_share_metrics_with_http_info(self, share_token, **kwargs): # noqa: E501 - """get_share_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_share_metrics_with_http_info(share_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str share_token: (required) - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['share_token', 'duration'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_share_metrics" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'share_token' is set - if ('share_token' not in params or - params['share_token'] is None): - raise ValueError("Missing the required parameter `share_token` when calling `get_share_metrics`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'share_token' in params: - path_params['shareToken'] = params['share_token'] # noqa: E501 - - query_params = [] - if 'duration' in params: - query_params.append(('duration', params['duration'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/metrics/share/{shareToken}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Metrics', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_sparklines(self, **kwargs): # noqa: E501 - """get_sparklines # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sparklines(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SparklinesBody body: - :return: InlineResponse2006 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_sparklines_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_sparklines_with_http_info(**kwargs) # noqa: E501 - return data - - def get_sparklines_with_http_info(self, **kwargs): # noqa: E501 - """get_sparklines # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sparklines_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SparklinesBody body: - :return: InlineResponse2006 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_sparklines" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/sparklines', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2006', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_memberships(self, **kwargs): # noqa: E501 - """list_memberships # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_memberships(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: InlineResponse2005 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_memberships_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_memberships_with_http_info(**kwargs) # noqa: E501 - return data - - def list_memberships_with_http_info(self, **kwargs): # noqa: E501 - """list_memberships # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_memberships_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: InlineResponse2005 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_memberships" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/memberships', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2005', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_org_members(self, organization_token, **kwargs): # noqa: E501 - """list_org_members # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_org_members(organization_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str organization_token: (required) - :return: InlineResponse2003 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_org_members_with_http_info(organization_token, **kwargs) # noqa: E501 - else: - (data) = self.list_org_members_with_http_info(organization_token, **kwargs) # noqa: E501 - return data - - def list_org_members_with_http_info(self, organization_token, **kwargs): # noqa: E501 - """list_org_members # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_org_members_with_http_info(organization_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str organization_token: (required) - :return: InlineResponse2003 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['organization_token'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_org_members" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'organization_token' is set - if ('organization_token' not in params or - params['organization_token'] is None): - raise ValueError("Missing the required parameter `organization_token` when calling `list_org_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'organization_token' in params: - path_params['organizationToken'] = params['organization_token'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/members/{organizationToken}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2003', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def org_account_overview(self, organization_token, account_email, **kwargs): # noqa: E501 - """org_account_overview # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_account_overview(organization_token, account_email, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str organization_token: (required) - :param str account_email: (required) - :return: Overview - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.org_account_overview_with_http_info(organization_token, account_email, **kwargs) # noqa: E501 - else: - (data) = self.org_account_overview_with_http_info(organization_token, account_email, **kwargs) # noqa: E501 - return data - - def org_account_overview_with_http_info(self, organization_token, account_email, **kwargs): # noqa: E501 - """org_account_overview # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_account_overview_with_http_info(organization_token, account_email, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str organization_token: (required) - :param str account_email: (required) - :return: Overview - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['organization_token', 'account_email'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method org_account_overview" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'organization_token' is set - if ('organization_token' not in params or - params['organization_token'] is None): - raise ValueError("Missing the required parameter `organization_token` when calling `org_account_overview`") # noqa: E501 - # verify the required parameter 'account_email' is set - if ('account_email' not in params or - params['account_email'] is None): - raise ValueError("Missing the required parameter `account_email` when calling `org_account_overview`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'organization_token' in params: - path_params['organizationToken'] = params['organization_token'] # noqa: E501 - if 'account_email' in params: - path_params['accountEmail'] = params['account_email'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/overview/{organizationToken}/{accountEmail}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Overview', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def overview(self, **kwargs): # noqa: E501 - """overview # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.overview(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Overview - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.overview_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.overview_with_http_info(**kwargs) # noqa: E501 - return data - - def overview_with_http_info(self, **kwargs): # noqa: E501 - """overview # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.overview_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Overview - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method overview" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/overview', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Overview', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def version(self, **kwargs): # noqa: E501 - """version # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.version(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Version - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.version_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.version_with_http_info(**kwargs) # noqa: E501 - return data - - def version_with_http_info(self, **kwargs): # noqa: E501 - """version # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.version_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Version - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method version" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/version', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Version', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def version_inventory(self, **kwargs): # noqa: E501 - """version_inventory # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.version_inventory(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: InlineResponse2007 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.version_inventory_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.version_inventory_with_http_info(**kwargs) # noqa: E501 - return data - - def version_inventory_with_http_info(self, **kwargs): # noqa: E501 - """version_inventory # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.version_inventory_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: InlineResponse2007 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method version_inventory" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/versions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2007', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sparklines', + 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_memberships( + 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, + ) -> ListMemberships200Response: + """list_memberships + + + :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_memberships_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMemberships200Response", + '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_memberships_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[ListMemberships200Response]: + """list_memberships + + + :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_memberships_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMemberships200Response", + '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_memberships_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: + """list_memberships + + + :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_memberships_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMemberships200Response", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_memberships_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, Union[str, bytes]] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/memberships', + 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_org_members( + self, + organization_token: StrictStr, + _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, + ) -> ListOrganizationMembers200Response: + """list_org_members + + + :param organization_token: (required) + :type organization_token: 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._list_org_members_serialize( + organization_token=organization_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '404': None, + '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_org_members_with_http_info( + self, + organization_token: StrictStr, + _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[ListOrganizationMembers200Response]: + """list_org_members + + + :param organization_token: (required) + :type organization_token: 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._list_org_members_serialize( + organization_token=organization_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '404': None, + '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_org_members_without_preload_content( + self, + organization_token: StrictStr, + _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_org_members + + + :param organization_token: (required) + :type organization_token: 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._list_org_members_serialize( + organization_token=organization_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_org_members_serialize( + self, + organization_token, + _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, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_token is not None: + _path_params['organizationToken'] = organization_token + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/members/{organizationToken}', + 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 org_account_overview( + self, + organization_token: StrictStr, + account_email: StrictStr, + _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, + ) -> Overview: + """org_account_overview + + + :param organization_token: (required) + :type organization_token: str + :param account_email: (required) + :type account_email: 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._org_account_overview_serialize( + organization_token=organization_token, + account_email=account_email, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '404': None, + '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 org_account_overview_with_http_info( + self, + organization_token: StrictStr, + account_email: StrictStr, + _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[Overview]: + """org_account_overview + + + :param organization_token: (required) + :type organization_token: str + :param account_email: (required) + :type account_email: 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._org_account_overview_serialize( + organization_token=organization_token, + account_email=account_email, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '404': None, + '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 org_account_overview_without_preload_content( + self, + organization_token: StrictStr, + account_email: StrictStr, + _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: + """org_account_overview + + + :param organization_token: (required) + :type organization_token: str + :param account_email: (required) + :type account_email: 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._org_account_overview_serialize( + organization_token=organization_token, + account_email=account_email, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _org_account_overview_serialize( + self, + organization_token, + account_email, + _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, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_token is not None: + _path_params['organizationToken'] = organization_token + if account_email is not None: + _path_params['accountEmail'] = account_email + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/overview/{organizationToken}/{accountEmail}', + 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 overview( + 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, + ) -> Overview: + """overview + + + :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._overview_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '500': "str", + } + 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 overview_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[Overview]: + """overview + + + :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._overview_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '500': "str", + } + 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 overview_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: + """overview + + + :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._overview_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '500': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _overview_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, Union[str, bytes]] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/overview', + 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 version( + 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, + ) -> str: + """version + + + :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._version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + 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 version_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[str]: + """version + + + :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._version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + 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 version_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: + """version + + + :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._version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _version_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, Union[str, bytes]] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/version', + 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 version_inventory( + 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, + ) -> VersionInventory200Response: + """version_inventory + + + :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._version_inventory_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionInventory200Response", + } + 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 version_inventory_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[VersionInventory200Response]: + """version_inventory + + + :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._version_inventory_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionInventory200Response", + } + 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 version_inventory_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: + """version_inventory + + + :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._version_inventory_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionInventory200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _version_inventory_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, Union[str, bytes]] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/versions', + 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/sdk/python/sdk/zrok/zrok_api/api/share_api.py b/sdk/python/sdk/zrok/zrok_api/api/share_api.py index 49362e17..955ca11b 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/share_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/share_api.py @@ -3,577 +3,1698 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from zrok_api.api_client import ApiClient - - -class ShareApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 typing import Optional +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.share_response import ShareResponse +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.models.unshare_request import UnshareRequest +from zrok_api.models.update_access_request import UpdateAccessRequest +from zrok_api.models.update_share_request import UpdateShareRequest + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class ShareApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen """ - def __init__(self, api_client=None): + def __init__(self, api_client=None) -> None: if api_client is None: - api_client = ApiClient() + api_client = ApiClient.get_default() self.api_client = api_client - def access(self, **kwargs): # noqa: E501 - """access # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.access(async_req=True) - >>> result = thread.get() + @validate_call + def access( + self, + body: Optional[AccessRequest] = 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, + ) -> Access201Response: + """access - :param async_req bool - :param AccessBody body: - :return: InlineResponse2013 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.access_with_http_info(**kwargs) # noqa: E501 + + :param body: + :type body: AccessRequest + :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._access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Access201Response", + '401': None, + '404': None, + '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 access_with_http_info( + self, + body: Optional[AccessRequest] = 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[Access201Response]: + """access + + + :param body: + :type body: AccessRequest + :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._access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Access201Response", + '401': None, + '404': None, + '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 access_without_preload_content( + self, + body: Optional[AccessRequest] = 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: + """access + + + :param body: + :type body: AccessRequest + :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._access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Access201Response", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _access_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.access_with_http_info(**kwargs) # noqa: E501 - return data - - def access_with_http_info(self, **kwargs): # noqa: E501 - """access # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.access_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AccessBody body: - :return: InlineResponse2013 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method access" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/access', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def share( + self, + body: Optional[ShareRequest] = 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, + ) -> ShareResponse: + """share - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = ['key'] # noqa: E501 + :param body: + :type body: ShareRequest + :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 - return self.api_client.call_api( - '/access', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2013', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def share(self, **kwargs): # noqa: E501 - """share # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareResponse", + '401': None, + '404': None, + '409': None, + '422': None, + '500': "str", + } + 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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.share(async_req=True) - >>> result = thread.get() - :param async_req bool - :param ShareRequest body: - :return: ShareResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.share_with_http_info(**kwargs) # noqa: E501 + @validate_call + def share_with_http_info( + self, + body: Optional[ShareRequest] = 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[ShareResponse]: + """share + + + :param body: + :type body: ShareRequest + :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._share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareResponse", + '401': None, + '404': None, + '409': None, + '422': None, + '500': "str", + } + 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 share_without_preload_content( + self, + body: Optional[ShareRequest] = 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: + """share + + + :param body: + :type body: ShareRequest + :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._share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareResponse", + '401': None, + '404': None, + '409': None, + '422': None, + '500': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _share_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.share_with_http_info(**kwargs) # noqa: E501 - return data - - def share_with_http_info(self, **kwargs): # noqa: E501 - """share # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.share_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ShareRequest body: - :return: ShareResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method share" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='POST', + resource_path='/share', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def unaccess( + self, + body: Optional[UnaccessRequest] = 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, + ) -> None: + """unaccess - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = ['key'] # noqa: E501 + :param body: + :type body: UnaccessRequest + :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 - return self.api_client.call_api( - '/share', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ShareResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._unaccess_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def unaccess(self, **kwargs): # noqa: E501 - """unaccess # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unaccess(async_req=True) - >>> result = thread.get() - :param async_req bool - :param UnaccessBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.unaccess_with_http_info(**kwargs) # noqa: E501 + @validate_call + def unaccess_with_http_info( + self, + body: Optional[UnaccessRequest] = 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[None]: + """unaccess + + + :param body: + :type body: UnaccessRequest + :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._unaccess_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 unaccess_without_preload_content( + self, + body: Optional[UnaccessRequest] = 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: + """unaccess + + + :param body: + :type body: UnaccessRequest + :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._unaccess_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unaccess_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.unaccess_with_http_info(**kwargs) # noqa: E501 - return data - - def unaccess_with_http_info(self, **kwargs): # noqa: E501 - """unaccess # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unaccess_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnaccessBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method unaccess" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='DELETE', + resource_path='/unaccess', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def unshare( + self, + body: Optional[UnshareRequest] = 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, + ) -> None: + """unshare - # Authentication setting - auth_settings = ['key'] # noqa: E501 - return self.api_client.call_api( - '/unaccess', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + :param body: + :type body: UnshareRequest + :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 - def unshare(self, **kwargs): # noqa: E501 - """unshare # noqa: E501 + _param = self._unshare_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unshare(async_req=True) - >>> result = thread.get() + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': "str", + } + 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 - :param async_req bool - :param UnshareBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.unshare_with_http_info(**kwargs) # noqa: E501 + + @validate_call + def unshare_with_http_info( + self, + body: Optional[UnshareRequest] = 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[None]: + """unshare + + + :param body: + :type body: UnshareRequest + :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._unshare_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': "str", + } + 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 unshare_without_preload_content( + self, + body: Optional[UnshareRequest] = 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: + """unshare + + + :param body: + :type body: UnshareRequest + :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._unshare_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unshare_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.unshare_with_http_info(**kwargs) # noqa: E501 - return data - - def unshare_with_http_info(self, **kwargs): # noqa: E501 - """unshare # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unshare_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnshareBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method unshare" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='DELETE', + resource_path='/unshare', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def update_access( + self, + body: Optional[UpdateAccessRequest] = 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, + ) -> None: + """update_access - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - # Authentication setting - auth_settings = ['key'] # noqa: E501 + :param body: + :type body: UpdateAccessRequest + :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 - return self.api_client.call_api( - '/unshare', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + _param = self._update_access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - def update_access(self, **kwargs): # noqa: E501 - """update_access # noqa: E501 + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_access(async_req=True) - >>> result = thread.get() - :param async_req bool - :param AccessBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_access_with_http_info(**kwargs) # noqa: E501 + @validate_call + def update_access_with_http_info( + self, + body: Optional[UpdateAccessRequest] = 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[None]: + """update_access + + + :param body: + :type body: UpdateAccessRequest + :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_access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_access_without_preload_content( + self, + body: Optional[UpdateAccessRequest] = 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: + """update_access + + + :param body: + :type body: UpdateAccessRequest + :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_access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_access_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.update_access_with_http_info(**kwargs) # noqa: E501 - return data - - def update_access_with_http_info(self, **kwargs): # noqa: E501 - """update_access # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_access_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AccessBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update_access" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='PATCH', + resource_path='/access', + 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 + ) - query_params = [] - header_params = {} - form_params = [] - local_var_files = {} - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 + @validate_call + def update_share( + self, + body: Optional[UpdateShareRequest] = 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, + ) -> None: + """update_share - # Authentication setting - auth_settings = ['key'] # noqa: E501 - return self.api_client.call_api( - '/access', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) + :param body: + :type body: UpdateShareRequest + :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 - def update_share(self, **kwargs): # noqa: E501 - """update_share # noqa: E501 + _param = self._update_share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_share(async_req=True) - >>> result = thread.get() + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '404': None, + '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 - :param async_req bool - :param ShareBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_share_with_http_info(**kwargs) # noqa: E501 + + @validate_call + def update_share_with_http_info( + self, + body: Optional[UpdateShareRequest] = 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[None]: + """update_share + + + :param body: + :type body: UpdateShareRequest + :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_share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '404': None, + '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_share_without_preload_content( + self, + body: Optional[UpdateShareRequest] = 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: + """update_share + + + :param body: + :type body: UpdateShareRequest + :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_share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_share_serialize( + self, + body, + _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, Union[str, bytes]] = {} + _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 body is not None: + _body_params = body + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type else: - (data) = self.update_share_with_http_info(**kwargs) # noqa: E501 - return data - - def update_share_with_http_info(self, **kwargs): # noqa: E501 - """update_share # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_share_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ShareBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update_share" % key + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/zrok.v1+json' + ] ) - params[key] = val - del params['kwargs'] + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - collection_formats = {} + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] - path_params = {} + return self.api_client.param_serialize( + method='PATCH', + resource_path='/share', + 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 + ) - query_params = [] - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/share', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/sdk/python/sdk/zrok/zrok_api/api_client.py b/sdk/python/sdk/zrok/zrok_api/api_client.py index f917a79b..a9d8285f 100644 --- a/sdk/python/sdk/zrok/zrok_api/api_client.py +++ b/sdk/python/sdk/zrok/zrok_api/api_client.py @@ -1,44 +1,54 @@ # coding: utf-8 + """ zrok - zrok client access # noqa: E501 + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import import datetime +from dateutil.parser import parse +from enum import Enum import json import mimetypes -from multiprocessing.pool import ThreadPool import os import re import tempfile -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr from zrok_api.configuration import Configuration +from zrok_api.api_response import ApiResponse, T as ApiResponseT import zrok_api.models from zrok_api import rest +from zrok_api.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] -class ApiClient(object): - """Generic API client for Swagger client library builds. +class ApiClient: + """Generic API client for OpenAPI client library builds. - Swagger generic API client. This client handles the client- + OpenAPI generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger + the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to @@ -47,10 +57,10 @@ class ApiClient(object): to the API """ - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 + 'long': int, # TODO remove as only py3 is supported? 'float': float, 'str': str, 'bool': bool, @@ -58,25 +68,34 @@ class ApiClient(object): 'datetime': datetime.datetime, 'object': object, } + _pool = None - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided if configuration is None: - configuration = Configuration() + configuration = Configuration.get_default() self.configuration = configuration - self.pool = ThreadPool() self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation - def __del__(self): - self.pool.close() - self.pool.join() + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass @property def user_agent(self): @@ -90,12 +109,69 @@ class ApiClient(object): def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ config = self.configuration @@ -106,14 +182,17 @@ class ApiClient(object): header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( @@ -121,113 +200,217 @@ class ApiClient(object): quote(str(v), safe=config.safe_chars_for_path_param) ) - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - # post parameters if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) + post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) # body if body: body = self.sanitize_for_serialization(body) # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path else: - return (return_data, response_data.status, - response_data.getheaders()) + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. - If obj is swagger model, return the properties dict. + If obj is OpenAPI model, return the properties dict. :param obj: The data to serialize. :return: The serialized form of data. """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() - if isinstance(obj, dict): + elif isinstance(obj, dict): obj_dict = obj else: # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` + # attributes `openapi_types`, `attribute_map` # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } - def deserialize(self, response, response_type): + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. :param response_type: class literal for deserialized object, or string of class name. + :param content_type: content type of response. :return: deserialized object. """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif content_type.startswith("application/json"): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif content_type.startswith("text/plain"): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) return self.__deserialize(data, response_type) @@ -242,16 +425,20 @@ class ApiClient(object): if data is None: return None - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} + for k, v in data.items()} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -266,131 +453,12 @@ class ApiClient(object): elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: - return self.__deserialize_datatime(data) + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: return self.__deserialize_model(data, klass) - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. @@ -398,10 +466,10 @@ class ApiClient(object): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': @@ -421,49 +489,85 @@ class ApiClient(object): new_params.append((k, v)) return new_params - def prepare_post_parameters(self, post_params=None, files=None): + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): """Builds form parameters. - :param post_params: Normal form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params - def select_header_accept(self, accepts): + def select_header_accept(self, accepts: List[str]) -> Optional[str]: """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: - return + return None - accepts = [x.lower() for x in accepts] + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) + return accepts[0] def select_header_content_type(self, content_types): """Returns `Content-Type` based on an array of content_types provided. @@ -472,45 +576,101 @@ class ApiClient(object): :return: Content-Type (e.g. application/json). """ if not content_types: - return 'application/json' + return None - content_types = [x.lower() for x in content_types] + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] + return content_types[0] - def update_params_for_auth(self, headers, querys, auth_settings): + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. + :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting ) + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + def __deserialize_file(self, response): """Deserializes body to file Saves response body into a file in a temporary folder, using the filename from the `Content-Disposition` header if provided. + handle file downloading + save response body into a tmp file and return the instance + :param response: RESTResponse. :return: file path. """ @@ -520,17 +680,17 @@ class ApiClient(object): content_disposition = response.getheader("Content-Disposition") if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) + + with open(path, "wb") as f: + f.write(response.data) + return path def __deserialize_primitive(self, data, klass): @@ -544,12 +704,12 @@ class ApiClient(object): try: return klass(data) except UnicodeEncodeError: - return six.text_type(data) + return str(data) except TypeError: return data def __deserialize_object(self, value): - """Return a original value. + """Return an original value. :return: object. """ @@ -562,7 +722,6 @@ class ApiClient(object): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -572,7 +731,7 @@ class ApiClient(object): reason="Failed to parse `{0}` as date object".format(string) ) - def __deserialize_datatime(self, string): + def __deserialize_datetime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. @@ -581,7 +740,6 @@ class ApiClient(object): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string @@ -594,8 +752,23 @@ class ApiClient(object): ) ) - def __hasattr(self, object, name): - return name in object.__class__.__dict__ + 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. @@ -605,28 +778,4 @@ class ApiClient(object): :return: model object. """ - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance + return klass.from_dict(data) diff --git a/sdk/python/sdk/zrok/zrok_api/api_response.py b/sdk/python/sdk/zrok/zrok_api/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/sdk/python/sdk/zrok/zrok_api/configuration.py b/sdk/python/sdk/zrok/zrok_api/configuration.py index 331c27b7..868ba242 100644 --- a/sdk/python/sdk/zrok/zrok_api/configuration.py +++ b/sdk/python/sdk/zrok/zrok_api/configuration.py @@ -3,103 +3,272 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import copy import logging +from logging import FileHandler import multiprocessing import sys +from typing import Optional import urllib3 -import six -from six.moves import http_client as httplib +import http.client as httplib +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None +class Configuration: + """This class contains various settings of the API client. - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. - def set_default(cls, default): - cls._default = copy.copy(default) + :Example: + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. + You can programmatically set the cookie: - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. +conf = zrok_api.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ - def __init__(self): - """Constructor""" - # Default Base url - self.host = "/api/v1" - # Temp file folder for downloading files - self.temp_folder_path = None + _default = None + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ignore_operation_servers=False, + ssl_ca_cert=None, + retries=None, + *, + debug: Optional[bool] = None + ) -> None: + """Constructor + """ + self._base_path = "/api/v1" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ # Authentication Settings - # dict to store API key(s) self.api_key = {} - # dict to store API prefix (e.g. Bearer) + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ self.api_key_prefix = {} - # function to refresh API key if expired + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ self.logger = {} + """Logging Settings + """ self.logger["package_logger"] = logging.getLogger("zrok_api") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler + """Log format + """ self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ self.logger_file = None - # Debug switch - self.debug = False + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ self.cert_file = None - # client key file + """client certificate file + """ self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. + """client key file + """ self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ - # Proxy URL - self.proxy = None - # Safe chars for path_param + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = retries + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default @property def logger_file(self): @@ -129,19 +298,8 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): # then add file handler and remove stream handler. self.logger_file_handler = logging.FileHandler(self.__logger_file) self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): + for _, logger in self.logger.items(): logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) @property def debug(self): @@ -162,14 +320,14 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): self.__debug = value if self.__debug: # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): + for _, logger in self.logger.items(): logger.setLevel(logging.DEBUG) # turn on httplib debug httplib.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): + for _, logger in self.logger.items(): logger.setLevel(logging.WARNING) # turn off httplib debug httplib.HTTPConnection.debuglevel = 0 @@ -197,16 +355,16 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier): + def get_api_key_with_prefix(self, identifier, alias=None): """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. :return: The token for api key authentication. """ - if self.refresh_api_key_hook: + if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) if key: prefix = self.api_key_prefix.get(identifier) if prefix: @@ -219,8 +377,14 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): :return: The token for basic HTTP authentication. """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password + basic_auth=username + ':' + password ).get('authorization') def auth_settings(self): @@ -228,15 +392,17 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): :return: The Auth Settings information dict. """ - return { - 'key': - { - 'type': 'api_key', - 'in': 'header', - 'key': 'x-token', - 'value': self.get_api_key_with_prefix('x-token') - }, - } + auth = {} + if 'key' in self.api_key: + auth['key'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'x-token', + 'value': self.get_api_key_with_prefix( + 'key', + ), + } + return auth def to_debug_report(self): """Gets the essential information for debugging. @@ -249,3 +415,65 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): "Version of the API: 1.0.0\n"\ "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "/api/v1", + 'description': "No description provided", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/sdk/python/sdk/zrok/zrok_api/exceptions.py b/sdk/python/sdk/zrok/zrok_api/exceptions.py new file mode 100644 index 00000000..999f4d6c --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/exceptions.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/sdk/python/sdk/zrok/zrok_api/models/__init__.py b/sdk/python/sdk/zrok/zrok_api/models/__init__.py index c59710d3..c4f5e3c4 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/__init__.py +++ b/sdk/python/sdk/zrok/zrok_api/models/__init__.py @@ -4,76 +4,64 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import # import models into model package -from zrok_api.models.access_body import AccessBody -from zrok_api.models.access_body1 import AccessBody1 -from zrok_api.models.account_body import AccountBody +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_body import ChangePasswordBody -from zrok_api.models.client_version_check_body import ClientVersionCheckBody +from zrok_api.models.change_password_request import ChangePasswordRequest +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest from zrok_api.models.configuration import Configuration -from zrok_api.models.disable_body import DisableBody -from zrok_api.models.enable_body import EnableBody +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest +from zrok_api.models.disable_request import DisableRequest +from zrok_api.models.enable_request import EnableRequest from zrok_api.models.environment import Environment from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.environments import Environments -from zrok_api.models.error_message import ErrorMessage from zrok_api.models.frontend import Frontend -from zrok_api.models.frontend_body import FrontendBody -from zrok_api.models.frontend_body1 import FrontendBody1 -from zrok_api.models.frontend_body2 import FrontendBody2 -from zrok_api.models.frontends import Frontends -from zrok_api.models.grants_body import GrantsBody -from zrok_api.models.identity_body import IdentityBody -from zrok_api.models.inline_response200 import InlineResponse200 -from zrok_api.models.inline_response2001 import InlineResponse2001 -from zrok_api.models.inline_response2002 import InlineResponse2002 -from zrok_api.models.inline_response2003 import InlineResponse2003 -from zrok_api.models.inline_response2003_members import InlineResponse2003Members -from zrok_api.models.inline_response2004 import InlineResponse2004 -from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations -from zrok_api.models.inline_response2005 import InlineResponse2005 -from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships -from zrok_api.models.inline_response2006 import InlineResponse2006 -from zrok_api.models.inline_response2007 import InlineResponse2007 -from zrok_api.models.inline_response201 import InlineResponse201 -from zrok_api.models.inline_response2011 import InlineResponse2011 -from zrok_api.models.inline_response2012 import InlineResponse2012 -from zrok_api.models.inline_response2013 import InlineResponse2013 -from zrok_api.models.invite_body import InviteBody -from zrok_api.models.login_body import LoginBody +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest +from zrok_api.models.invite_request import InviteRequest +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.models.list_memberships200_response import ListMemberships200Response +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner +from zrok_api.models.list_organizations200_response import ListOrganizations200Response +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner +from zrok_api.models.login_request import LoginRequest from zrok_api.models.metrics import Metrics from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.organization_add_body import OrganizationAddBody -from zrok_api.models.organization_body import OrganizationBody -from zrok_api.models.organization_body1 import OrganizationBody1 -from zrok_api.models.organization_list_body import OrganizationListBody -from zrok_api.models.organization_remove_body import OrganizationRemoveBody from zrok_api.models.overview import Overview from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody -from zrok_api.models.register_body import RegisterBody -from zrok_api.models.reset_password_body import ResetPasswordBody -from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.models.register_request import RegisterRequest +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest +from zrok_api.models.reset_password_request import ResetPasswordRequest from zrok_api.models.share import Share -from zrok_api.models.share_body import ShareBody from zrok_api.models.share_request import ShareRequest from zrok_api.models.share_response import ShareResponse -from zrok_api.models.shares import Shares -from zrok_api.models.spark_data import SparkData from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.sparklines_body import SparklinesBody -from zrok_api.models.token_generate_body import TokenGenerateBody -from zrok_api.models.unaccess_body import UnaccessBody -from zrok_api.models.unshare_body import UnshareBody -from zrok_api.models.verify_body import VerifyBody -from zrok_api.models.version import Version +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.models.unshare_request import UnshareRequest +from zrok_api.models.update_access_request import UpdateAccessRequest +from zrok_api.models.update_frontend_request import UpdateFrontendRequest +from zrok_api.models.update_share_request import UpdateShareRequest +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest +from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/sdk/zrok/zrok_api/models/access201_response.py b/sdk/python/sdk/zrok/zrok_api/models/access201_response.py new file mode 100644 index 00000000..6058082c --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/access201_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Access201Response(BaseModel): + """ + Access201Response + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + __properties: ClassVar[List[str]] = ["frontendToken", "backendMode"] + + 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 Access201Response 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 Access201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "backendMode": obj.get("backendMode") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_body.py b/sdk/python/sdk/zrok/zrok_api/models/access_body.py deleted file mode 100644 index ca0ded7f..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/access_body.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AccessBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'env_zid': 'str', - 'share_token': 'str', - 'bind_address': 'str', - 'description': 'str' - } - - attribute_map = { - 'env_zid': 'envZId', - 'share_token': 'shareToken', - 'bind_address': 'bindAddress', - 'description': 'description' - } - - def __init__(self, env_zid=None, share_token=None, bind_address=None, description=None): # noqa: E501 - """AccessBody - a model defined in Swagger""" # noqa: E501 - self._env_zid = None - self._share_token = None - self._bind_address = None - self._description = None - self.discriminator = None - if env_zid is not None: - self.env_zid = env_zid - if share_token is not None: - self.share_token = share_token - if bind_address is not None: - self.bind_address = bind_address - if description is not None: - self.description = description - - @property - def env_zid(self): - """Gets the env_zid of this AccessBody. # noqa: E501 - - - :return: The env_zid of this AccessBody. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this AccessBody. - - - :param env_zid: The env_zid of this AccessBody. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def share_token(self): - """Gets the share_token of this AccessBody. # noqa: E501 - - - :return: The share_token of this AccessBody. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this AccessBody. - - - :param share_token: The share_token of this AccessBody. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def bind_address(self): - """Gets the bind_address of this AccessBody. # noqa: E501 - - - :return: The bind_address of this AccessBody. # noqa: E501 - :rtype: str - """ - return self._bind_address - - @bind_address.setter - def bind_address(self, bind_address): - """Sets the bind_address of this AccessBody. - - - :param bind_address: The bind_address of this AccessBody. # noqa: E501 - :type: str - """ - - self._bind_address = bind_address - - @property - def description(self): - """Gets the description of this AccessBody. # noqa: E501 - - - :return: The description of this AccessBody. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this AccessBody. - - - :param description: The description of this AccessBody. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AccessBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccessBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_body1.py b/sdk/python/sdk/zrok/zrok_api/models/access_body1.py deleted file mode 100644 index 97855ec4..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/access_body1.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AccessBody1(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'bind_address': 'str', - 'description': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'bind_address': 'bindAddress', - 'description': 'description' - } - - def __init__(self, frontend_token=None, bind_address=None, description=None): # noqa: E501 - """AccessBody1 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._bind_address = None - self._description = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if bind_address is not None: - self.bind_address = bind_address - if description is not None: - self.description = description - - @property - def frontend_token(self): - """Gets the frontend_token of this AccessBody1. # noqa: E501 - - - :return: The frontend_token of this AccessBody1. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this AccessBody1. - - - :param frontend_token: The frontend_token of this AccessBody1. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def bind_address(self): - """Gets the bind_address of this AccessBody1. # noqa: E501 - - - :return: The bind_address of this AccessBody1. # noqa: E501 - :rtype: str - """ - return self._bind_address - - @bind_address.setter - def bind_address(self, bind_address): - """Sets the bind_address of this AccessBody1. - - - :param bind_address: The bind_address of this AccessBody1. # noqa: E501 - :type: str - """ - - self._bind_address = bind_address - - @property - def description(self): - """Gets the description of this AccessBody1. # noqa: E501 - - - :return: The description of this AccessBody1. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this AccessBody1. - - - :param description: The description of this AccessBody1. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AccessBody1, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccessBody1): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_request.py b/sdk/python/sdk/zrok/zrok_api/models/access_request.py new file mode 100644 index 00000000..18eb9837 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/access_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AccessRequest(BaseModel): + """ + AccessRequest + """ # noqa: E501 + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["envZId", "shareToken", "bindAddress", "description"] + + 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 AccessRequest 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 AccessRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "envZId": obj.get("envZId"), + "shareToken": obj.get("shareToken"), + "bindAddress": obj.get("bindAddress"), + "description": obj.get("description") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/account_body.py b/sdk/python/sdk/zrok/zrok_api/models/account_body.py deleted file mode 100644 index ea261eb0..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/account_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AccountBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'password': 'str' - } - - attribute_map = { - 'email': 'email', - 'password': 'password' - } - - def __init__(self, email=None, password=None): # noqa: E501 - """AccountBody - a model defined in Swagger""" # noqa: E501 - self._email = None - self._password = None - self.discriminator = None - if email is not None: - self.email = email - if password is not None: - self.password = password - - @property - def email(self): - """Gets the email of this AccountBody. # noqa: E501 - - - :return: The email of this AccountBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this AccountBody. - - - :param email: The email of this AccountBody. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def password(self): - """Gets the password of this AccountBody. # noqa: E501 - - - :return: The password of this AccountBody. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this AccountBody. - - - :param password: The password of this AccountBody. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AccountBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccountBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/add_organization_member_request.py b/sdk/python/sdk/zrok/zrok_api/models/add_organization_member_request.py new file mode 100644 index 00000000..d6db9e38 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/add_organization_member_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class AddOrganizationMemberRequest(BaseModel): + """ + AddOrganizationMemberRequest + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + email: Optional[StrictStr] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["organizationToken", "email", "admin"] + + 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 AddOrganizationMemberRequest 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 AddOrganizationMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "email": obj.get("email"), + "admin": obj.get("admin") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py b/sdk/python/sdk/zrok/zrok_api/models/auth_user.py index 0a04dc10..b8e1718d 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py +++ b/sdk/python/sdk/zrok/zrok_api/models/auth_user.py @@ -3,134 +3,87 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AuthUser(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 AuthUser(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'username': 'str', - 'password': 'str' - } + AuthUser + """ # noqa: E501 + username: Optional[StrictStr] = None + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["username", "password"] - attribute_map = { - 'username': 'username', - 'password': 'password' - } - - def __init__(self, username=None, password=None): # noqa: E501 - """AuthUser - a model defined in Swagger""" # noqa: E501 - self._username = None - self._password = None - self.discriminator = None - if username is not None: - self.username = username - if password is not None: - self.password = password - - @property - def username(self): - """Gets the username of this AuthUser. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The username of this AuthUser. # noqa: E501 - :rtype: str + 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 AuthUser 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. """ - return self._username + excluded_fields: Set[str] = set([ + ]) - @username.setter - def username(self, username): - """Sets the username of this AuthUser. + _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 AuthUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) + return _obj - :param username: The username of this AuthUser. # noqa: E501 - :type: str - """ - - self._username = username - - @property - def password(self): - """Gets the password of this AuthUser. # noqa: E501 - - - :return: The password of this AuthUser. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this AuthUser. - - - :param password: The password of this AuthUser. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AuthUser, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AuthUser): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/change_password_body.py b/sdk/python/sdk/zrok/zrok_api/models/change_password_body.py deleted file mode 100644 index 8c12afb1..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/change_password_body.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ChangePasswordBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'old_password': 'str', - 'new_password': 'str' - } - - attribute_map = { - 'email': 'email', - 'old_password': 'oldPassword', - 'new_password': 'newPassword' - } - - def __init__(self, email=None, old_password=None, new_password=None): # noqa: E501 - """ChangePasswordBody - a model defined in Swagger""" # noqa: E501 - self._email = None - self._old_password = None - self._new_password = None - self.discriminator = None - if email is not None: - self.email = email - if old_password is not None: - self.old_password = old_password - if new_password is not None: - self.new_password = new_password - - @property - def email(self): - """Gets the email of this ChangePasswordBody. # noqa: E501 - - - :return: The email of this ChangePasswordBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this ChangePasswordBody. - - - :param email: The email of this ChangePasswordBody. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def old_password(self): - """Gets the old_password of this ChangePasswordBody. # noqa: E501 - - - :return: The old_password of this ChangePasswordBody. # noqa: E501 - :rtype: str - """ - return self._old_password - - @old_password.setter - def old_password(self, old_password): - """Sets the old_password of this ChangePasswordBody. - - - :param old_password: The old_password of this ChangePasswordBody. # noqa: E501 - :type: str - """ - - self._old_password = old_password - - @property - def new_password(self): - """Gets the new_password of this ChangePasswordBody. # noqa: E501 - - - :return: The new_password of this ChangePasswordBody. # noqa: E501 - :rtype: str - """ - return self._new_password - - @new_password.setter - def new_password(self, new_password): - """Sets the new_password of this ChangePasswordBody. - - - :param new_password: The new_password of this ChangePasswordBody. # noqa: E501 - :type: str - """ - - self._new_password = new_password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ChangePasswordBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ChangePasswordBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py b/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py new file mode 100644 index 00000000..dcbdafb3 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ChangePasswordRequest(BaseModel): + """ + ChangePasswordRequest + """ # noqa: E501 + email: Optional[StrictStr] = None + old_password: Optional[StrictStr] = Field(default=None, alias="oldPassword") + new_password: Optional[StrictStr] = Field(default=None, alias="newPassword") + __properties: ClassVar[List[str]] = ["email", "oldPassword", "newPassword"] + + 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 ChangePasswordRequest 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 ChangePasswordRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "oldPassword": obj.get("oldPassword"), + "newPassword": obj.get("newPassword") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py b/sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py deleted file mode 100644 index 9aae0f54..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ClientVersionCheckBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'client_version': 'str' - } - - attribute_map = { - 'client_version': 'clientVersion' - } - - def __init__(self, client_version=None): # noqa: E501 - """ClientVersionCheckBody - a model defined in Swagger""" # noqa: E501 - self._client_version = None - self.discriminator = None - if client_version is not None: - self.client_version = client_version - - @property - def client_version(self): - """Gets the client_version of this ClientVersionCheckBody. # noqa: E501 - - - :return: The client_version of this ClientVersionCheckBody. # noqa: E501 - :rtype: str - """ - return self._client_version - - @client_version.setter - def client_version(self, client_version): - """Sets the client_version of this ClientVersionCheckBody. - - - :param client_version: The client_version of this ClientVersionCheckBody. # noqa: E501 - :type: str - """ - - self._client_version = client_version - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ClientVersionCheckBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClientVersionCheckBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/client_version_check_request.py b/sdk/python/sdk/zrok/zrok_api/models/client_version_check_request.py new file mode 100644 index 00000000..813e57ac --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/client_version_check_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClientVersionCheckRequest(BaseModel): + """ + ClientVersionCheckRequest + """ # noqa: E501 + client_version: Optional[StrictStr] = Field(default=None, alias="clientVersion") + __properties: ClassVar[List[str]] = ["clientVersion"] + + 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 ClientVersionCheckRequest 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 ClientVersionCheckRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientVersion": obj.get("clientVersion") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/configuration.py b/sdk/python/sdk/zrok/zrok_api/models/configuration.py index 6f1f70b5..ed5ece38 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/configuration.py +++ b/sdk/python/sdk/zrok/zrok_api/models/configuration.py @@ -3,212 +3,93 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Configuration(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class Configuration(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'version': 'str', - 'tou_link': 'str', - 'invites_open': 'bool', - 'requires_invite_token': 'bool', - 'invite_token_contact': 'str' - } + Configuration + """ # noqa: E501 + version: Optional[StrictStr] = None + tou_link: Optional[StrictStr] = Field(default=None, alias="touLink") + invites_open: Optional[StrictBool] = Field(default=None, alias="invitesOpen") + requires_invite_token: Optional[StrictBool] = Field(default=None, alias="requiresInviteToken") + invite_token_contact: Optional[StrictStr] = Field(default=None, alias="inviteTokenContact") + __properties: ClassVar[List[str]] = ["version", "touLink", "invitesOpen", "requiresInviteToken", "inviteTokenContact"] - attribute_map = { - 'version': 'version', - 'tou_link': 'touLink', - 'invites_open': 'invitesOpen', - 'requires_invite_token': 'requiresInviteToken', - 'invite_token_contact': 'inviteTokenContact' - } - - def __init__(self, version=None, tou_link=None, invites_open=None, requires_invite_token=None, invite_token_contact=None): # noqa: E501 - """Configuration - a model defined in Swagger""" # noqa: E501 - self._version = None - self._tou_link = None - self._invites_open = None - self._requires_invite_token = None - self._invite_token_contact = None - self.discriminator = None - if version is not None: - self.version = version - if tou_link is not None: - self.tou_link = tou_link - if invites_open is not None: - self.invites_open = invites_open - if requires_invite_token is not None: - self.requires_invite_token = requires_invite_token - if invite_token_contact is not None: - self.invite_token_contact = invite_token_contact - - @property - def version(self): - """Gets the version of this Configuration. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The version of this Configuration. # noqa: E501 - :rtype: str + 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 Configuration 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. """ - return self._version + excluded_fields: Set[str] = set([ + ]) - @version.setter - def version(self, version): - """Sets the version of this Configuration. + _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 Configuration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version"), + "touLink": obj.get("touLink"), + "invitesOpen": obj.get("invitesOpen"), + "requiresInviteToken": obj.get("requiresInviteToken"), + "inviteTokenContact": obj.get("inviteTokenContact") + }) + return _obj - :param version: The version of this Configuration. # noqa: E501 - :type: str - """ - - self._version = version - - @property - def tou_link(self): - """Gets the tou_link of this Configuration. # noqa: E501 - - - :return: The tou_link of this Configuration. # noqa: E501 - :rtype: str - """ - return self._tou_link - - @tou_link.setter - def tou_link(self, tou_link): - """Sets the tou_link of this Configuration. - - - :param tou_link: The tou_link of this Configuration. # noqa: E501 - :type: str - """ - - self._tou_link = tou_link - - @property - def invites_open(self): - """Gets the invites_open of this Configuration. # noqa: E501 - - - :return: The invites_open of this Configuration. # noqa: E501 - :rtype: bool - """ - return self._invites_open - - @invites_open.setter - def invites_open(self, invites_open): - """Sets the invites_open of this Configuration. - - - :param invites_open: The invites_open of this Configuration. # noqa: E501 - :type: bool - """ - - self._invites_open = invites_open - - @property - def requires_invite_token(self): - """Gets the requires_invite_token of this Configuration. # noqa: E501 - - - :return: The requires_invite_token of this Configuration. # noqa: E501 - :rtype: bool - """ - return self._requires_invite_token - - @requires_invite_token.setter - def requires_invite_token(self, requires_invite_token): - """Sets the requires_invite_token of this Configuration. - - - :param requires_invite_token: The requires_invite_token of this Configuration. # noqa: E501 - :type: bool - """ - - self._requires_invite_token = requires_invite_token - - @property - def invite_token_contact(self): - """Gets the invite_token_contact of this Configuration. # noqa: E501 - - - :return: The invite_token_contact of this Configuration. # noqa: E501 - :rtype: str - """ - return self._invite_token_contact - - @invite_token_contact.setter - def invite_token_contact(self, invite_token_contact): - """Sets the invite_token_contact of this Configuration. - - - :param invite_token_contact: The invite_token_contact of this Configuration. # noqa: E501 - :type: str - """ - - self._invite_token_contact = invite_token_contact - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Configuration, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Configuration): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_frontend201_response.py b/sdk/python/sdk/zrok/zrok_api/models/create_frontend201_response.py new file mode 100644 index 00000000..61fc364c --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/create_frontend201_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateFrontend201Response(BaseModel): + """ + CreateFrontend201Response + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + __properties: ClassVar[List[str]] = ["frontendToken"] + + 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 CreateFrontend201Response 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 CreateFrontend201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py b/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py new file mode 100644 index 00000000..5f7072e8 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateFrontendRequest(BaseModel): + """ + CreateFrontendRequest + """ # noqa: E501 + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + url_template: Optional[StrictStr] = None + public_name: Optional[StrictStr] = None + permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") + __properties: ClassVar[List[str]] = ["zId", "url_template", "public_name", "permissionMode"] + + @field_validator('permission_mode') + def permission_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['open', 'closed']): + raise ValueError("must be one of enum values ('open', 'closed')") + return value + + 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 CreateFrontendRequest 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 CreateFrontendRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "zId": obj.get("zId"), + "url_template": obj.get("url_template"), + "public_name": obj.get("public_name"), + "permissionMode": obj.get("permissionMode") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_identity201_response.py b/sdk/python/sdk/zrok/zrok_api/models/create_identity201_response.py new file mode 100644 index 00000000..f2811bbf --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/create_identity201_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 CreateIdentity201Response(BaseModel): + """ + CreateIdentity201Response + """ # noqa: E501 + identity: Optional[StrictStr] = None + cfg: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["identity", "cfg"] + + 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 CreateIdentity201Response 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 CreateIdentity201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identity": obj.get("identity"), + "cfg": obj.get("cfg") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_identity_request.py b/sdk/python/sdk/zrok/zrok_api/models/create_identity_request.py new file mode 100644 index 00000000..9f21d0a8 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/create_identity_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 CreateIdentityRequest(BaseModel): + """ + CreateIdentityRequest + """ # noqa: E501 + name: Optional[StrictStr] = None + __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 CreateIdentityRequest 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 CreateIdentityRequest 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/sdk/python/sdk/zrok/zrok_api/models/create_organization201_response.py b/sdk/python/sdk/zrok/zrok_api/models/create_organization201_response.py new file mode 100644 index 00000000..431bf57a --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/create_organization201_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateOrganization201Response(BaseModel): + """ + CreateOrganization201Response + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + __properties: ClassVar[List[str]] = ["organizationToken"] + + 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 CreateOrganization201Response 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 CreateOrganization201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_organization_request.py b/sdk/python/sdk/zrok/zrok_api/models/create_organization_request.py new file mode 100644 index 00000000..de5d6572 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/create_organization_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 CreateOrganizationRequest(BaseModel): + """ + CreateOrganizationRequest + """ # noqa: E501 + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["description"] + + 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 CreateOrganizationRequest 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 CreateOrganizationRequest 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") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/disable_body.py b/sdk/python/sdk/zrok/zrok_api/models/disable_body.py deleted file mode 100644 index bfb40a4a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/disable_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DisableBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identity': 'str' - } - - attribute_map = { - 'identity': 'identity' - } - - def __init__(self, identity=None): # noqa: E501 - """DisableBody - a model defined in Swagger""" # noqa: E501 - self._identity = None - self.discriminator = None - if identity is not None: - self.identity = identity - - @property - def identity(self): - """Gets the identity of this DisableBody. # noqa: E501 - - - :return: The identity of this DisableBody. # noqa: E501 - :rtype: str - """ - return self._identity - - @identity.setter - def identity(self, identity): - """Sets the identity of this DisableBody. - - - :param identity: The identity of this DisableBody. # noqa: E501 - :type: str - """ - - self._identity = identity - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(DisableBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DisableBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/disable_request.py b/sdk/python/sdk/zrok/zrok_api/models/disable_request.py new file mode 100644 index 00000000..a6c30a01 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/disable_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 DisableRequest(BaseModel): + """ + DisableRequest + """ # noqa: E501 + identity: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["identity"] + + 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 DisableRequest 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 DisableRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identity": obj.get("identity") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/enable_body.py b/sdk/python/sdk/zrok/zrok_api/models/enable_body.py deleted file mode 100644 index 49ac0279..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/enable_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class EnableBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'description': 'str', - 'host': 'str' - } - - attribute_map = { - 'description': 'description', - 'host': 'host' - } - - def __init__(self, description=None, host=None): # noqa: E501 - """EnableBody - a model defined in Swagger""" # noqa: E501 - self._description = None - self._host = None - self.discriminator = None - if description is not None: - self.description = description - if host is not None: - self.host = host - - @property - def description(self): - """Gets the description of this EnableBody. # noqa: E501 - - - :return: The description of this EnableBody. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this EnableBody. - - - :param description: The description of this EnableBody. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def host(self): - """Gets the host of this EnableBody. # noqa: E501 - - - :return: The host of this EnableBody. # noqa: E501 - :rtype: str - """ - return self._host - - @host.setter - def host(self, host): - """Sets the host of this EnableBody. - - - :param host: The host of this EnableBody. # noqa: E501 - :type: str - """ - - self._host = host - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(EnableBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EnableBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/enable_request.py b/sdk/python/sdk/zrok/zrok_api/models/enable_request.py new file mode 100644 index 00000000..ad54886c --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/enable_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 EnableRequest(BaseModel): + """ + EnableRequest + """ # noqa: E501 + description: Optional[StrictStr] = None + host: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["description", "host"] + + 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 EnableRequest 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 EnableRequest 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"), + "host": obj.get("host") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment.py b/sdk/python/sdk/zrok/zrok_api/models/environment.py index 53c85559..7f6bd2f7 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/environment.py +++ b/sdk/python/sdk/zrok/zrok_api/models/environment.py @@ -3,290 +3,107 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Environment(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.spark_data_sample import SparkDataSample +from typing import Optional, Set +from typing_extensions import Self + +class Environment(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'description': 'str', - 'host': 'str', - 'address': 'str', - 'z_id': 'str', - 'activity': 'SparkData', - 'limited': 'bool', - 'created_at': 'int', - 'updated_at': 'int' - } + Environment + """ # noqa: E501 + description: Optional[StrictStr] = None + host: Optional[StrictStr] = None + address: Optional[StrictStr] = None + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + activity: Optional[List[SparkDataSample]] = None + limited: Optional[StrictBool] = None + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["description", "host", "address", "zId", "activity", "limited", "createdAt", "updatedAt"] - attribute_map = { - 'description': 'description', - 'host': 'host', - 'address': 'address', - 'z_id': 'zId', - 'activity': 'activity', - 'limited': 'limited', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, description=None, host=None, address=None, z_id=None, activity=None, limited=None, created_at=None, updated_at=None): # noqa: E501 - """Environment - a model defined in Swagger""" # noqa: E501 - self._description = None - self._host = None - self._address = None - self._z_id = None - self._activity = None - self._limited = None - self._created_at = None - self._updated_at = None - self.discriminator = None - if description is not None: - self.description = description - if host is not None: - self.host = host - if address is not None: - self.address = address - if z_id is not None: - self.z_id = z_id - if activity is not None: - self.activity = activity - if limited is not None: - self.limited = limited - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def description(self): - """Gets the description of this Environment. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The description of this Environment. # noqa: E501 - :rtype: str + 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 Environment 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. """ - return self._description + excluded_fields: Set[str] = set([ + ]) - @description.setter - def description(self, description): - """Sets the description of this Environment. + _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 activity (list) + _items = [] + if self.activity: + for _item in self.activity: + if _item: + _items.append(_item.to_dict()) + _dict['activity'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Environment 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"), + "host": obj.get("host"), + "address": obj.get("address"), + "zId": obj.get("zId"), + "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, + "limited": obj.get("limited"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj - :param description: The description of this Environment. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def host(self): - """Gets the host of this Environment. # noqa: E501 - - - :return: The host of this Environment. # noqa: E501 - :rtype: str - """ - return self._host - - @host.setter - def host(self, host): - """Sets the host of this Environment. - - - :param host: The host of this Environment. # noqa: E501 - :type: str - """ - - self._host = host - - @property - def address(self): - """Gets the address of this Environment. # noqa: E501 - - - :return: The address of this Environment. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this Environment. - - - :param address: The address of this Environment. # noqa: E501 - :type: str - """ - - self._address = address - - @property - def z_id(self): - """Gets the z_id of this Environment. # noqa: E501 - - - :return: The z_id of this Environment. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this Environment. - - - :param z_id: The z_id of this Environment. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def activity(self): - """Gets the activity of this Environment. # noqa: E501 - - - :return: The activity of this Environment. # noqa: E501 - :rtype: SparkData - """ - return self._activity - - @activity.setter - def activity(self, activity): - """Sets the activity of this Environment. - - - :param activity: The activity of this Environment. # noqa: E501 - :type: SparkData - """ - - self._activity = activity - - @property - def limited(self): - """Gets the limited of this Environment. # noqa: E501 - - - :return: The limited of this Environment. # noqa: E501 - :rtype: bool - """ - return self._limited - - @limited.setter - def limited(self, limited): - """Sets the limited of this Environment. - - - :param limited: The limited of this Environment. # noqa: E501 - :type: bool - """ - - self._limited = limited - - @property - def created_at(self): - """Gets the created_at of this Environment. # noqa: E501 - - - :return: The created_at of this Environment. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Environment. - - - :param created_at: The created_at of this Environment. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Environment. # noqa: E501 - - - :return: The updated_at of this Environment. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Environment. - - - :param updated_at: The updated_at of this Environment. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Environment, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Environment): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py b/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py index 12c466bb..9c1608fe 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py +++ b/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py @@ -3,160 +3,109 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class EnvironmentAndResources(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 zrok_api.models.environment import Environment +from zrok_api.models.frontend import Frontend +from zrok_api.models.share import Share +from typing import Optional, Set +from typing_extensions import Self + +class EnvironmentAndResources(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'environment': 'Environment', - 'frontends': 'Frontends', - 'shares': 'Shares' - } + EnvironmentAndResources + """ # noqa: E501 + environment: Optional[Environment] = None + frontends: Optional[List[Frontend]] = None + shares: Optional[List[Share]] = None + __properties: ClassVar[List[str]] = ["environment", "frontends", "shares"] - attribute_map = { - 'environment': 'environment', - 'frontends': 'frontends', - 'shares': 'shares' - } - - def __init__(self, environment=None, frontends=None, shares=None): # noqa: E501 - """EnvironmentAndResources - a model defined in Swagger""" # noqa: E501 - self._environment = None - self._frontends = None - self._shares = None - self.discriminator = None - if environment is not None: - self.environment = environment - if frontends is not None: - self.frontends = frontends - if shares is not None: - self.shares = shares - - @property - def environment(self): - """Gets the environment of this EnvironmentAndResources. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The environment of this EnvironmentAndResources. # noqa: E501 - :rtype: Environment + 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 EnvironmentAndResources 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. """ - return self._environment + excluded_fields: Set[str] = set([ + ]) - @environment.setter - def environment(self, environment): - """Sets the environment of this EnvironmentAndResources. + _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 frontends (list) + _items = [] + if self.frontends: + for _item in self.frontends: + if _item: + _items.append(_item.to_dict()) + _dict['frontends'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shares (list) + _items = [] + if self.shares: + for _item in self.shares: + if _item: + _items.append(_item.to_dict()) + _dict['shares'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnvironmentAndResources from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "environment": Environment.from_dict(obj["environment"]) if obj.get("environment") is not None else None, + "frontends": [Frontend.from_dict(_item) for _item in obj["frontends"]] if obj.get("frontends") is not None else None, + "shares": [Share.from_dict(_item) for _item in obj["shares"]] if obj.get("shares") is not None else None + }) + return _obj - :param environment: The environment of this EnvironmentAndResources. # noqa: E501 - :type: Environment - """ - - self._environment = environment - - @property - def frontends(self): - """Gets the frontends of this EnvironmentAndResources. # noqa: E501 - - - :return: The frontends of this EnvironmentAndResources. # noqa: E501 - :rtype: Frontends - """ - return self._frontends - - @frontends.setter - def frontends(self, frontends): - """Sets the frontends of this EnvironmentAndResources. - - - :param frontends: The frontends of this EnvironmentAndResources. # noqa: E501 - :type: Frontends - """ - - self._frontends = frontends - - @property - def shares(self): - """Gets the shares of this EnvironmentAndResources. # noqa: E501 - - - :return: The shares of this EnvironmentAndResources. # noqa: E501 - :rtype: Shares - """ - return self._shares - - @shares.setter - def shares(self, shares): - """Sets the shares of this EnvironmentAndResources. - - - :param shares: The shares of this EnvironmentAndResources. # noqa: E501 - :type: Shares - """ - - self._shares = shares - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(EnvironmentAndResources, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EnvironmentAndResources): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/environments.py b/sdk/python/sdk/zrok/zrok_api/models/environments.py deleted file mode 100644 index e6d72d56..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/environments.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Environments(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Environments - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Environments, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Environments): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/error_message.py b/sdk/python/sdk/zrok/zrok_api/models/error_message.py deleted file mode 100644 index 19325187..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/error_message.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ErrorMessage(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """ErrorMessage - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ErrorMessage, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ErrorMessage): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend.py b/sdk/python/sdk/zrok/zrok_api/models/frontend.py index 46cf93eb..ae3c4c5d 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend.py +++ b/sdk/python/sdk/zrok/zrok_api/models/frontend.py @@ -3,316 +3,101 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Frontend(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Frontend(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'frontend_token': 'str', - 'share_token': 'str', - 'backend_mode': 'str', - 'bind_address': 'str', - 'description': 'str', - 'z_id': 'str', - 'created_at': 'int', - 'updated_at': 'int' - } + Frontend + """ # noqa: E501 + id: Optional[StrictInt] = None + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") + description: Optional[StrictStr] = None + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["id", "frontendToken", "shareToken", "backendMode", "bindAddress", "description", "zId", "createdAt", "updatedAt"] - attribute_map = { - 'id': 'id', - 'frontend_token': 'frontendToken', - 'share_token': 'shareToken', - 'backend_mode': 'backendMode', - 'bind_address': 'bindAddress', - 'description': 'description', - 'z_id': 'zId', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, id=None, frontend_token=None, share_token=None, backend_mode=None, bind_address=None, description=None, z_id=None, created_at=None, updated_at=None): # noqa: E501 - """Frontend - a model defined in Swagger""" # noqa: E501 - self._id = None - self._frontend_token = None - self._share_token = None - self._backend_mode = None - self._bind_address = None - self._description = None - self._z_id = None - self._created_at = None - self._updated_at = None - self.discriminator = None - if id is not None: - self.id = id - if frontend_token is not None: - self.frontend_token = frontend_token - if share_token is not None: - self.share_token = share_token - if backend_mode is not None: - self.backend_mode = backend_mode - if bind_address is not None: - self.bind_address = bind_address - if description is not None: - self.description = description - if z_id is not None: - self.z_id = z_id - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def id(self): - """Gets the id of this Frontend. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The id of this Frontend. # noqa: E501 - :rtype: int + 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 Frontend 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. """ - return self._id + 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 Frontend 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"), + "frontendToken": obj.get("frontendToken"), + "shareToken": obj.get("shareToken"), + "backendMode": obj.get("backendMode"), + "bindAddress": obj.get("bindAddress"), + "description": obj.get("description"), + "zId": obj.get("zId"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj - @id.setter - def id(self, id): - """Sets the id of this Frontend. - - :param id: The id of this Frontend. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def frontend_token(self): - """Gets the frontend_token of this Frontend. # noqa: E501 - - - :return: The frontend_token of this Frontend. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this Frontend. - - - :param frontend_token: The frontend_token of this Frontend. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def share_token(self): - """Gets the share_token of this Frontend. # noqa: E501 - - - :return: The share_token of this Frontend. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this Frontend. - - - :param share_token: The share_token of this Frontend. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def backend_mode(self): - """Gets the backend_mode of this Frontend. # noqa: E501 - - - :return: The backend_mode of this Frontend. # noqa: E501 - :rtype: str - """ - return self._backend_mode - - @backend_mode.setter - def backend_mode(self, backend_mode): - """Sets the backend_mode of this Frontend. - - - :param backend_mode: The backend_mode of this Frontend. # noqa: E501 - :type: str - """ - - self._backend_mode = backend_mode - - @property - def bind_address(self): - """Gets the bind_address of this Frontend. # noqa: E501 - - - :return: The bind_address of this Frontend. # noqa: E501 - :rtype: str - """ - return self._bind_address - - @bind_address.setter - def bind_address(self, bind_address): - """Sets the bind_address of this Frontend. - - - :param bind_address: The bind_address of this Frontend. # noqa: E501 - :type: str - """ - - self._bind_address = bind_address - - @property - def description(self): - """Gets the description of this Frontend. # noqa: E501 - - - :return: The description of this Frontend. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Frontend. - - - :param description: The description of this Frontend. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def z_id(self): - """Gets the z_id of this Frontend. # noqa: E501 - - - :return: The z_id of this Frontend. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this Frontend. - - - :param z_id: The z_id of this Frontend. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def created_at(self): - """Gets the created_at of this Frontend. # noqa: E501 - - - :return: The created_at of this Frontend. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Frontend. - - - :param created_at: The created_at of this Frontend. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Frontend. # noqa: E501 - - - :return: The updated_at of this Frontend. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Frontend. - - - :param updated_at: The updated_at of this Frontend. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Frontend, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Frontend): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body.py b/sdk/python/sdk/zrok/zrok_api/models/frontend_body.py deleted file mode 100644 index 22f06aac..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend_body.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class FrontendBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'z_id': 'str', - 'url_template': 'str', - 'public_name': 'str', - 'permission_mode': 'str' - } - - attribute_map = { - 'z_id': 'zId', - 'url_template': 'url_template', - 'public_name': 'public_name', - 'permission_mode': 'permissionMode' - } - - def __init__(self, z_id=None, url_template=None, public_name=None, permission_mode=None): # noqa: E501 - """FrontendBody - a model defined in Swagger""" # noqa: E501 - self._z_id = None - self._url_template = None - self._public_name = None - self._permission_mode = None - self.discriminator = None - if z_id is not None: - self.z_id = z_id - if url_template is not None: - self.url_template = url_template - if public_name is not None: - self.public_name = public_name - if permission_mode is not None: - self.permission_mode = permission_mode - - @property - def z_id(self): - """Gets the z_id of this FrontendBody. # noqa: E501 - - - :return: The z_id of this FrontendBody. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this FrontendBody. - - - :param z_id: The z_id of this FrontendBody. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def url_template(self): - """Gets the url_template of this FrontendBody. # noqa: E501 - - - :return: The url_template of this FrontendBody. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this FrontendBody. - - - :param url_template: The url_template of this FrontendBody. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - @property - def public_name(self): - """Gets the public_name of this FrontendBody. # noqa: E501 - - - :return: The public_name of this FrontendBody. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this FrontendBody. - - - :param public_name: The public_name of this FrontendBody. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def permission_mode(self): - """Gets the permission_mode of this FrontendBody. # noqa: E501 - - - :return: The permission_mode of this FrontendBody. # noqa: E501 - :rtype: str - """ - return self._permission_mode - - @permission_mode.setter - def permission_mode(self, permission_mode): - """Sets the permission_mode of this FrontendBody. - - - :param permission_mode: The permission_mode of this FrontendBody. # noqa: E501 - :type: str - """ - allowed_values = ["open", "closed"] # noqa: E501 - if permission_mode not in allowed_values: - raise ValueError( - "Invalid value for `permission_mode` ({0}), must be one of {1}" # noqa: E501 - .format(permission_mode, allowed_values) - ) - - self._permission_mode = permission_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(FrontendBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FrontendBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py b/sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py deleted file mode 100644 index 192f6785..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class FrontendBody1(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken' - } - - def __init__(self, frontend_token=None): # noqa: E501 - """FrontendBody1 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - - @property - def frontend_token(self): - """Gets the frontend_token of this FrontendBody1. # noqa: E501 - - - :return: The frontend_token of this FrontendBody1. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this FrontendBody1. - - - :param frontend_token: The frontend_token of this FrontendBody1. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(FrontendBody1, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FrontendBody1): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py b/sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py deleted file mode 100644 index aed451e3..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class FrontendBody2(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'public_name': 'str', - 'url_template': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'public_name': 'publicName', - 'url_template': 'urlTemplate' - } - - def __init__(self, frontend_token=None, public_name=None, url_template=None): # noqa: E501 - """FrontendBody2 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._public_name = None - self._url_template = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if public_name is not None: - self.public_name = public_name - if url_template is not None: - self.url_template = url_template - - @property - def frontend_token(self): - """Gets the frontend_token of this FrontendBody2. # noqa: E501 - - - :return: The frontend_token of this FrontendBody2. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this FrontendBody2. - - - :param frontend_token: The frontend_token of this FrontendBody2. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def public_name(self): - """Gets the public_name of this FrontendBody2. # noqa: E501 - - - :return: The public_name of this FrontendBody2. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this FrontendBody2. - - - :param public_name: The public_name of this FrontendBody2. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def url_template(self): - """Gets the url_template of this FrontendBody2. # noqa: E501 - - - :return: The url_template of this FrontendBody2. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this FrontendBody2. - - - :param url_template: The url_template of this FrontendBody2. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(FrontendBody2, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FrontendBody2): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontends.py b/sdk/python/sdk/zrok/zrok_api/models/frontends.py deleted file mode 100644 index 3c00604a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/frontends.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Frontends(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Frontends - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Frontends, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Frontends): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py new file mode 100644 index 00000000..e2847c98 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics import Metrics +from typing import Optional, Set +from typing_extensions import Self + +class GetSparklines200Response(BaseModel): + """ + GetSparklines200Response + """ # noqa: E501 + sparklines: Optional[List[Metrics]] = None + __properties: ClassVar[List[str]] = ["sparklines"] + + 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 GetSparklines200Response 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 sparklines (list) + _items = [] + if self.sparklines: + for _item in self.sparklines: + if _item: + _items.append(_item.to_dict()) + _dict['sparklines'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetSparklines200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sparklines": [Metrics.from_dict(_item) for _item in obj["sparklines"]] if obj.get("sparklines") is not None else None + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/get_sparklines_request.py b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines_request.py new file mode 100644 index 00000000..d9bef43d --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 GetSparklinesRequest(BaseModel): + """ + GetSparklinesRequest + """ # noqa: E501 + account: Optional[StrictBool] = None + environments: Optional[List[StrictStr]] = None + shares: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["account", "environments", "shares"] + + 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 GetSparklinesRequest 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 GetSparklinesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "account": obj.get("account"), + "environments": obj.get("environments"), + "shares": obj.get("shares") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/grants_body.py b/sdk/python/sdk/zrok/zrok_api/models/grants_body.py deleted file mode 100644 index 78e7d53a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/grants_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class GrantsBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str' - } - - attribute_map = { - 'email': 'email' - } - - def __init__(self, email=None): # noqa: E501 - """GrantsBody - a model defined in Swagger""" # noqa: E501 - self._email = None - self.discriminator = None - if email is not None: - self.email = email - - @property - def email(self): - """Gets the email of this GrantsBody. # noqa: E501 - - - :return: The email of this GrantsBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this GrantsBody. - - - :param email: The email of this GrantsBody. # noqa: E501 - :type: str - """ - - self._email = email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(GrantsBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GrantsBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/identity_body.py b/sdk/python/sdk/zrok/zrok_api/models/identity_body.py deleted file mode 100644 index 4be3f8e5..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/identity_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentityBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'name': 'str' - } - - attribute_map = { - 'name': 'name' - } - - def __init__(self, name=None): # noqa: E501 - """IdentityBody - a model defined in Swagger""" # noqa: E501 - self._name = None - self.discriminator = None - if name is not None: - self.name = name - - @property - def name(self): - """Gets the name of this IdentityBody. # noqa: E501 - - - :return: The name of this IdentityBody. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this IdentityBody. - - - :param name: The name of this IdentityBody. # noqa: E501 - :type: str - """ - - self._name = name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(IdentityBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, IdentityBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py deleted file mode 100644 index edb95aa5..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse200(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'account_token': 'str' - } - - attribute_map = { - 'account_token': 'accountToken' - } - - def __init__(self, account_token=None): # noqa: E501 - """InlineResponse200 - a model defined in Swagger""" # noqa: E501 - self._account_token = None - self.discriminator = None - if account_token is not None: - self.account_token = account_token - - @property - def account_token(self): - """Gets the account_token of this InlineResponse200. # noqa: E501 - - - :return: The account_token of this InlineResponse200. # noqa: E501 - :rtype: str - """ - return self._account_token - - @account_token.setter - def account_token(self, account_token): - """Sets the account_token of this InlineResponse200. - - - :param account_token: The account_token of this InlineResponse200. # noqa: E501 - :type: str - """ - - self._account_token = account_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse200, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse200): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py deleted file mode 100644 index 32a1818a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2001(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str' - } - - attribute_map = { - 'email': 'email' - } - - def __init__(self, email=None): # noqa: E501 - """InlineResponse2001 - a model defined in Swagger""" # noqa: E501 - self._email = None - self.discriminator = None - if email is not None: - self.email = email - - @property - def email(self): - """Gets the email of this InlineResponse2001. # noqa: E501 - - - :return: The email of this InlineResponse2001. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this InlineResponse2001. - - - :param email: The email of this InlineResponse2001. # noqa: E501 - :type: str - """ - - self._email = email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2001, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2001): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py deleted file mode 100644 index a162bfdc..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py +++ /dev/null @@ -1,240 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2002(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'z_id': 'str', - 'url_template': 'str', - 'public_name': 'str', - 'created_at': 'int', - 'updated_at': 'int' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'z_id': 'zId', - 'url_template': 'urlTemplate', - 'public_name': 'publicName', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, frontend_token=None, z_id=None, url_template=None, public_name=None, created_at=None, updated_at=None): # noqa: E501 - """InlineResponse2002 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._z_id = None - self._url_template = None - self._public_name = None - self._created_at = None - self._updated_at = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if z_id is not None: - self.z_id = z_id - if url_template is not None: - self.url_template = url_template - if public_name is not None: - self.public_name = public_name - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def frontend_token(self): - """Gets the frontend_token of this InlineResponse2002. # noqa: E501 - - - :return: The frontend_token of this InlineResponse2002. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this InlineResponse2002. - - - :param frontend_token: The frontend_token of this InlineResponse2002. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def z_id(self): - """Gets the z_id of this InlineResponse2002. # noqa: E501 - - - :return: The z_id of this InlineResponse2002. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this InlineResponse2002. - - - :param z_id: The z_id of this InlineResponse2002. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def url_template(self): - """Gets the url_template of this InlineResponse2002. # noqa: E501 - - - :return: The url_template of this InlineResponse2002. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this InlineResponse2002. - - - :param url_template: The url_template of this InlineResponse2002. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - @property - def public_name(self): - """Gets the public_name of this InlineResponse2002. # noqa: E501 - - - :return: The public_name of this InlineResponse2002. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this InlineResponse2002. - - - :param public_name: The public_name of this InlineResponse2002. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def created_at(self): - """Gets the created_at of this InlineResponse2002. # noqa: E501 - - - :return: The created_at of this InlineResponse2002. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this InlineResponse2002. - - - :param created_at: The created_at of this InlineResponse2002. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this InlineResponse2002. # noqa: E501 - - - :return: The updated_at of this InlineResponse2002. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this InlineResponse2002. - - - :param updated_at: The updated_at of this InlineResponse2002. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2002, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2002): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py deleted file mode 100644 index 93926054..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2003(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'members': 'list[InlineResponse2003Members]' - } - - attribute_map = { - 'members': 'members' - } - - def __init__(self, members=None): # noqa: E501 - """InlineResponse2003 - a model defined in Swagger""" # noqa: E501 - self._members = None - self.discriminator = None - if members is not None: - self.members = members - - @property - def members(self): - """Gets the members of this InlineResponse2003. # noqa: E501 - - - :return: The members of this InlineResponse2003. # noqa: E501 - :rtype: list[InlineResponse2003Members] - """ - return self._members - - @members.setter - def members(self, members): - """Sets the members of this InlineResponse2003. - - - :param members: The members of this InlineResponse2003. # noqa: E501 - :type: list[InlineResponse2003Members] - """ - - self._members = members - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2003, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2003): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py deleted file mode 100644 index 359fb898..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2003Members(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'admin': 'bool' - } - - attribute_map = { - 'email': 'email', - 'admin': 'admin' - } - - def __init__(self, email=None, admin=None): # noqa: E501 - """InlineResponse2003Members - a model defined in Swagger""" # noqa: E501 - self._email = None - self._admin = None - self.discriminator = None - if email is not None: - self.email = email - if admin is not None: - self.admin = admin - - @property - def email(self): - """Gets the email of this InlineResponse2003Members. # noqa: E501 - - - :return: The email of this InlineResponse2003Members. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this InlineResponse2003Members. - - - :param email: The email of this InlineResponse2003Members. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def admin(self): - """Gets the admin of this InlineResponse2003Members. # noqa: E501 - - - :return: The admin of this InlineResponse2003Members. # noqa: E501 - :rtype: bool - """ - return self._admin - - @admin.setter - def admin(self, admin): - """Sets the admin of this InlineResponse2003Members. - - - :param admin: The admin of this InlineResponse2003Members. # noqa: E501 - :type: bool - """ - - self._admin = admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2003Members, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2003Members): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py deleted file mode 100644 index d0a55eb0..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2004(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organizations': 'list[InlineResponse2004Organizations]' - } - - attribute_map = { - 'organizations': 'organizations' - } - - def __init__(self, organizations=None): # noqa: E501 - """InlineResponse2004 - a model defined in Swagger""" # noqa: E501 - self._organizations = None - self.discriminator = None - if organizations is not None: - self.organizations = organizations - - @property - def organizations(self): - """Gets the organizations of this InlineResponse2004. # noqa: E501 - - - :return: The organizations of this InlineResponse2004. # noqa: E501 - :rtype: list[InlineResponse2004Organizations] - """ - return self._organizations - - @organizations.setter - def organizations(self, organizations): - """Sets the organizations of this InlineResponse2004. - - - :param organizations: The organizations of this InlineResponse2004. # noqa: E501 - :type: list[InlineResponse2004Organizations] - """ - - self._organizations = organizations - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2004, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2004): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py deleted file mode 100644 index 1996b554..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2004Organizations(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str', - 'description': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken', - 'description': 'description' - } - - def __init__(self, organization_token=None, description=None): # noqa: E501 - """InlineResponse2004Organizations - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self._description = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - if description is not None: - self.description = description - - @property - def organization_token(self): - """Gets the organization_token of this InlineResponse2004Organizations. # noqa: E501 - - - :return: The organization_token of this InlineResponse2004Organizations. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this InlineResponse2004Organizations. - - - :param organization_token: The organization_token of this InlineResponse2004Organizations. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - @property - def description(self): - """Gets the description of this InlineResponse2004Organizations. # noqa: E501 - - - :return: The description of this InlineResponse2004Organizations. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this InlineResponse2004Organizations. - - - :param description: The description of this InlineResponse2004Organizations. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2004Organizations, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2004Organizations): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py deleted file mode 100644 index 3fa22e9d..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2005(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'memberships': 'list[InlineResponse2005Memberships]' - } - - attribute_map = { - 'memberships': 'memberships' - } - - def __init__(self, memberships=None): # noqa: E501 - """InlineResponse2005 - a model defined in Swagger""" # noqa: E501 - self._memberships = None - self.discriminator = None - if memberships is not None: - self.memberships = memberships - - @property - def memberships(self): - """Gets the memberships of this InlineResponse2005. # noqa: E501 - - - :return: The memberships of this InlineResponse2005. # noqa: E501 - :rtype: list[InlineResponse2005Memberships] - """ - return self._memberships - - @memberships.setter - def memberships(self, memberships): - """Sets the memberships of this InlineResponse2005. - - - :param memberships: The memberships of this InlineResponse2005. # noqa: E501 - :type: list[InlineResponse2005Memberships] - """ - - self._memberships = memberships - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2005, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2005): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py deleted file mode 100644 index 915fa44e..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2005Memberships(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str', - 'description': 'str', - 'admin': 'bool' - } - - attribute_map = { - 'organization_token': 'organizationToken', - 'description': 'description', - 'admin': 'admin' - } - - def __init__(self, organization_token=None, description=None, admin=None): # noqa: E501 - """InlineResponse2005Memberships - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self._description = None - self._admin = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - if description is not None: - self.description = description - if admin is not None: - self.admin = admin - - @property - def organization_token(self): - """Gets the organization_token of this InlineResponse2005Memberships. # noqa: E501 - - - :return: The organization_token of this InlineResponse2005Memberships. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this InlineResponse2005Memberships. - - - :param organization_token: The organization_token of this InlineResponse2005Memberships. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - @property - def description(self): - """Gets the description of this InlineResponse2005Memberships. # noqa: E501 - - - :return: The description of this InlineResponse2005Memberships. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this InlineResponse2005Memberships. - - - :param description: The description of this InlineResponse2005Memberships. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def admin(self): - """Gets the admin of this InlineResponse2005Memberships. # noqa: E501 - - - :return: The admin of this InlineResponse2005Memberships. # noqa: E501 - :rtype: bool - """ - return self._admin - - @admin.setter - def admin(self, admin): - """Sets the admin of this InlineResponse2005Memberships. - - - :param admin: The admin of this InlineResponse2005Memberships. # noqa: E501 - :type: bool - """ - - self._admin = admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2005Memberships, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2005Memberships): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py deleted file mode 100644 index 5757905a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2006(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'sparklines': 'list[Metrics]' - } - - attribute_map = { - 'sparklines': 'sparklines' - } - - def __init__(self, sparklines=None): # noqa: E501 - """InlineResponse2006 - a model defined in Swagger""" # noqa: E501 - self._sparklines = None - self.discriminator = None - if sparklines is not None: - self.sparklines = sparklines - - @property - def sparklines(self): - """Gets the sparklines of this InlineResponse2006. # noqa: E501 - - - :return: The sparklines of this InlineResponse2006. # noqa: E501 - :rtype: list[Metrics] - """ - return self._sparklines - - @sparklines.setter - def sparklines(self, sparklines): - """Sets the sparklines of this InlineResponse2006. - - - :param sparklines: The sparklines of this InlineResponse2006. # noqa: E501 - :type: list[Metrics] - """ - - self._sparklines = sparklines - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2006, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2006): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py deleted file mode 100644 index 356d155a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2007(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'controller_version': 'str' - } - - attribute_map = { - 'controller_version': 'controllerVersion' - } - - def __init__(self, controller_version=None): # noqa: E501 - """InlineResponse2007 - a model defined in Swagger""" # noqa: E501 - self._controller_version = None - self.discriminator = None - if controller_version is not None: - self.controller_version = controller_version - - @property - def controller_version(self): - """Gets the controller_version of this InlineResponse2007. # noqa: E501 - - - :return: The controller_version of this InlineResponse2007. # noqa: E501 - :rtype: str - """ - return self._controller_version - - @controller_version.setter - def controller_version(self, controller_version): - """Sets the controller_version of this InlineResponse2007. - - - :param controller_version: The controller_version of this InlineResponse2007. # noqa: E501 - :type: str - """ - - self._controller_version = controller_version - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2007, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2007): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py deleted file mode 100644 index 2cc96e64..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse201(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken' - } - - def __init__(self, frontend_token=None): # noqa: E501 - """InlineResponse201 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - - @property - def frontend_token(self): - """Gets the frontend_token of this InlineResponse201. # noqa: E501 - - - :return: The frontend_token of this InlineResponse201. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this InlineResponse201. - - - :param frontend_token: The frontend_token of this InlineResponse201. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse201, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse201): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py deleted file mode 100644 index 9d80730a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2011(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identity': 'str', - 'cfg': 'str' - } - - attribute_map = { - 'identity': 'identity', - 'cfg': 'cfg' - } - - def __init__(self, identity=None, cfg=None): # noqa: E501 - """InlineResponse2011 - a model defined in Swagger""" # noqa: E501 - self._identity = None - self._cfg = None - self.discriminator = None - if identity is not None: - self.identity = identity - if cfg is not None: - self.cfg = cfg - - @property - def identity(self): - """Gets the identity of this InlineResponse2011. # noqa: E501 - - - :return: The identity of this InlineResponse2011. # noqa: E501 - :rtype: str - """ - return self._identity - - @identity.setter - def identity(self, identity): - """Sets the identity of this InlineResponse2011. - - - :param identity: The identity of this InlineResponse2011. # noqa: E501 - :type: str - """ - - self._identity = identity - - @property - def cfg(self): - """Gets the cfg of this InlineResponse2011. # noqa: E501 - - - :return: The cfg of this InlineResponse2011. # noqa: E501 - :rtype: str - """ - return self._cfg - - @cfg.setter - def cfg(self, cfg): - """Sets the cfg of this InlineResponse2011. - - - :param cfg: The cfg of this InlineResponse2011. # noqa: E501 - :type: str - """ - - self._cfg = cfg - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2011, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2011): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py deleted file mode 100644 index dee97a61..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2012(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken' - } - - def __init__(self, organization_token=None): # noqa: E501 - """InlineResponse2012 - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - - @property - def organization_token(self): - """Gets the organization_token of this InlineResponse2012. # noqa: E501 - - - :return: The organization_token of this InlineResponse2012. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this InlineResponse2012. - - - :param organization_token: The organization_token of this InlineResponse2012. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2012, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2012): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py deleted file mode 100644 index 34a37b49..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2013(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'backend_mode': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'backend_mode': 'backendMode' - } - - def __init__(self, frontend_token=None, backend_mode=None): # noqa: E501 - """InlineResponse2013 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._backend_mode = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if backend_mode is not None: - self.backend_mode = backend_mode - - @property - def frontend_token(self): - """Gets the frontend_token of this InlineResponse2013. # noqa: E501 - - - :return: The frontend_token of this InlineResponse2013. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this InlineResponse2013. - - - :param frontend_token: The frontend_token of this InlineResponse2013. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def backend_mode(self): - """Gets the backend_mode of this InlineResponse2013. # noqa: E501 - - - :return: The backend_mode of this InlineResponse2013. # noqa: E501 - :rtype: str - """ - return self._backend_mode - - @backend_mode.setter - def backend_mode(self, backend_mode): - """Sets the backend_mode of this InlineResponse2013. - - - :param backend_mode: The backend_mode of this InlineResponse2013. # noqa: E501 - :type: str - """ - - self._backend_mode = backend_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2013, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2013): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_body.py b/sdk/python/sdk/zrok/zrok_api/models/invite_body.py deleted file mode 100644 index bb4840d5..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/invite_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InviteBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'invite_token': 'str' - } - - attribute_map = { - 'email': 'email', - 'invite_token': 'inviteToken' - } - - def __init__(self, email=None, invite_token=None): # noqa: E501 - """InviteBody - a model defined in Swagger""" # noqa: E501 - self._email = None - self._invite_token = None - self.discriminator = None - if email is not None: - self.email = email - if invite_token is not None: - self.invite_token = invite_token - - @property - def email(self): - """Gets the email of this InviteBody. # noqa: E501 - - - :return: The email of this InviteBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this InviteBody. - - - :param email: The email of this InviteBody. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def invite_token(self): - """Gets the invite_token of this InviteBody. # noqa: E501 - - - :return: The invite_token of this InviteBody. # noqa: E501 - :rtype: str - """ - return self._invite_token - - @invite_token.setter - def invite_token(self, invite_token): - """Sets the invite_token of this InviteBody. - - - :param invite_token: The invite_token of this InviteBody. # noqa: E501 - :type: str - """ - - self._invite_token = invite_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InviteBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InviteBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_request.py b/sdk/python/sdk/zrok/zrok_api/models/invite_request.py new file mode 100644 index 00000000..1c5bcc76 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/invite_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InviteRequest(BaseModel): + """ + InviteRequest + """ # noqa: E501 + email: Optional[StrictStr] = None + invite_token: Optional[StrictStr] = Field(default=None, alias="inviteToken") + __properties: ClassVar[List[str]] = ["email", "inviteToken"] + + 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 InviteRequest 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 InviteRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "inviteToken": obj.get("inviteToken") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py b/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py new file mode 100644 index 00000000..dd876de6 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InviteTokenGenerateRequest(BaseModel): + """ + InviteTokenGenerateRequest + """ # noqa: E501 + invite_tokens: Optional[List[StrictStr]] = Field(default=None, alias="inviteTokens") + __properties: ClassVar[List[str]] = ["inviteTokens"] + + 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 InviteTokenGenerateRequest 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 InviteTokenGenerateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inviteTokens": obj.get("inviteTokens") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_frontends200_response_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_frontends200_response_inner.py new file mode 100644 index 00000000..ff9d1bb4 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/list_frontends200_response_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ListFrontends200ResponseInner(BaseModel): + """ + ListFrontends200ResponseInner + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + public_name: Optional[StrictStr] = Field(default=None, alias="publicName") + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["frontendToken", "zId", "urlTemplate", "publicName", "createdAt", "updatedAt"] + + 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 ListFrontends200ResponseInner 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 ListFrontends200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "zId": obj.get("zId"), + "urlTemplate": obj.get("urlTemplate"), + "publicName": obj.get("publicName"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py new file mode 100644 index 00000000..cef5e9f1 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner +from typing import Optional, Set +from typing_extensions import Self + +class ListMemberships200Response(BaseModel): + """ + ListMemberships200Response + """ # noqa: E501 + memberships: Optional[List[ListMemberships200ResponseMembershipsInner]] = None + __properties: ClassVar[List[str]] = ["memberships"] + + 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 ListMemberships200Response 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 memberships (list) + _items = [] + if self.memberships: + for _item in self.memberships: + if _item: + _items.append(_item.to_dict()) + _dict['memberships'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListMemberships200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "memberships": [ListMemberships200ResponseMembershipsInner.from_dict(_item) for _item in obj["memberships"]] if obj.get("memberships") is not None else None + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response_memberships_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response_memberships_inner.py new file mode 100644 index 00000000..e39b07b8 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response_memberships_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class ListMemberships200ResponseMembershipsInner(BaseModel): + """ + ListMemberships200ResponseMembershipsInner + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + description: Optional[StrictStr] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["organizationToken", "description", "admin"] + + 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 ListMemberships200ResponseMembershipsInner 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 ListMemberships200ResponseMembershipsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "description": obj.get("description"), + "admin": obj.get("admin") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py new file mode 100644 index 00000000..c233d717 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner +from typing import Optional, Set +from typing_extensions import Self + +class ListOrganizationMembers200Response(BaseModel): + """ + ListOrganizationMembers200Response + """ # noqa: E501 + members: Optional[List[ListOrganizationMembers200ResponseMembersInner]] = None + __properties: ClassVar[List[str]] = ["members"] + + 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 ListOrganizationMembers200Response 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 members (list) + _items = [] + if self.members: + for _item in self.members: + if _item: + _items.append(_item.to_dict()) + _dict['members'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListOrganizationMembers200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "members": [ListOrganizationMembers200ResponseMembersInner.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response_members_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response_members_inner.py new file mode 100644 index 00000000..0266e878 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response_members_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 ListOrganizationMembers200ResponseMembersInner(BaseModel): + """ + ListOrganizationMembers200ResponseMembersInner + """ # noqa: E501 + email: Optional[StrictStr] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["email", "admin"] + + 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 ListOrganizationMembers200ResponseMembersInner 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 ListOrganizationMembers200ResponseMembersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "admin": obj.get("admin") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py new file mode 100644 index 00000000..34b9a19c --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner +from typing import Optional, Set +from typing_extensions import Self + +class ListOrganizations200Response(BaseModel): + """ + ListOrganizations200Response + """ # noqa: E501 + organizations: Optional[List[ListOrganizations200ResponseOrganizationsInner]] = None + __properties: ClassVar[List[str]] = ["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 ListOrganizations200Response 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 ListOrganizations200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizations": [ListOrganizations200ResponseOrganizationsInner.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response_organizations_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response_organizations_inner.py new file mode 100644 index 00000000..463e142a --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response_organizations_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ListOrganizations200ResponseOrganizationsInner(BaseModel): + """ + ListOrganizations200ResponseOrganizationsInner + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["organizationToken", "description"] + + 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 ListOrganizations200ResponseOrganizationsInner 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 ListOrganizations200ResponseOrganizationsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "description": obj.get("description") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/login_body.py b/sdk/python/sdk/zrok/zrok_api/models/login_body.py deleted file mode 100644 index 127672ca..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/login_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class LoginBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'password': 'str' - } - - attribute_map = { - 'email': 'email', - 'password': 'password' - } - - def __init__(self, email=None, password=None): # noqa: E501 - """LoginBody - a model defined in Swagger""" # noqa: E501 - self._email = None - self._password = None - self.discriminator = None - if email is not None: - self.email = email - if password is not None: - self.password = password - - @property - def email(self): - """Gets the email of this LoginBody. # noqa: E501 - - - :return: The email of this LoginBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this LoginBody. - - - :param email: The email of this LoginBody. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def password(self): - """Gets the password of this LoginBody. # noqa: E501 - - - :return: The password of this LoginBody. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this LoginBody. - - - :param password: The password of this LoginBody. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(LoginBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LoginBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/login_request.py b/sdk/python/sdk/zrok/zrok_api/models/login_request.py new file mode 100644 index 00000000..6ef640ea --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/login_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 LoginRequest(BaseModel): + """ + LoginRequest + """ # noqa: E501 + email: Optional[StrictStr] = None + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["email", "password"] + + 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 LoginRequest 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 LoginRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "password": obj.get("password") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics.py b/sdk/python/sdk/zrok/zrok_api/models/metrics.py index d7dd52f8..c3d91c23 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/metrics.py +++ b/sdk/python/sdk/zrok/zrok_api/models/metrics.py @@ -3,186 +3,99 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Metrics(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics_sample import MetricsSample +from typing import Optional, Set +from typing_extensions import Self + +class Metrics(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'scope': 'str', - 'id': 'str', - 'period': 'float', - 'samples': 'list[MetricsSample]' - } + Metrics + """ # noqa: E501 + scope: Optional[StrictStr] = None + id: Optional[StrictStr] = None + period: Optional[Union[StrictFloat, StrictInt]] = None + samples: Optional[List[MetricsSample]] = None + __properties: ClassVar[List[str]] = ["scope", "id", "period", "samples"] - attribute_map = { - 'scope': 'scope', - 'id': 'id', - 'period': 'period', - 'samples': 'samples' - } - - def __init__(self, scope=None, id=None, period=None, samples=None): # noqa: E501 - """Metrics - a model defined in Swagger""" # noqa: E501 - self._scope = None - self._id = None - self._period = None - self._samples = None - self.discriminator = None - if scope is not None: - self.scope = scope - if id is not None: - self.id = id - if period is not None: - self.period = period - if samples is not None: - self.samples = samples - - @property - def scope(self): - """Gets the scope of this Metrics. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The scope of this Metrics. # noqa: E501 - :rtype: str + 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 Metrics 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. """ - return self._scope + excluded_fields: Set[str] = set([ + ]) - @scope.setter - def scope(self, scope): - """Sets the scope of this Metrics. + _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 samples (list) + _items = [] + if self.samples: + for _item in self.samples: + if _item: + _items.append(_item.to_dict()) + _dict['samples'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Metrics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope": obj.get("scope"), + "id": obj.get("id"), + "period": obj.get("period"), + "samples": [MetricsSample.from_dict(_item) for _item in obj["samples"]] if obj.get("samples") is not None else None + }) + return _obj - :param scope: The scope of this Metrics. # noqa: E501 - :type: str - """ - - self._scope = scope - - @property - def id(self): - """Gets the id of this Metrics. # noqa: E501 - - - :return: The id of this Metrics. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Metrics. - - - :param id: The id of this Metrics. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def period(self): - """Gets the period of this Metrics. # noqa: E501 - - - :return: The period of this Metrics. # noqa: E501 - :rtype: float - """ - return self._period - - @period.setter - def period(self, period): - """Sets the period of this Metrics. - - - :param period: The period of this Metrics. # noqa: E501 - :type: float - """ - - self._period = period - - @property - def samples(self): - """Gets the samples of this Metrics. # noqa: E501 - - - :return: The samples of this Metrics. # noqa: E501 - :rtype: list[MetricsSample] - """ - return self._samples - - @samples.setter - def samples(self, samples): - """Sets the samples of this Metrics. - - - :param samples: The samples of this Metrics. # noqa: E501 - :type: list[MetricsSample] - """ - - self._samples = samples - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Metrics, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Metrics): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py b/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py index 8e297c43..678d0c1e 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py +++ b/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py @@ -3,160 +3,89 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class MetricsSample(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class MetricsSample(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'rx': 'float', - 'tx': 'float', - 'timestamp': 'float' - } + MetricsSample + """ # noqa: E501 + rx: Optional[Union[StrictFloat, StrictInt]] = None + tx: Optional[Union[StrictFloat, StrictInt]] = None + timestamp: Optional[Union[StrictFloat, StrictInt]] = None + __properties: ClassVar[List[str]] = ["rx", "tx", "timestamp"] - attribute_map = { - 'rx': 'rx', - 'tx': 'tx', - 'timestamp': 'timestamp' - } - - def __init__(self, rx=None, tx=None, timestamp=None): # noqa: E501 - """MetricsSample - a model defined in Swagger""" # noqa: E501 - self._rx = None - self._tx = None - self._timestamp = None - self.discriminator = None - if rx is not None: - self.rx = rx - if tx is not None: - self.tx = tx - if timestamp is not None: - self.timestamp = timestamp - - @property - def rx(self): - """Gets the rx of this MetricsSample. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The rx of this MetricsSample. # noqa: E501 - :rtype: float + 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 MetricsSample 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. """ - return self._rx + excluded_fields: Set[str] = set([ + ]) - @rx.setter - def rx(self, rx): - """Sets the rx of this MetricsSample. + _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 MetricsSample from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rx": obj.get("rx"), + "tx": obj.get("tx"), + "timestamp": obj.get("timestamp") + }) + return _obj - :param rx: The rx of this MetricsSample. # noqa: E501 - :type: float - """ - - self._rx = rx - - @property - def tx(self): - """Gets the tx of this MetricsSample. # noqa: E501 - - - :return: The tx of this MetricsSample. # noqa: E501 - :rtype: float - """ - return self._tx - - @tx.setter - def tx(self, tx): - """Sets the tx of this MetricsSample. - - - :param tx: The tx of this MetricsSample. # noqa: E501 - :type: float - """ - - self._tx = tx - - @property - def timestamp(self): - """Gets the timestamp of this MetricsSample. # noqa: E501 - - - :return: The timestamp of this MetricsSample. # noqa: E501 - :rtype: float - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this MetricsSample. - - - :param timestamp: The timestamp of this MetricsSample. # noqa: E501 - :type: float - """ - - self._timestamp = timestamp - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(MetricsSample, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MetricsSample): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py deleted file mode 100644 index 48fd06da..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationAddBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str', - 'email': 'str', - 'admin': 'bool' - } - - attribute_map = { - 'organization_token': 'organizationToken', - 'email': 'email', - 'admin': 'admin' - } - - def __init__(self, organization_token=None, email=None, admin=None): # noqa: E501 - """OrganizationAddBody - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self._email = None - self._admin = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - if email is not None: - self.email = email - if admin is not None: - self.admin = admin - - @property - def organization_token(self): - """Gets the organization_token of this OrganizationAddBody. # noqa: E501 - - - :return: The organization_token of this OrganizationAddBody. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationAddBody. - - - :param organization_token: The organization_token of this OrganizationAddBody. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - @property - def email(self): - """Gets the email of this OrganizationAddBody. # noqa: E501 - - - :return: The email of this OrganizationAddBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this OrganizationAddBody. - - - :param email: The email of this OrganizationAddBody. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def admin(self): - """Gets the admin of this OrganizationAddBody. # noqa: E501 - - - :return: The admin of this OrganizationAddBody. # noqa: E501 - :rtype: bool - """ - return self._admin - - @admin.setter - def admin(self, admin): - """Sets the admin of this OrganizationAddBody. - - - :param admin: The admin of this OrganizationAddBody. # noqa: E501 - :type: bool - """ - - self._admin = admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationAddBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationAddBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_body.py deleted file mode 100644 index 8133f0ff..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'description': 'str' - } - - attribute_map = { - 'description': 'description' - } - - def __init__(self, description=None): # noqa: E501 - """OrganizationBody - a model defined in Swagger""" # noqa: E501 - self._description = None - self.discriminator = None - if description is not None: - self.description = description - - @property - def description(self): - """Gets the description of this OrganizationBody. # noqa: E501 - - - :return: The description of this OrganizationBody. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this OrganizationBody. - - - :param description: The description of this OrganizationBody. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py b/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py deleted file mode 100644 index 45a5afde..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationBody1(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken' - } - - def __init__(self, organization_token=None): # noqa: E501 - """OrganizationBody1 - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - - @property - def organization_token(self): - """Gets the organization_token of this OrganizationBody1. # noqa: E501 - - - :return: The organization_token of this OrganizationBody1. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationBody1. - - - :param organization_token: The organization_token of this OrganizationBody1. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationBody1, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationBody1): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py deleted file mode 100644 index 167a9fe9..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationListBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken' - } - - def __init__(self, organization_token=None): # noqa: E501 - """OrganizationListBody - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - - @property - def organization_token(self): - """Gets the organization_token of this OrganizationListBody. # noqa: E501 - - - :return: The organization_token of this OrganizationListBody. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationListBody. - - - :param organization_token: The organization_token of this OrganizationListBody. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationListBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationListBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py deleted file mode 100644 index c4a9374d..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationRemoveBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str', - 'email': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken', - 'email': 'email' - } - - def __init__(self, organization_token=None, email=None): # noqa: E501 - """OrganizationRemoveBody - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self._email = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - if email is not None: - self.email = email - - @property - def organization_token(self): - """Gets the organization_token of this OrganizationRemoveBody. # noqa: E501 - - - :return: The organization_token of this OrganizationRemoveBody. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationRemoveBody. - - - :param organization_token: The organization_token of this OrganizationRemoveBody. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - @property - def email(self): - """Gets the email of this OrganizationRemoveBody. # noqa: E501 - - - :return: The email of this OrganizationRemoveBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this OrganizationRemoveBody. - - - :param email: The email of this OrganizationRemoveBody. # noqa: E501 - :type: str - """ - - self._email = email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationRemoveBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationRemoveBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/overview.py b/sdk/python/sdk/zrok/zrok_api/models/overview.py index 7ef8aac4..80af2b23 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/overview.py +++ b/sdk/python/sdk/zrok/zrok_api/models/overview.py @@ -3,134 +3,95 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Overview(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from typing import Optional, Set +from typing_extensions import Self + +class Overview(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'account_limited': 'bool', - 'environments': 'list[EnvironmentAndResources]' - } + Overview + """ # noqa: E501 + account_limited: Optional[StrictBool] = Field(default=None, alias="accountLimited") + environments: Optional[List[EnvironmentAndResources]] = None + __properties: ClassVar[List[str]] = ["accountLimited", "environments"] - attribute_map = { - 'account_limited': 'accountLimited', - 'environments': 'environments' - } - - def __init__(self, account_limited=None, environments=None): # noqa: E501 - """Overview - a model defined in Swagger""" # noqa: E501 - self._account_limited = None - self._environments = None - self.discriminator = None - if account_limited is not None: - self.account_limited = account_limited - if environments is not None: - self.environments = environments - - @property - def account_limited(self): - """Gets the account_limited of this Overview. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The account_limited of this Overview. # noqa: E501 - :rtype: bool + 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 Overview 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. """ - return self._account_limited + excluded_fields: Set[str] = set([ + ]) - @account_limited.setter - def account_limited(self, account_limited): - """Sets the account_limited of this Overview. + _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 environments (list) + _items = [] + if self.environments: + for _item in self.environments: + if _item: + _items.append(_item.to_dict()) + _dict['environments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Overview from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountLimited": obj.get("accountLimited"), + "environments": [EnvironmentAndResources.from_dict(_item) for _item in obj["environments"]] if obj.get("environments") is not None else None + }) + return _obj - :param account_limited: The account_limited of this Overview. # noqa: E501 - :type: bool - """ - - self._account_limited = account_limited - - @property - def environments(self): - """Gets the environments of this Overview. # noqa: E501 - - - :return: The environments of this Overview. # noqa: E501 - :rtype: list[EnvironmentAndResources] - """ - return self._environments - - @environments.setter - def environments(self, environments): - """Sets the environments of this Overview. - - - :param environments: The environments of this Overview. # noqa: E501 - :type: list[EnvironmentAndResources] - """ - - self._environments = environments - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Overview, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Overview): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/principal.py b/sdk/python/sdk/zrok/zrok_api/models/principal.py index 0f1c6ff4..6ff9f756 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/principal.py +++ b/sdk/python/sdk/zrok/zrok_api/models/principal.py @@ -3,212 +3,93 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Principal(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 Principal(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'email': 'str', - 'token': 'str', - 'limitless': 'bool', - 'admin': 'bool' - } + Principal + """ # noqa: E501 + id: Optional[StrictInt] = None + email: Optional[StrictStr] = None + token: Optional[StrictStr] = None + limitless: Optional[StrictBool] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "email", "token", "limitless", "admin"] - attribute_map = { - 'id': 'id', - 'email': 'email', - 'token': 'token', - 'limitless': 'limitless', - 'admin': 'admin' - } - - def __init__(self, id=None, email=None, token=None, limitless=None, admin=None): # noqa: E501 - """Principal - a model defined in Swagger""" # noqa: E501 - self._id = None - self._email = None - self._token = None - self._limitless = None - self._admin = None - self.discriminator = None - if id is not None: - self.id = id - if email is not None: - self.email = email - if token is not None: - self.token = token - if limitless is not None: - self.limitless = limitless - if admin is not None: - self.admin = admin - - @property - def id(self): - """Gets the id of this Principal. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The id of this Principal. # noqa: E501 - :rtype: int + 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 Principal 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. """ - return self._id + excluded_fields: Set[str] = set([ + ]) - @id.setter - def id(self, id): - """Sets the id of this Principal. + _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 Principal 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"), + "email": obj.get("email"), + "token": obj.get("token"), + "limitless": obj.get("limitless"), + "admin": obj.get("admin") + }) + return _obj - :param id: The id of this Principal. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def email(self): - """Gets the email of this Principal. # noqa: E501 - - - :return: The email of this Principal. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this Principal. - - - :param email: The email of this Principal. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def token(self): - """Gets the token of this Principal. # noqa: E501 - - - :return: The token of this Principal. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this Principal. - - - :param token: The token of this Principal. # noqa: E501 - :type: str - """ - - self._token = token - - @property - def limitless(self): - """Gets the limitless of this Principal. # noqa: E501 - - - :return: The limitless of this Principal. # noqa: E501 - :rtype: bool - """ - return self._limitless - - @limitless.setter - def limitless(self, limitless): - """Sets the limitless of this Principal. - - - :param limitless: The limitless of this Principal. # noqa: E501 - :type: bool - """ - - self._limitless = limitless - - @property - def admin(self): - """Gets the admin of this Principal. # noqa: E501 - - - :return: The admin of this Principal. # noqa: E501 - :rtype: bool - """ - return self._admin - - @admin.setter - def admin(self, admin): - """Sets the admin of this Principal. - - - :param admin: The admin of this Principal. # noqa: E501 - :type: bool - """ - - self._admin = admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Principal, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Principal): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token200_response.py b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token200_response.py new file mode 100644 index 00000000..ccaf7ff4 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RegenerateAccountToken200Response(BaseModel): + """ + RegenerateAccountToken200Response + """ # noqa: E501 + account_token: Optional[StrictStr] = Field(default=None, alias="accountToken") + __properties: ClassVar[List[str]] = ["accountToken"] + + 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 RegenerateAccountToken200Response 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 RegenerateAccountToken200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountToken": obj.get("accountToken") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py deleted file mode 100644 index 61513276..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RegenerateAccountTokenBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email_address': 'str' - } - - attribute_map = { - 'email_address': 'emailAddress' - } - - def __init__(self, email_address=None): # noqa: E501 - """RegenerateAccountTokenBody - a model defined in Swagger""" # noqa: E501 - self._email_address = None - self.discriminator = None - if email_address is not None: - self.email_address = email_address - - @property - def email_address(self): - """Gets the email_address of this RegenerateAccountTokenBody. # noqa: E501 - - - :return: The email_address of this RegenerateAccountTokenBody. # noqa: E501 - :rtype: str - """ - return self._email_address - - @email_address.setter - def email_address(self, email_address): - """Sets the email_address of this RegenerateAccountTokenBody. - - - :param email_address: The email_address of this RegenerateAccountTokenBody. # noqa: E501 - :type: str - """ - - self._email_address = email_address - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(RegenerateAccountTokenBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RegenerateAccountTokenBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_request.py b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_request.py new file mode 100644 index 00000000..32f2029f --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RegenerateAccountTokenRequest(BaseModel): + """ + RegenerateAccountTokenRequest + """ # noqa: E501 + email_address: Optional[StrictStr] = Field(default=None, alias="emailAddress") + __properties: ClassVar[List[str]] = ["emailAddress"] + + 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 RegenerateAccountTokenRequest 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 RegenerateAccountTokenRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "emailAddress": obj.get("emailAddress") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/register_body.py b/sdk/python/sdk/zrok/zrok_api/models/register_body.py deleted file mode 100644 index 80549446..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/register_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RegisterBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'register_token': 'str', - 'password': 'str' - } - - attribute_map = { - 'register_token': 'registerToken', - 'password': 'password' - } - - def __init__(self, register_token=None, password=None): # noqa: E501 - """RegisterBody - a model defined in Swagger""" # noqa: E501 - self._register_token = None - self._password = None - self.discriminator = None - if register_token is not None: - self.register_token = register_token - if password is not None: - self.password = password - - @property - def register_token(self): - """Gets the register_token of this RegisterBody. # noqa: E501 - - - :return: The register_token of this RegisterBody. # noqa: E501 - :rtype: str - """ - return self._register_token - - @register_token.setter - def register_token(self, register_token): - """Sets the register_token of this RegisterBody. - - - :param register_token: The register_token of this RegisterBody. # noqa: E501 - :type: str - """ - - self._register_token = register_token - - @property - def password(self): - """Gets the password of this RegisterBody. # noqa: E501 - - - :return: The password of this RegisterBody. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this RegisterBody. - - - :param password: The password of this RegisterBody. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(RegisterBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RegisterBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/register_request.py b/sdk/python/sdk/zrok/zrok_api/models/register_request.py new file mode 100644 index 00000000..f2bf90bd --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/register_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RegisterRequest(BaseModel): + """ + RegisterRequest + """ # noqa: E501 + register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["registerToken", "password"] + + 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 RegisterRequest 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 RegisterRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "registerToken": obj.get("registerToken"), + "password": obj.get("password") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/remove_organization_member_request.py b/sdk/python/sdk/zrok/zrok_api/models/remove_organization_member_request.py new file mode 100644 index 00000000..28b6bd25 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/remove_organization_member_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RemoveOrganizationMemberRequest(BaseModel): + """ + RemoveOrganizationMemberRequest + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + email: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["organizationToken", "email"] + + 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 RemoveOrganizationMemberRequest 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 RemoveOrganizationMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "email": obj.get("email") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py deleted file mode 100644 index 0dbc086a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ResetPasswordBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'reset_token': 'str', - 'password': 'str' - } - - attribute_map = { - 'reset_token': 'resetToken', - 'password': 'password' - } - - def __init__(self, reset_token=None, password=None): # noqa: E501 - """ResetPasswordBody - a model defined in Swagger""" # noqa: E501 - self._reset_token = None - self._password = None - self.discriminator = None - if reset_token is not None: - self.reset_token = reset_token - if password is not None: - self.password = password - - @property - def reset_token(self): - """Gets the reset_token of this ResetPasswordBody. # noqa: E501 - - - :return: The reset_token of this ResetPasswordBody. # noqa: E501 - :rtype: str - """ - return self._reset_token - - @reset_token.setter - def reset_token(self, reset_token): - """Sets the reset_token of this ResetPasswordBody. - - - :param reset_token: The reset_token of this ResetPasswordBody. # noqa: E501 - :type: str - """ - - self._reset_token = reset_token - - @property - def password(self): - """Gets the password of this ResetPasswordBody. # noqa: E501 - - - :return: The password of this ResetPasswordBody. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this ResetPasswordBody. - - - :param password: The password of this ResetPasswordBody. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ResetPasswordBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResetPasswordBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py new file mode 100644 index 00000000..a81c4bd3 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ResetPasswordRequest(BaseModel): + """ + ResetPasswordRequest + """ # noqa: E501 + reset_token: Optional[StrictStr] = Field(default=None, alias="resetToken") + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["resetToken", "password"] + + 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 ResetPasswordRequest 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 ResetPasswordRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resetToken": obj.get("resetToken"), + "password": obj.get("password") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py deleted file mode 100644 index 2d0bd614..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ResetPasswordRequestBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email_address': 'str' - } - - attribute_map = { - 'email_address': 'emailAddress' - } - - def __init__(self, email_address=None): # noqa: E501 - """ResetPasswordRequestBody - a model defined in Swagger""" # noqa: E501 - self._email_address = None - self.discriminator = None - if email_address is not None: - self.email_address = email_address - - @property - def email_address(self): - """Gets the email_address of this ResetPasswordRequestBody. # noqa: E501 - - - :return: The email_address of this ResetPasswordRequestBody. # noqa: E501 - :rtype: str - """ - return self._email_address - - @email_address.setter - def email_address(self, email_address): - """Sets the email_address of this ResetPasswordRequestBody. - - - :param email_address: The email_address of this ResetPasswordRequestBody. # noqa: E501 - :type: str - """ - - self._email_address = email_address - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ResetPasswordRequestBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResetPasswordRequestBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/share.py b/sdk/python/sdk/zrok/zrok_api/models/share.py index abdb66af..76a63e37 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share.py @@ -3,394 +3,115 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Share(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.spark_data_sample import SparkDataSample +from typing import Optional, Set +from typing_extensions import Self + +class Share(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'share_token': 'str', - 'z_id': 'str', - 'share_mode': 'str', - 'backend_mode': 'str', - 'frontend_selection': 'str', - 'frontend_endpoint': 'str', - 'backend_proxy_endpoint': 'str', - 'reserved': 'bool', - 'activity': 'SparkData', - 'limited': 'bool', - 'created_at': 'int', - 'updated_at': 'int' - } + Share + """ # noqa: E501 + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + frontend_selection: Optional[StrictStr] = Field(default=None, alias="frontendSelection") + frontend_endpoint: Optional[StrictStr] = Field(default=None, alias="frontendEndpoint") + backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") + reserved: Optional[StrictBool] = None + activity: Optional[List[SparkDataSample]] = None + limited: Optional[StrictBool] = None + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["shareToken", "zId", "shareMode", "backendMode", "frontendSelection", "frontendEndpoint", "backendProxyEndpoint", "reserved", "activity", "limited", "createdAt", "updatedAt"] - attribute_map = { - 'share_token': 'shareToken', - 'z_id': 'zId', - 'share_mode': 'shareMode', - 'backend_mode': 'backendMode', - 'frontend_selection': 'frontendSelection', - 'frontend_endpoint': 'frontendEndpoint', - 'backend_proxy_endpoint': 'backendProxyEndpoint', - 'reserved': 'reserved', - 'activity': 'activity', - 'limited': 'limited', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, share_token=None, z_id=None, share_mode=None, backend_mode=None, frontend_selection=None, frontend_endpoint=None, backend_proxy_endpoint=None, reserved=None, activity=None, limited=None, created_at=None, updated_at=None): # noqa: E501 - """Share - a model defined in Swagger""" # noqa: E501 - self._share_token = None - self._z_id = None - self._share_mode = None - self._backend_mode = None - self._frontend_selection = None - self._frontend_endpoint = None - self._backend_proxy_endpoint = None - self._reserved = None - self._activity = None - self._limited = None - self._created_at = None - self._updated_at = None - self.discriminator = None - if share_token is not None: - self.share_token = share_token - if z_id is not None: - self.z_id = z_id - if share_mode is not None: - self.share_mode = share_mode - if backend_mode is not None: - self.backend_mode = backend_mode - if frontend_selection is not None: - self.frontend_selection = frontend_selection - if frontend_endpoint is not None: - self.frontend_endpoint = frontend_endpoint - if backend_proxy_endpoint is not None: - self.backend_proxy_endpoint = backend_proxy_endpoint - if reserved is not None: - self.reserved = reserved - if activity is not None: - self.activity = activity - if limited is not None: - self.limited = limited - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def share_token(self): - """Gets the share_token of this Share. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The share_token of this Share. # noqa: E501 - :rtype: str + 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 Share 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. """ - return self._share_token + 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 activity (list) + _items = [] + if self.activity: + for _item in self.activity: + if _item: + _items.append(_item.to_dict()) + _dict['activity'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Share from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "shareToken": obj.get("shareToken"), + "zId": obj.get("zId"), + "shareMode": obj.get("shareMode"), + "backendMode": obj.get("backendMode"), + "frontendSelection": obj.get("frontendSelection"), + "frontendEndpoint": obj.get("frontendEndpoint"), + "backendProxyEndpoint": obj.get("backendProxyEndpoint"), + "reserved": obj.get("reserved"), + "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, + "limited": obj.get("limited"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this Share. - - :param share_token: The share_token of this Share. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def z_id(self): - """Gets the z_id of this Share. # noqa: E501 - - - :return: The z_id of this Share. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this Share. - - - :param z_id: The z_id of this Share. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def share_mode(self): - """Gets the share_mode of this Share. # noqa: E501 - - - :return: The share_mode of this Share. # noqa: E501 - :rtype: str - """ - return self._share_mode - - @share_mode.setter - def share_mode(self, share_mode): - """Sets the share_mode of this Share. - - - :param share_mode: The share_mode of this Share. # noqa: E501 - :type: str - """ - - self._share_mode = share_mode - - @property - def backend_mode(self): - """Gets the backend_mode of this Share. # noqa: E501 - - - :return: The backend_mode of this Share. # noqa: E501 - :rtype: str - """ - return self._backend_mode - - @backend_mode.setter - def backend_mode(self, backend_mode): - """Sets the backend_mode of this Share. - - - :param backend_mode: The backend_mode of this Share. # noqa: E501 - :type: str - """ - - self._backend_mode = backend_mode - - @property - def frontend_selection(self): - """Gets the frontend_selection of this Share. # noqa: E501 - - - :return: The frontend_selection of this Share. # noqa: E501 - :rtype: str - """ - return self._frontend_selection - - @frontend_selection.setter - def frontend_selection(self, frontend_selection): - """Sets the frontend_selection of this Share. - - - :param frontend_selection: The frontend_selection of this Share. # noqa: E501 - :type: str - """ - - self._frontend_selection = frontend_selection - - @property - def frontend_endpoint(self): - """Gets the frontend_endpoint of this Share. # noqa: E501 - - - :return: The frontend_endpoint of this Share. # noqa: E501 - :rtype: str - """ - return self._frontend_endpoint - - @frontend_endpoint.setter - def frontend_endpoint(self, frontend_endpoint): - """Sets the frontend_endpoint of this Share. - - - :param frontend_endpoint: The frontend_endpoint of this Share. # noqa: E501 - :type: str - """ - - self._frontend_endpoint = frontend_endpoint - - @property - def backend_proxy_endpoint(self): - """Gets the backend_proxy_endpoint of this Share. # noqa: E501 - - - :return: The backend_proxy_endpoint of this Share. # noqa: E501 - :rtype: str - """ - return self._backend_proxy_endpoint - - @backend_proxy_endpoint.setter - def backend_proxy_endpoint(self, backend_proxy_endpoint): - """Sets the backend_proxy_endpoint of this Share. - - - :param backend_proxy_endpoint: The backend_proxy_endpoint of this Share. # noqa: E501 - :type: str - """ - - self._backend_proxy_endpoint = backend_proxy_endpoint - - @property - def reserved(self): - """Gets the reserved of this Share. # noqa: E501 - - - :return: The reserved of this Share. # noqa: E501 - :rtype: bool - """ - return self._reserved - - @reserved.setter - def reserved(self, reserved): - """Sets the reserved of this Share. - - - :param reserved: The reserved of this Share. # noqa: E501 - :type: bool - """ - - self._reserved = reserved - - @property - def activity(self): - """Gets the activity of this Share. # noqa: E501 - - - :return: The activity of this Share. # noqa: E501 - :rtype: SparkData - """ - return self._activity - - @activity.setter - def activity(self, activity): - """Sets the activity of this Share. - - - :param activity: The activity of this Share. # noqa: E501 - :type: SparkData - """ - - self._activity = activity - - @property - def limited(self): - """Gets the limited of this Share. # noqa: E501 - - - :return: The limited of this Share. # noqa: E501 - :rtype: bool - """ - return self._limited - - @limited.setter - def limited(self, limited): - """Sets the limited of this Share. - - - :param limited: The limited of this Share. # noqa: E501 - :type: bool - """ - - self._limited = limited - - @property - def created_at(self): - """Gets the created_at of this Share. # noqa: E501 - - - :return: The created_at of this Share. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Share. - - - :param created_at: The created_at of this Share. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Share. # noqa: E501 - - - :return: The updated_at of this Share. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Share. - - - :param updated_at: The updated_at of this Share. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Share, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Share): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_body.py b/sdk/python/sdk/zrok/zrok_api/models/share_body.py deleted file mode 100644 index f8398b70..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/share_body.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ShareBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'share_token': 'str', - 'backend_proxy_endpoint': 'str', - 'add_access_grants': 'list[str]', - 'remove_access_grants': 'list[str]' - } - - attribute_map = { - 'share_token': 'shareToken', - 'backend_proxy_endpoint': 'backendProxyEndpoint', - 'add_access_grants': 'addAccessGrants', - 'remove_access_grants': 'removeAccessGrants' - } - - def __init__(self, share_token=None, backend_proxy_endpoint=None, add_access_grants=None, remove_access_grants=None): # noqa: E501 - """ShareBody - a model defined in Swagger""" # noqa: E501 - self._share_token = None - self._backend_proxy_endpoint = None - self._add_access_grants = None - self._remove_access_grants = None - self.discriminator = None - if share_token is not None: - self.share_token = share_token - if backend_proxy_endpoint is not None: - self.backend_proxy_endpoint = backend_proxy_endpoint - if add_access_grants is not None: - self.add_access_grants = add_access_grants - if remove_access_grants is not None: - self.remove_access_grants = remove_access_grants - - @property - def share_token(self): - """Gets the share_token of this ShareBody. # noqa: E501 - - - :return: The share_token of this ShareBody. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this ShareBody. - - - :param share_token: The share_token of this ShareBody. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def backend_proxy_endpoint(self): - """Gets the backend_proxy_endpoint of this ShareBody. # noqa: E501 - - - :return: The backend_proxy_endpoint of this ShareBody. # noqa: E501 - :rtype: str - """ - return self._backend_proxy_endpoint - - @backend_proxy_endpoint.setter - def backend_proxy_endpoint(self, backend_proxy_endpoint): - """Sets the backend_proxy_endpoint of this ShareBody. - - - :param backend_proxy_endpoint: The backend_proxy_endpoint of this ShareBody. # noqa: E501 - :type: str - """ - - self._backend_proxy_endpoint = backend_proxy_endpoint - - @property - def add_access_grants(self): - """Gets the add_access_grants of this ShareBody. # noqa: E501 - - - :return: The add_access_grants of this ShareBody. # noqa: E501 - :rtype: list[str] - """ - return self._add_access_grants - - @add_access_grants.setter - def add_access_grants(self, add_access_grants): - """Sets the add_access_grants of this ShareBody. - - - :param add_access_grants: The add_access_grants of this ShareBody. # noqa: E501 - :type: list[str] - """ - - self._add_access_grants = add_access_grants - - @property - def remove_access_grants(self): - """Gets the remove_access_grants of this ShareBody. # noqa: E501 - - - :return: The remove_access_grants of this ShareBody. # noqa: E501 - :rtype: list[str] - """ - return self._remove_access_grants - - @remove_access_grants.setter - def remove_access_grants(self, remove_access_grants): - """Sets the remove_access_grants of this ShareBody. - - - :param remove_access_grants: The remove_access_grants of this ShareBody. # noqa: E501 - :type: list[str] - """ - - self._remove_access_grants = remove_access_grants - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ShareBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ShareBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_request.py b/sdk/python/sdk/zrok/zrok_api/models/share_request.py index ee9a08b1..f29b9c89 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share_request.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share_request.py @@ -3,470 +3,159 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ShareRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.auth_user import AuthUser +from typing import Optional, Set +from typing_extensions import Self + +class ShareRequest(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'env_zid': 'str', - 'share_mode': 'str', - 'frontend_selection': 'list[str]', - 'backend_mode': 'str', - 'backend_proxy_endpoint': 'str', - 'auth_scheme': 'str', - 'auth_users': 'list[AuthUser]', - 'oauth_provider': 'str', - 'oauth_email_domains': 'list[str]', - 'oauth_authorization_check_interval': 'str', - 'reserved': 'bool', - 'permission_mode': 'str', - 'access_grants': 'list[str]', - 'unique_name': 'str' - } + ShareRequest + """ # noqa: E501 + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") + frontend_selection: Optional[List[StrictStr]] = Field(default=None, alias="frontendSelection") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") + auth_scheme: Optional[StrictStr] = Field(default=None, alias="authScheme") + auth_users: Optional[List[AuthUser]] = Field(default=None, alias="authUsers") + oauth_provider: Optional[StrictStr] = Field(default=None, alias="oauthProvider") + oauth_email_domains: Optional[List[StrictStr]] = Field(default=None, alias="oauthEmailDomains") + oauth_authorization_check_interval: Optional[StrictStr] = Field(default=None, alias="oauthAuthorizationCheckInterval") + reserved: Optional[StrictBool] = None + permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") + access_grants: Optional[List[StrictStr]] = Field(default=None, alias="accessGrants") + unique_name: Optional[StrictStr] = Field(default=None, alias="uniqueName") + __properties: ClassVar[List[str]] = ["envZId", "shareMode", "frontendSelection", "backendMode", "backendProxyEndpoint", "authScheme", "authUsers", "oauthProvider", "oauthEmailDomains", "oauthAuthorizationCheckInterval", "reserved", "permissionMode", "accessGrants", "uniqueName"] - attribute_map = { - 'env_zid': 'envZId', - 'share_mode': 'shareMode', - 'frontend_selection': 'frontendSelection', - 'backend_mode': 'backendMode', - 'backend_proxy_endpoint': 'backendProxyEndpoint', - 'auth_scheme': 'authScheme', - 'auth_users': 'authUsers', - 'oauth_provider': 'oauthProvider', - 'oauth_email_domains': 'oauthEmailDomains', - 'oauth_authorization_check_interval': 'oauthAuthorizationCheckInterval', - 'reserved': 'reserved', - 'permission_mode': 'permissionMode', - 'access_grants': 'accessGrants', - 'unique_name': 'uniqueName' - } + @field_validator('share_mode') + def share_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value - def __init__(self, env_zid=None, share_mode=None, frontend_selection=None, backend_mode=None, backend_proxy_endpoint=None, auth_scheme=None, auth_users=None, oauth_provider=None, oauth_email_domains=None, oauth_authorization_check_interval=None, reserved=None, permission_mode=None, access_grants=None, unique_name=None): # noqa: E501 - """ShareRequest - a model defined in Swagger""" # noqa: E501 - self._env_zid = None - self._share_mode = None - self._frontend_selection = None - self._backend_mode = None - self._backend_proxy_endpoint = None - self._auth_scheme = None - self._auth_users = None - self._oauth_provider = None - self._oauth_email_domains = None - self._oauth_authorization_check_interval = None - self._reserved = None - self._permission_mode = None - self._access_grants = None - self._unique_name = None - self.discriminator = None - if env_zid is not None: - self.env_zid = env_zid - if share_mode is not None: - self.share_mode = share_mode - if frontend_selection is not None: - self.frontend_selection = frontend_selection - if backend_mode is not None: - self.backend_mode = backend_mode - if backend_proxy_endpoint is not None: - self.backend_proxy_endpoint = backend_proxy_endpoint - if auth_scheme is not None: - self.auth_scheme = auth_scheme - if auth_users is not None: - self.auth_users = auth_users - if oauth_provider is not None: - self.oauth_provider = oauth_provider - if oauth_email_domains is not None: - self.oauth_email_domains = oauth_email_domains - if oauth_authorization_check_interval is not None: - self.oauth_authorization_check_interval = oauth_authorization_check_interval - if reserved is not None: - self.reserved = reserved - if permission_mode is not None: - self.permission_mode = permission_mode - if access_grants is not None: - self.access_grants = access_grants - if unique_name is not None: - self.unique_name = unique_name + if value not in set(['public', 'private']): + raise ValueError("must be one of enum values ('public', 'private')") + return value - @property - def env_zid(self): - """Gets the env_zid of this ShareRequest. # noqa: E501 + @field_validator('backend_mode') + def backend_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn']): + raise ValueError("must be one of enum values ('proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn')") + return value + + @field_validator('oauth_provider') + def oauth_provider_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['github', 'google']): + raise ValueError("must be one of enum values ('github', 'google')") + return value + + @field_validator('permission_mode') + def permission_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['open', 'closed']): + raise ValueError("must be one of enum values ('open', 'closed')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The env_zid of this ShareRequest. # noqa: E501 - :rtype: str + 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 ShareRequest 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. """ - return self._env_zid + 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 auth_users (list) + _items = [] + if self.auth_users: + for _item in self.auth_users: + if _item: + _items.append(_item.to_dict()) + _dict['authUsers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ShareRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "envZId": obj.get("envZId"), + "shareMode": obj.get("shareMode"), + "frontendSelection": obj.get("frontendSelection"), + "backendMode": obj.get("backendMode"), + "backendProxyEndpoint": obj.get("backendProxyEndpoint"), + "authScheme": obj.get("authScheme"), + "authUsers": [AuthUser.from_dict(_item) for _item in obj["authUsers"]] if obj.get("authUsers") is not None else None, + "oauthProvider": obj.get("oauthProvider"), + "oauthEmailDomains": obj.get("oauthEmailDomains"), + "oauthAuthorizationCheckInterval": obj.get("oauthAuthorizationCheckInterval"), + "reserved": obj.get("reserved"), + "permissionMode": obj.get("permissionMode"), + "accessGrants": obj.get("accessGrants"), + "uniqueName": obj.get("uniqueName") + }) + return _obj - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this ShareRequest. - - :param env_zid: The env_zid of this ShareRequest. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def share_mode(self): - """Gets the share_mode of this ShareRequest. # noqa: E501 - - - :return: The share_mode of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._share_mode - - @share_mode.setter - def share_mode(self, share_mode): - """Sets the share_mode of this ShareRequest. - - - :param share_mode: The share_mode of this ShareRequest. # noqa: E501 - :type: str - """ - allowed_values = ["public", "private"] # noqa: E501 - if share_mode not in allowed_values: - raise ValueError( - "Invalid value for `share_mode` ({0}), must be one of {1}" # noqa: E501 - .format(share_mode, allowed_values) - ) - - self._share_mode = share_mode - - @property - def frontend_selection(self): - """Gets the frontend_selection of this ShareRequest. # noqa: E501 - - - :return: The frontend_selection of this ShareRequest. # noqa: E501 - :rtype: list[str] - """ - return self._frontend_selection - - @frontend_selection.setter - def frontend_selection(self, frontend_selection): - """Sets the frontend_selection of this ShareRequest. - - - :param frontend_selection: The frontend_selection of this ShareRequest. # noqa: E501 - :type: list[str] - """ - - self._frontend_selection = frontend_selection - - @property - def backend_mode(self): - """Gets the backend_mode of this ShareRequest. # noqa: E501 - - - :return: The backend_mode of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._backend_mode - - @backend_mode.setter - def backend_mode(self, backend_mode): - """Sets the backend_mode of this ShareRequest. - - - :param backend_mode: The backend_mode of this ShareRequest. # noqa: E501 - :type: str - """ - allowed_values = ["proxy", "web", "tcpTunnel", "udpTunnel", "caddy", "drive", "socks", "vpn"] # noqa: E501 - if backend_mode not in allowed_values: - raise ValueError( - "Invalid value for `backend_mode` ({0}), must be one of {1}" # noqa: E501 - .format(backend_mode, allowed_values) - ) - - self._backend_mode = backend_mode - - @property - def backend_proxy_endpoint(self): - """Gets the backend_proxy_endpoint of this ShareRequest. # noqa: E501 - - - :return: The backend_proxy_endpoint of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._backend_proxy_endpoint - - @backend_proxy_endpoint.setter - def backend_proxy_endpoint(self, backend_proxy_endpoint): - """Sets the backend_proxy_endpoint of this ShareRequest. - - - :param backend_proxy_endpoint: The backend_proxy_endpoint of this ShareRequest. # noqa: E501 - :type: str - """ - - self._backend_proxy_endpoint = backend_proxy_endpoint - - @property - def auth_scheme(self): - """Gets the auth_scheme of this ShareRequest. # noqa: E501 - - - :return: The auth_scheme of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._auth_scheme - - @auth_scheme.setter - def auth_scheme(self, auth_scheme): - """Sets the auth_scheme of this ShareRequest. - - - :param auth_scheme: The auth_scheme of this ShareRequest. # noqa: E501 - :type: str - """ - - self._auth_scheme = auth_scheme - - @property - def auth_users(self): - """Gets the auth_users of this ShareRequest. # noqa: E501 - - - :return: The auth_users of this ShareRequest. # noqa: E501 - :rtype: list[AuthUser] - """ - return self._auth_users - - @auth_users.setter - def auth_users(self, auth_users): - """Sets the auth_users of this ShareRequest. - - - :param auth_users: The auth_users of this ShareRequest. # noqa: E501 - :type: list[AuthUser] - """ - - self._auth_users = auth_users - - @property - def oauth_provider(self): - """Gets the oauth_provider of this ShareRequest. # noqa: E501 - - - :return: The oauth_provider of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._oauth_provider - - @oauth_provider.setter - def oauth_provider(self, oauth_provider): - """Sets the oauth_provider of this ShareRequest. - - - :param oauth_provider: The oauth_provider of this ShareRequest. # noqa: E501 - :type: str - """ - allowed_values = ["github", "google"] # noqa: E501 - if oauth_provider not in allowed_values: - raise ValueError( - "Invalid value for `oauth_provider` ({0}), must be one of {1}" # noqa: E501 - .format(oauth_provider, allowed_values) - ) - - self._oauth_provider = oauth_provider - - @property - def oauth_email_domains(self): - """Gets the oauth_email_domains of this ShareRequest. # noqa: E501 - - - :return: The oauth_email_domains of this ShareRequest. # noqa: E501 - :rtype: list[str] - """ - return self._oauth_email_domains - - @oauth_email_domains.setter - def oauth_email_domains(self, oauth_email_domains): - """Sets the oauth_email_domains of this ShareRequest. - - - :param oauth_email_domains: The oauth_email_domains of this ShareRequest. # noqa: E501 - :type: list[str] - """ - - self._oauth_email_domains = oauth_email_domains - - @property - def oauth_authorization_check_interval(self): - """Gets the oauth_authorization_check_interval of this ShareRequest. # noqa: E501 - - - :return: The oauth_authorization_check_interval of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._oauth_authorization_check_interval - - @oauth_authorization_check_interval.setter - def oauth_authorization_check_interval(self, oauth_authorization_check_interval): - """Sets the oauth_authorization_check_interval of this ShareRequest. - - - :param oauth_authorization_check_interval: The oauth_authorization_check_interval of this ShareRequest. # noqa: E501 - :type: str - """ - - self._oauth_authorization_check_interval = oauth_authorization_check_interval - - @property - def reserved(self): - """Gets the reserved of this ShareRequest. # noqa: E501 - - - :return: The reserved of this ShareRequest. # noqa: E501 - :rtype: bool - """ - return self._reserved - - @reserved.setter - def reserved(self, reserved): - """Sets the reserved of this ShareRequest. - - - :param reserved: The reserved of this ShareRequest. # noqa: E501 - :type: bool - """ - - self._reserved = reserved - - @property - def permission_mode(self): - """Gets the permission_mode of this ShareRequest. # noqa: E501 - - - :return: The permission_mode of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._permission_mode - - @permission_mode.setter - def permission_mode(self, permission_mode): - """Sets the permission_mode of this ShareRequest. - - - :param permission_mode: The permission_mode of this ShareRequest. # noqa: E501 - :type: str - """ - allowed_values = ["open", "closed"] # noqa: E501 - if permission_mode not in allowed_values: - raise ValueError( - "Invalid value for `permission_mode` ({0}), must be one of {1}" # noqa: E501 - .format(permission_mode, allowed_values) - ) - - self._permission_mode = permission_mode - - @property - def access_grants(self): - """Gets the access_grants of this ShareRequest. # noqa: E501 - - - :return: The access_grants of this ShareRequest. # noqa: E501 - :rtype: list[str] - """ - return self._access_grants - - @access_grants.setter - def access_grants(self, access_grants): - """Sets the access_grants of this ShareRequest. - - - :param access_grants: The access_grants of this ShareRequest. # noqa: E501 - :type: list[str] - """ - - self._access_grants = access_grants - - @property - def unique_name(self): - """Gets the unique_name of this ShareRequest. # noqa: E501 - - - :return: The unique_name of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._unique_name - - @unique_name.setter - def unique_name(self, unique_name): - """Sets the unique_name of this ShareRequest. - - - :param unique_name: The unique_name of this ShareRequest. # noqa: E501 - :type: str - """ - - self._unique_name = unique_name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ShareRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ShareRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_response.py b/sdk/python/sdk/zrok/zrok_api/models/share_response.py index dcb30e38..8fa25d60 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share_response.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share_response.py @@ -3,134 +3,87 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ShareResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ShareResponse(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_proxy_endpoints': 'list[str]', - 'share_token': 'str' - } + ShareResponse + """ # noqa: E501 + frontend_proxy_endpoints: Optional[List[StrictStr]] = Field(default=None, alias="frontendProxyEndpoints") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + __properties: ClassVar[List[str]] = ["frontendProxyEndpoints", "shareToken"] - attribute_map = { - 'frontend_proxy_endpoints': 'frontendProxyEndpoints', - 'share_token': 'shareToken' - } - - def __init__(self, frontend_proxy_endpoints=None, share_token=None): # noqa: E501 - """ShareResponse - a model defined in Swagger""" # noqa: E501 - self._frontend_proxy_endpoints = None - self._share_token = None - self.discriminator = None - if frontend_proxy_endpoints is not None: - self.frontend_proxy_endpoints = frontend_proxy_endpoints - if share_token is not None: - self.share_token = share_token - - @property - def frontend_proxy_endpoints(self): - """Gets the frontend_proxy_endpoints of this ShareResponse. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The frontend_proxy_endpoints of this ShareResponse. # noqa: E501 - :rtype: list[str] + 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 ShareResponse 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. """ - return self._frontend_proxy_endpoints + excluded_fields: Set[str] = set([ + ]) - @frontend_proxy_endpoints.setter - def frontend_proxy_endpoints(self, frontend_proxy_endpoints): - """Sets the frontend_proxy_endpoints of this ShareResponse. + _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 ShareResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendProxyEndpoints": obj.get("frontendProxyEndpoints"), + "shareToken": obj.get("shareToken") + }) + return _obj - :param frontend_proxy_endpoints: The frontend_proxy_endpoints of this ShareResponse. # noqa: E501 - :type: list[str] - """ - - self._frontend_proxy_endpoints = frontend_proxy_endpoints - - @property - def share_token(self): - """Gets the share_token of this ShareResponse. # noqa: E501 - - - :return: The share_token of this ShareResponse. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this ShareResponse. - - - :param share_token: The share_token of this ShareResponse. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ShareResponse, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ShareResponse): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/shares.py b/sdk/python/sdk/zrok/zrok_api/models/shares.py deleted file mode 100644 index c1ce3f4d..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/shares.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Shares(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Shares - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Shares, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Shares): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/spark_data.py b/sdk/python/sdk/zrok/zrok_api/models/spark_data.py deleted file mode 100644 index 9ed04dfe..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/spark_data.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class SparkData(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """SparkData - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(SparkData, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SparkData): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py b/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py index 52a1c1fd..23c4ef51 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py +++ b/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py @@ -3,134 +3,87 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class SparkDataSample(object): - """NOTE: This class is auto generated by the swagger code generator program. + The version of the OpenAPI document: 1.0.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 +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SparkDataSample(BaseModel): """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'rx': 'float', - 'tx': 'float' - } + SparkDataSample + """ # noqa: E501 + rx: Optional[Union[StrictFloat, StrictInt]] = None + tx: Optional[Union[StrictFloat, StrictInt]] = None + __properties: ClassVar[List[str]] = ["rx", "tx"] - attribute_map = { - 'rx': 'rx', - 'tx': 'tx' - } - - def __init__(self, rx=None, tx=None): # noqa: E501 - """SparkDataSample - a model defined in Swagger""" # noqa: E501 - self._rx = None - self._tx = None - self.discriminator = None - if rx is not None: - self.rx = rx - if tx is not None: - self.tx = tx - - @property - def rx(self): - """Gets the rx of this SparkDataSample. # noqa: E501 + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) - :return: The rx of this SparkDataSample. # noqa: E501 - :rtype: float + 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 SparkDataSample 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. """ - return self._rx + excluded_fields: Set[str] = set([ + ]) - @rx.setter - def rx(self, rx): - """Sets the rx of this SparkDataSample. + _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 SparkDataSample from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rx": obj.get("rx"), + "tx": obj.get("tx") + }) + return _obj - :param rx: The rx of this SparkDataSample. # noqa: E501 - :type: float - """ - - self._rx = rx - - @property - def tx(self): - """Gets the tx of this SparkDataSample. # noqa: E501 - - - :return: The tx of this SparkDataSample. # noqa: E501 - :rtype: float - """ - return self._tx - - @tx.setter - def tx(self, tx): - """Sets the tx of this SparkDataSample. - - - :param tx: The tx of this SparkDataSample. # noqa: E501 - :type: float - """ - - self._tx = tx - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(SparkDataSample, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SparkDataSample): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py b/sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py deleted file mode 100644 index fd84ff20..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class SparklinesBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'account': 'bool', - 'environments': 'list[str]', - 'shares': 'list[str]' - } - - attribute_map = { - 'account': 'account', - 'environments': 'environments', - 'shares': 'shares' - } - - def __init__(self, account=None, environments=None, shares=None): # noqa: E501 - """SparklinesBody - a model defined in Swagger""" # noqa: E501 - self._account = None - self._environments = None - self._shares = None - self.discriminator = None - if account is not None: - self.account = account - if environments is not None: - self.environments = environments - if shares is not None: - self.shares = shares - - @property - def account(self): - """Gets the account of this SparklinesBody. # noqa: E501 - - - :return: The account of this SparklinesBody. # noqa: E501 - :rtype: bool - """ - return self._account - - @account.setter - def account(self, account): - """Sets the account of this SparklinesBody. - - - :param account: The account of this SparklinesBody. # noqa: E501 - :type: bool - """ - - self._account = account - - @property - def environments(self): - """Gets the environments of this SparklinesBody. # noqa: E501 - - - :return: The environments of this SparklinesBody. # noqa: E501 - :rtype: list[str] - """ - return self._environments - - @environments.setter - def environments(self, environments): - """Sets the environments of this SparklinesBody. - - - :param environments: The environments of this SparklinesBody. # noqa: E501 - :type: list[str] - """ - - self._environments = environments - - @property - def shares(self): - """Gets the shares of this SparklinesBody. # noqa: E501 - - - :return: The shares of this SparklinesBody. # noqa: E501 - :rtype: list[str] - """ - return self._shares - - @shares.setter - def shares(self, shares): - """Sets the shares of this SparklinesBody. - - - :param shares: The shares of this SparklinesBody. # noqa: E501 - :type: list[str] - """ - - self._shares = shares - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(SparklinesBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SparklinesBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py b/sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py deleted file mode 100644 index 0aaa2468..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TokenGenerateBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'invite_tokens': 'list[str]' - } - - attribute_map = { - 'invite_tokens': 'inviteTokens' - } - - def __init__(self, invite_tokens=None): # noqa: E501 - """TokenGenerateBody - a model defined in Swagger""" # noqa: E501 - self._invite_tokens = None - self.discriminator = None - if invite_tokens is not None: - self.invite_tokens = invite_tokens - - @property - def invite_tokens(self): - """Gets the invite_tokens of this TokenGenerateBody. # noqa: E501 - - - :return: The invite_tokens of this TokenGenerateBody. # noqa: E501 - :rtype: list[str] - """ - return self._invite_tokens - - @invite_tokens.setter - def invite_tokens(self, invite_tokens): - """Sets the invite_tokens of this TokenGenerateBody. - - - :param invite_tokens: The invite_tokens of this TokenGenerateBody. # noqa: E501 - :type: list[str] - """ - - self._invite_tokens = invite_tokens - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(TokenGenerateBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TokenGenerateBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py b/sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py deleted file mode 100644 index 77321334..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnaccessBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'env_zid': 'str', - 'share_token': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'env_zid': 'envZId', - 'share_token': 'shareToken' - } - - def __init__(self, frontend_token=None, env_zid=None, share_token=None): # noqa: E501 - """UnaccessBody - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._env_zid = None - self._share_token = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if env_zid is not None: - self.env_zid = env_zid - if share_token is not None: - self.share_token = share_token - - @property - def frontend_token(self): - """Gets the frontend_token of this UnaccessBody. # noqa: E501 - - - :return: The frontend_token of this UnaccessBody. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this UnaccessBody. - - - :param frontend_token: The frontend_token of this UnaccessBody. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def env_zid(self): - """Gets the env_zid of this UnaccessBody. # noqa: E501 - - - :return: The env_zid of this UnaccessBody. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this UnaccessBody. - - - :param env_zid: The env_zid of this UnaccessBody. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def share_token(self): - """Gets the share_token of this UnaccessBody. # noqa: E501 - - - :return: The share_token of this UnaccessBody. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this UnaccessBody. - - - :param share_token: The share_token of this UnaccessBody. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UnaccessBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnaccessBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py b/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py new file mode 100644 index 00000000..19a3f5df --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UnaccessRequest(BaseModel): + """ + UnaccessRequest + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + __properties: ClassVar[List[str]] = ["frontendToken", "envZId", "shareToken"] + + 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 UnaccessRequest 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 UnaccessRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "envZId": obj.get("envZId"), + "shareToken": obj.get("shareToken") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/unshare_body.py b/sdk/python/sdk/zrok/zrok_api/models/unshare_body.py deleted file mode 100644 index e6463475..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/unshare_body.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnshareBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'env_zid': 'str', - 'share_token': 'str', - 'reserved': 'bool' - } - - attribute_map = { - 'env_zid': 'envZId', - 'share_token': 'shareToken', - 'reserved': 'reserved' - } - - def __init__(self, env_zid=None, share_token=None, reserved=None): # noqa: E501 - """UnshareBody - a model defined in Swagger""" # noqa: E501 - self._env_zid = None - self._share_token = None - self._reserved = None - self.discriminator = None - if env_zid is not None: - self.env_zid = env_zid - if share_token is not None: - self.share_token = share_token - if reserved is not None: - self.reserved = reserved - - @property - def env_zid(self): - """Gets the env_zid of this UnshareBody. # noqa: E501 - - - :return: The env_zid of this UnshareBody. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this UnshareBody. - - - :param env_zid: The env_zid of this UnshareBody. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def share_token(self): - """Gets the share_token of this UnshareBody. # noqa: E501 - - - :return: The share_token of this UnshareBody. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this UnshareBody. - - - :param share_token: The share_token of this UnshareBody. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def reserved(self): - """Gets the reserved of this UnshareBody. # noqa: E501 - - - :return: The reserved of this UnshareBody. # noqa: E501 - :rtype: bool - """ - return self._reserved - - @reserved.setter - def reserved(self, reserved): - """Sets the reserved of this UnshareBody. - - - :param reserved: The reserved of this UnshareBody. # noqa: E501 - :type: bool - """ - - self._reserved = reserved - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UnshareBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnshareBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py b/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py new file mode 100644 index 00000000..3ff557e1 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class UnshareRequest(BaseModel): + """ + UnshareRequest + """ # noqa: E501 + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + reserved: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["envZId", "shareToken", "reserved"] + + 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 UnshareRequest 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 UnshareRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "envZId": obj.get("envZId"), + "shareToken": obj.get("shareToken"), + "reserved": obj.get("reserved") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_access_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_access_request.py new file mode 100644 index 00000000..a27f9623 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/update_access_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateAccessRequest(BaseModel): + """ + UpdateAccessRequest + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["frontendToken", "bindAddress", "description"] + + 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 UpdateAccessRequest 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 UpdateAccessRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "bindAddress": obj.get("bindAddress"), + "description": obj.get("description") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py new file mode 100644 index 00000000..52916296 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateFrontendRequest(BaseModel): + """ + UpdateFrontendRequest + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + public_name: Optional[StrictStr] = Field(default=None, alias="publicName") + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + __properties: ClassVar[List[str]] = ["frontendToken", "publicName", "urlTemplate"] + + 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 UpdateFrontendRequest 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 UpdateFrontendRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "publicName": obj.get("publicName"), + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py new file mode 100644 index 00000000..9e3de749 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateShareRequest(BaseModel): + """ + UpdateShareRequest + """ # noqa: E501 + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") + add_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="addAccessGrants") + remove_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="removeAccessGrants") + __properties: ClassVar[List[str]] = ["shareToken", "backendProxyEndpoint", "addAccessGrants", "removeAccessGrants"] + + 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 UpdateShareRequest 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 UpdateShareRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "shareToken": obj.get("shareToken"), + "backendProxyEndpoint": obj.get("backendProxyEndpoint"), + "addAccessGrants": obj.get("addAccessGrants"), + "removeAccessGrants": obj.get("removeAccessGrants") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify200_response.py b/sdk/python/sdk/zrok/zrok_api/models/verify200_response.py new file mode 100644 index 00000000..4709d646 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/verify200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 Verify200Response(BaseModel): + """ + Verify200Response + """ # noqa: E501 + email: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["email"] + + 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 Verify200Response 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 Verify200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify_body.py b/sdk/python/sdk/zrok/zrok_api/models/verify_body.py deleted file mode 100644 index 26acf208..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/verify_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class VerifyBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'register_token': 'str' - } - - attribute_map = { - 'register_token': 'registerToken' - } - - def __init__(self, register_token=None): # noqa: E501 - """VerifyBody - a model defined in Swagger""" # noqa: E501 - self._register_token = None - self.discriminator = None - if register_token is not None: - self.register_token = register_token - - @property - def register_token(self): - """Gets the register_token of this VerifyBody. # noqa: E501 - - - :return: The register_token of this VerifyBody. # noqa: E501 - :rtype: str - """ - return self._register_token - - @register_token.setter - def register_token(self, register_token): - """Sets the register_token of this VerifyBody. - - - :param register_token: The register_token of this VerifyBody. # noqa: E501 - :type: str - """ - - self._register_token = register_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(VerifyBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, VerifyBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify_request.py b/sdk/python/sdk/zrok/zrok_api/models/verify_request.py new file mode 100644 index 00000000..76def799 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/verify_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VerifyRequest(BaseModel): + """ + VerifyRequest + """ # noqa: E501 + register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") + __properties: ClassVar[List[str]] = ["registerToken"] + + 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 VerifyRequest 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 VerifyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "registerToken": obj.get("registerToken") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/models/version.py b/sdk/python/sdk/zrok/zrok_api/models/version.py deleted file mode 100644 index 98e90760..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/version.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Version(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Version - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Version, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Version): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/version_inventory200_response.py b/sdk/python/sdk/zrok/zrok_api/models/version_inventory200_response.py new file mode 100644 index 00000000..8cbf4288 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/version_inventory200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VersionInventory200Response(BaseModel): + """ + VersionInventory200Response + """ # noqa: E501 + controller_version: Optional[StrictStr] = Field(default=None, alias="controllerVersion") + __properties: ClassVar[List[str]] = ["controllerVersion"] + + 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 VersionInventory200Response 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 VersionInventory200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "controllerVersion": obj.get("controllerVersion") + }) + return _obj + + diff --git a/sdk/python/sdk/zrok/zrok_api/py.typed b/sdk/python/sdk/zrok/zrok_api/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/sdk/python/sdk/zrok/zrok_api/rest.py b/sdk/python/sdk/zrok/zrok_api/rest.py index a2c54065..1d80eeba 100644 --- a/sdk/python/sdk/zrok/zrok_api/rest.py +++ b/sdk/python/sdk/zrok/zrok_api/rest.py @@ -3,59 +3,66 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import io import json -import logging import re import ssl -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode +import urllib3 -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') +from zrok_api.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse -logger = logging.getLogger(__name__) +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES class RESTResponse(io.IOBase): - def __init__(self, resp): - self.urllib3_response = resp + def __init__(self, resp) -> None: + self.response = resp self.status = resp.status self.reason = resp.reason - self.data = resp.data + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.response.headers.get(name, default) -class RESTClientObject(object): +class RESTClientObject: - def __init__(self, configuration, pools_size=4, maxsize=None): + def __init__(self, configuration) -> None: # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 # cert_reqs @@ -64,73 +71,82 @@ class RESTClientObject(object): else: cert_reqs = ssl.CERT_NONE - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) + self.pool_manager: urllib3.PoolManager - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): """Perform requests. :param method: http request method :param url: http request url - :param query_params: query parameters in the url :param headers: http request headers :param body: request json body, for `application/json` :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. """ method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] if post_params and body: - raise ValueError( + raise ApiValueError( "body parameter cannot be used with post_params parameter." ) @@ -139,60 +155,83 @@ class RESTClientObject(object): timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' + connect=_request_timeout[0], + read=_request_timeout[1] + ) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( - method, url, + method, + url, body=request_body, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=False, - preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=True, - preload_content=_preload_content, timeout=timeout, - headers=headers) + headers=headers, + preload_content=False + ) # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): r = self.pool_manager.request( - method, url, + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, body=request_body, - preload_content=_preload_content, + preload_content=False, timeout=timeout, headers=headers) else: @@ -203,115 +242,16 @@ class RESTClientObject(object): raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) + msg = "\n".join([type(e).__name__, str(e)]) raise ApiException(status=0, reason=msg) - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message + return RESTResponse(r) From 27f84a2f9e24a37537b2e9f973dd0a49347d42f0 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Mon, 3 Mar 2025 18:07:05 -0500 Subject: [PATCH 14/56] regen py client each time --- bin/generate_rest.sh | 23 +++++++++++++++++++---- bin/python_config.json | 10 ---------- 2 files changed, 19 insertions(+), 14 deletions(-) delete mode 100644 bin/python_config.json diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index b0a7d925..2905f058 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -29,10 +29,14 @@ zrokDir=$(realpath "$scriptDir/..") zrokSpec=$(realpath "$zrokDir/specs/zrok.yml") -pythonConfig=$(realpath "$zrokDir/bin/python_config.json") - echo "...clean generate zrok server/client" -rm -rf rest_* +for GEN in \ + ./rest_client_zrok/ \ + ./rest_model_zrok/ \ + ./rest_server_zrok/ +do + [[ -d $GEN ]] && rm -rf "$GEN" +done echo "...generating zrok server" swagger generate server -P rest_model_zrok.Principal -f "$zrokSpec" -s rest_server_zrok -t "$zrokDir" -m "rest_model_zrok" --exclude-main @@ -53,6 +57,17 @@ rm -rf sdk/nodejs/sdk/src/api openapi-generator-cli generate -i specs/zrok.yml -o sdk/nodejs/sdk/src/api -g typescript-fetch echo "...generating python sdk client" -openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/sdk/zrok -c $pythonConfig -g python +# Clean up existing files listed in .openapi-generator/FILES before regeneration +if [ -f sdk/python/sdk/zrok/.openapi-generator/FILES ]; then + while IFS= read -r file; do + if [ -f "sdk/python/sdk/zrok/$file" ]; then + echo "Removing existing file: sdk/python/sdk/zrok/$file" + rm "sdk/python/sdk/zrok/$file" + fi + done < sdk/python/sdk/zrok/.openapi-generator/FILES +fi +# Then remove the tracking file itself +rm -f sdk/python/sdk/zrok/.openapi-generator/FILES +openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/sdk/zrok --package-name zrok_api -g python git checkout rest_server_zrok/configure_zrok.go diff --git a/bin/python_config.json b/bin/python_config.json deleted file mode 100644 index 83420c09..00000000 --- a/bin/python_config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "packageName": "zrok_api", - "projectName": "zrok_sdk", - "additionalProperties": { - "jsonMimeTypes": [ - "application/json", - "application/zrok.v1+json" - ] - } -} \ No newline at end of file From 1041c66af9b067100c0bba101e66d24414954d5b Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Mon, 3 Mar 2025 18:08:48 -0500 Subject: [PATCH 15/56] regen py with openapi-generator --- sdk/python/sdk/zrok/.openapi-generator/FILES | 56 +++++++++++++ sdk/python/sdk/zrok/README.md | 2 +- sdk/python/sdk/zrok/docs/AccessBody.md | 12 --- sdk/python/sdk/zrok/docs/AccessBody1.md | 11 --- sdk/python/sdk/zrok/docs/AccountBody.md | 10 --- .../sdk/zrok/docs/ChangePasswordBody.md | 11 --- .../sdk/zrok/docs/ClientVersionCheckBody.md | 9 -- sdk/python/sdk/zrok/docs/DisableBody.md | 9 -- sdk/python/sdk/zrok/docs/EnableBody.md | 10 --- sdk/python/sdk/zrok/docs/Environments.md | 8 -- sdk/python/sdk/zrok/docs/ErrorMessage.md | 8 -- sdk/python/sdk/zrok/docs/FrontendBody.md | 12 --- sdk/python/sdk/zrok/docs/FrontendBody1.md | 9 -- sdk/python/sdk/zrok/docs/FrontendBody2.md | 11 --- sdk/python/sdk/zrok/docs/Frontends.md | 8 -- sdk/python/sdk/zrok/docs/GrantsBody.md | 9 -- sdk/python/sdk/zrok/docs/IdentityBody.md | 9 -- sdk/python/sdk/zrok/docs/InlineResponse200.md | 9 -- .../sdk/zrok/docs/InlineResponse2001.md | 9 -- .../sdk/zrok/docs/InlineResponse2002.md | 14 ---- .../sdk/zrok/docs/InlineResponse2003.md | 9 -- .../zrok/docs/InlineResponse2003Members.md | 10 --- .../sdk/zrok/docs/InlineResponse2004.md | 9 -- .../zrok/docs/InlineResponse2004Members.md | 10 --- .../docs/InlineResponse2004Organizations.md | 10 --- .../sdk/zrok/docs/InlineResponse2005.md | 9 -- .../docs/InlineResponse2005Memberships.md | 11 --- .../docs/InlineResponse2005Organizations.md | 10 --- .../sdk/zrok/docs/InlineResponse2006.md | 9 -- .../docs/InlineResponse2006Memberships.md | 11 --- .../sdk/zrok/docs/InlineResponse2007.md | 9 -- sdk/python/sdk/zrok/docs/InlineResponse201.md | 9 -- .../sdk/zrok/docs/InlineResponse2011.md | 10 --- .../sdk/zrok/docs/InlineResponse2012.md | 9 -- .../sdk/zrok/docs/InlineResponse2013.md | 10 --- sdk/python/sdk/zrok/docs/InlineResponse400.md | 9 -- sdk/python/sdk/zrok/docs/InviteBody.md | 10 --- sdk/python/sdk/zrok/docs/LoginBody.md | 10 --- .../sdk/zrok/docs/OrganizationAddBody.md | 11 --- sdk/python/sdk/zrok/docs/OrganizationBody.md | 9 -- sdk/python/sdk/zrok/docs/OrganizationBody1.md | 9 -- .../sdk/zrok/docs/OrganizationListBody.md | 9 -- .../sdk/zrok/docs/OrganizationRemoveBody.md | 10 --- .../zrok/docs/RegenerateAccountTokenBody.md | 9 -- .../sdk/zrok/docs/RegenerateTokenBody.md | 9 -- sdk/python/sdk/zrok/docs/RegisterBody.md | 10 --- sdk/python/sdk/zrok/docs/ResetPasswordBody.md | 10 --- .../sdk/zrok/docs/ResetPasswordRequestBody.md | 9 -- sdk/python/sdk/zrok/docs/ShareBody.md | 12 --- sdk/python/sdk/zrok/docs/Shares.md | 8 -- sdk/python/sdk/zrok/docs/SparkData.md | 8 -- sdk/python/sdk/zrok/docs/SparklinesBody.md | 11 --- sdk/python/sdk/zrok/docs/TokenGenerateBody.md | 9 -- sdk/python/sdk/zrok/docs/UnaccessBody.md | 11 --- sdk/python/sdk/zrok/docs/UnshareBody.md | 11 --- sdk/python/sdk/zrok/docs/VerifyBody.md | 9 -- sdk/python/sdk/zrok/docs/Version.md | 8 -- sdk/python/sdk/zrok/docs/VersionBody.md | 9 -- sdk/python/sdk/zrok/docs/VersionCheckBody.md | 9 -- sdk/python/sdk/zrok/test/test_access_body.py | 39 --------- sdk/python/sdk/zrok/test/test_access_body1.py | 39 --------- sdk/python/sdk/zrok/test/test_account_api.py | 40 +++++---- sdk/python/sdk/zrok/test/test_account_body.py | 39 --------- sdk/python/sdk/zrok/test/test_admin_api.py | 50 ++++++----- sdk/python/sdk/zrok/test/test_auth_user.py | 41 +++++---- .../zrok/test/test_change_password_body.py | 39 --------- .../test/test_client_version_check_body.py | 39 --------- .../sdk/zrok/test/test_configuration.py | 44 ++++++---- sdk/python/sdk/zrok/test/test_disable_body.py | 39 --------- sdk/python/sdk/zrok/test/test_enable_body.py | 39 --------- sdk/python/sdk/zrok/test/test_environment.py | 51 ++++++++---- .../test/test_environment_and_resources.py | 83 +++++++++++++++---- .../sdk/zrok/test/test_environment_api.py | 26 +++--- sdk/python/sdk/zrok/test/test_environments.py | 39 --------- .../sdk/zrok/test/test_error_message.py | 39 --------- sdk/python/sdk/zrok/test/test_frontend.py | 48 +++++++---- .../sdk/zrok/test/test_frontend_body.py | 39 --------- .../sdk/zrok/test/test_frontend_body1.py | 39 --------- .../sdk/zrok/test/test_frontend_body2.py | 39 --------- sdk/python/sdk/zrok/test/test_frontends.py | 39 --------- sdk/python/sdk/zrok/test/test_grants_body.py | 39 --------- .../sdk/zrok/test/test_identity_body.py | 39 --------- .../sdk/zrok/test/test_inline_response200.py | 39 --------- .../sdk/zrok/test/test_inline_response2001.py | 39 --------- .../sdk/zrok/test/test_inline_response2002.py | 39 --------- .../sdk/zrok/test/test_inline_response2003.py | 39 --------- .../test/test_inline_response2003_members.py | 39 --------- .../sdk/zrok/test/test_inline_response2004.py | 39 --------- .../test/test_inline_response2004_members.py | 39 --------- .../test_inline_response2004_organizations.py | 39 --------- .../sdk/zrok/test/test_inline_response2005.py | 39 --------- .../test_inline_response2005_memberships.py | 39 --------- .../test_inline_response2005_organizations.py | 39 --------- .../sdk/zrok/test/test_inline_response2006.py | 39 --------- .../test_inline_response2006_memberships.py | 39 --------- .../sdk/zrok/test/test_inline_response2007.py | 39 --------- .../sdk/zrok/test/test_inline_response201.py | 39 --------- .../sdk/zrok/test/test_inline_response2011.py | 39 --------- .../sdk/zrok/test/test_inline_response2012.py | 39 --------- .../sdk/zrok/test/test_inline_response2013.py | 39 --------- .../sdk/zrok/test/test_inline_response400.py | 39 --------- sdk/python/sdk/zrok/test/test_invite_body.py | 39 --------- sdk/python/sdk/zrok/test/test_login_body.py | 39 --------- sdk/python/sdk/zrok/test/test_metadata_api.py | 62 ++++++++------ sdk/python/sdk/zrok/test/test_metrics.py | 48 +++++++---- .../sdk/zrok/test/test_metrics_sample.py | 42 ++++++---- .../zrok/test/test_organization_add_body.py | 39 --------- .../sdk/zrok/test/test_organization_body.py | 39 --------- .../sdk/zrok/test/test_organization_body1.py | 39 --------- .../zrok/test/test_organization_list_body.py | 39 --------- .../test/test_organization_remove_body.py | 39 --------- sdk/python/sdk/zrok/test/test_overview.py | 82 ++++++++++++++---- sdk/python/sdk/zrok/test/test_principal.py | 44 ++++++---- .../test_regenerate_account_token_body.py | 39 --------- .../zrok/test/test_regenerate_token_body.py | 39 --------- .../sdk/zrok/test/test_register_body.py | 39 --------- .../sdk/zrok/test/test_reset_password_body.py | 39 --------- .../test/test_reset_password_request_body.py | 39 --------- sdk/python/sdk/zrok/test/test_share.py | 55 ++++++++---- sdk/python/sdk/zrok/test/test_share_api.py | 38 +++++---- sdk/python/sdk/zrok/test/test_share_body.py | 39 --------- .../sdk/zrok/test/test_share_request.py | 63 ++++++++++---- .../sdk/zrok/test/test_share_response.py | 43 ++++++---- sdk/python/sdk/zrok/test/test_shares.py | 39 --------- sdk/python/sdk/zrok/test/test_spark_data.py | 39 --------- .../sdk/zrok/test/test_spark_data_sample.py | 41 +++++---- .../sdk/zrok/test/test_sparklines_body.py | 39 --------- .../sdk/zrok/test/test_token_generate_body.py | 39 --------- .../sdk/zrok/test/test_unaccess_body.py | 39 --------- sdk/python/sdk/zrok/test/test_unshare_body.py | 39 --------- sdk/python/sdk/zrok/test/test_verify_body.py | 39 --------- sdk/python/sdk/zrok/test/test_version.py | 39 --------- sdk/python/sdk/zrok/test/test_version_body.py | 39 --------- .../sdk/zrok/test/test_version_check_body.py | 39 --------- 134 files changed, 672 insertions(+), 3062 deletions(-) delete mode 100644 sdk/python/sdk/zrok/docs/AccessBody.md delete mode 100644 sdk/python/sdk/zrok/docs/AccessBody1.md delete mode 100644 sdk/python/sdk/zrok/docs/AccountBody.md delete mode 100644 sdk/python/sdk/zrok/docs/ChangePasswordBody.md delete mode 100644 sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md delete mode 100644 sdk/python/sdk/zrok/docs/DisableBody.md delete mode 100644 sdk/python/sdk/zrok/docs/EnableBody.md delete mode 100644 sdk/python/sdk/zrok/docs/Environments.md delete mode 100644 sdk/python/sdk/zrok/docs/ErrorMessage.md delete mode 100644 sdk/python/sdk/zrok/docs/FrontendBody.md delete mode 100644 sdk/python/sdk/zrok/docs/FrontendBody1.md delete mode 100644 sdk/python/sdk/zrok/docs/FrontendBody2.md delete mode 100644 sdk/python/sdk/zrok/docs/Frontends.md delete mode 100644 sdk/python/sdk/zrok/docs/GrantsBody.md delete mode 100644 sdk/python/sdk/zrok/docs/IdentityBody.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse200.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2001.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2002.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2003.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2003Members.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2004.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2004Members.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2005.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2006.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2007.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse201.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2011.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2012.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse2013.md delete mode 100644 sdk/python/sdk/zrok/docs/InlineResponse400.md delete mode 100644 sdk/python/sdk/zrok/docs/InviteBody.md delete mode 100644 sdk/python/sdk/zrok/docs/LoginBody.md delete mode 100644 sdk/python/sdk/zrok/docs/OrganizationAddBody.md delete mode 100644 sdk/python/sdk/zrok/docs/OrganizationBody.md delete mode 100644 sdk/python/sdk/zrok/docs/OrganizationBody1.md delete mode 100644 sdk/python/sdk/zrok/docs/OrganizationListBody.md delete mode 100644 sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md delete mode 100644 sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md delete mode 100644 sdk/python/sdk/zrok/docs/RegenerateTokenBody.md delete mode 100644 sdk/python/sdk/zrok/docs/RegisterBody.md delete mode 100644 sdk/python/sdk/zrok/docs/ResetPasswordBody.md delete mode 100644 sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md delete mode 100644 sdk/python/sdk/zrok/docs/ShareBody.md delete mode 100644 sdk/python/sdk/zrok/docs/Shares.md delete mode 100644 sdk/python/sdk/zrok/docs/SparkData.md delete mode 100644 sdk/python/sdk/zrok/docs/SparklinesBody.md delete mode 100644 sdk/python/sdk/zrok/docs/TokenGenerateBody.md delete mode 100644 sdk/python/sdk/zrok/docs/UnaccessBody.md delete mode 100644 sdk/python/sdk/zrok/docs/UnshareBody.md delete mode 100644 sdk/python/sdk/zrok/docs/VerifyBody.md delete mode 100644 sdk/python/sdk/zrok/docs/Version.md delete mode 100644 sdk/python/sdk/zrok/docs/VersionBody.md delete mode 100644 sdk/python/sdk/zrok/docs/VersionCheckBody.md delete mode 100644 sdk/python/sdk/zrok/test/test_access_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_access_body1.py delete mode 100644 sdk/python/sdk/zrok/test/test_account_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_change_password_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_client_version_check_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_disable_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_enable_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_environments.py delete mode 100644 sdk/python/sdk/zrok/test/test_error_message.py delete mode 100644 sdk/python/sdk/zrok/test/test_frontend_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_frontend_body1.py delete mode 100644 sdk/python/sdk/zrok/test/test_frontend_body2.py delete mode 100644 sdk/python/sdk/zrok/test/test_frontends.py delete mode 100644 sdk/python/sdk/zrok/test/test_grants_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_identity_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response200.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2001.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2002.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2003.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2003_members.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2004.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2004_members.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2005.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2006.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2007.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response201.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2011.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2012.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response2013.py delete mode 100644 sdk/python/sdk/zrok/test/test_inline_response400.py delete mode 100644 sdk/python/sdk/zrok/test/test_invite_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_login_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_organization_add_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_organization_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_organization_body1.py delete mode 100644 sdk/python/sdk/zrok/test/test_organization_list_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_organization_remove_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_regenerate_token_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_register_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_reset_password_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_reset_password_request_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_share_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_shares.py delete mode 100644 sdk/python/sdk/zrok/test/test_spark_data.py delete mode 100644 sdk/python/sdk/zrok/test/test_sparklines_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_token_generate_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_unaccess_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_unshare_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_verify_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_version.py delete mode 100644 sdk/python/sdk/zrok/test/test_version_body.py delete mode 100644 sdk/python/sdk/zrok/test/test_version_check_body.py diff --git a/sdk/python/sdk/zrok/.openapi-generator/FILES b/sdk/python/sdk/zrok/.openapi-generator/FILES index 1b02d80f..6d1e98d7 100644 --- a/sdk/python/sdk/zrok/.openapi-generator/FILES +++ b/sdk/python/sdk/zrok/.openapi-generator/FILES @@ -58,6 +58,62 @@ docs/VerifyRequest.md docs/VersionInventory200Response.md requirements.txt test/__init__.py +test/test_access201_response.py +test/test_access_request.py +test/test_account_api.py +test/test_add_organization_member_request.py +test/test_admin_api.py +test/test_auth_user.py +test/test_change_password_request.py +test/test_client_version_check_request.py +test/test_configuration.py +test/test_create_frontend201_response.py +test/test_create_frontend_request.py +test/test_create_identity201_response.py +test/test_create_identity_request.py +test/test_create_organization201_response.py +test/test_create_organization_request.py +test/test_disable_request.py +test/test_enable_request.py +test/test_environment.py +test/test_environment_and_resources.py +test/test_environment_api.py +test/test_frontend.py +test/test_get_sparklines200_response.py +test/test_get_sparklines_request.py +test/test_invite_request.py +test/test_invite_token_generate_request.py +test/test_list_frontends200_response_inner.py +test/test_list_memberships200_response.py +test/test_list_memberships200_response_memberships_inner.py +test/test_list_organization_members200_response.py +test/test_list_organization_members200_response_members_inner.py +test/test_list_organizations200_response.py +test/test_list_organizations200_response_organizations_inner.py +test/test_login_request.py +test/test_metadata_api.py +test/test_metrics.py +test/test_metrics_sample.py +test/test_overview.py +test/test_principal.py +test/test_regenerate_account_token200_response.py +test/test_regenerate_account_token_request.py +test/test_register_request.py +test/test_remove_organization_member_request.py +test/test_reset_password_request.py +test/test_share.py +test/test_share_api.py +test/test_share_request.py +test/test_share_response.py +test/test_spark_data_sample.py +test/test_unaccess_request.py +test/test_unshare_request.py +test/test_update_access_request.py +test/test_update_frontend_request.py +test/test_update_share_request.py +test/test_verify200_response.py +test/test_verify_request.py +test/test_version_inventory200_response.py zrok_api/__init__.py zrok_api/api/__init__.py zrok_api/api/account_api.py diff --git a/sdk/python/sdk/zrok/README.md b/sdk/python/sdk/zrok/README.md index b337c9e0..7aa7d41a 100644 --- a/sdk/python/sdk/zrok/README.md +++ b/sdk/python/sdk/zrok/README.md @@ -1,4 +1,4 @@ -# zrok_sdk +# zrok-api zrok client access This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/sdk/python/sdk/zrok/docs/AccessBody.md b/sdk/python/sdk/zrok/docs/AccessBody.md deleted file mode 100644 index 86e3636b..00000000 --- a/sdk/python/sdk/zrok/docs/AccessBody.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccessBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AccessBody1.md b/sdk/python/sdk/zrok/docs/AccessBody1.md deleted file mode 100644 index 68968950..00000000 --- a/sdk/python/sdk/zrok/docs/AccessBody1.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccessBody1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AccountBody.md b/sdk/python/sdk/zrok/docs/AccountBody.md deleted file mode 100644 index 076efa50..00000000 --- a/sdk/python/sdk/zrok/docs/AccountBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# AccountBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ChangePasswordBody.md b/sdk/python/sdk/zrok/docs/ChangePasswordBody.md deleted file mode 100644 index 1137de72..00000000 --- a/sdk/python/sdk/zrok/docs/ChangePasswordBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChangePasswordBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**old_password** | **str** | | [optional] -**new_password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md b/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md deleted file mode 100644 index 4a36f24e..00000000 --- a/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClientVersionCheckBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/DisableBody.md b/sdk/python/sdk/zrok/docs/DisableBody.md deleted file mode 100644 index f6ee65f2..00000000 --- a/sdk/python/sdk/zrok/docs/DisableBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# DisableBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/EnableBody.md b/sdk/python/sdk/zrok/docs/EnableBody.md deleted file mode 100644 index 7ba7d7b3..00000000 --- a/sdk/python/sdk/zrok/docs/EnableBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# EnableBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**host** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Environments.md b/sdk/python/sdk/zrok/docs/Environments.md deleted file mode 100644 index 5cdc8b26..00000000 --- a/sdk/python/sdk/zrok/docs/Environments.md +++ /dev/null @@ -1,8 +0,0 @@ -# Environments - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ErrorMessage.md b/sdk/python/sdk/zrok/docs/ErrorMessage.md deleted file mode 100644 index 25d74334..00000000 --- a/sdk/python/sdk/zrok/docs/ErrorMessage.md +++ /dev/null @@ -1,8 +0,0 @@ -# ErrorMessage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/FrontendBody.md b/sdk/python/sdk/zrok/docs/FrontendBody.md deleted file mode 100644 index 5d0a3e37..00000000 --- a/sdk/python/sdk/zrok/docs/FrontendBody.md +++ /dev/null @@ -1,12 +0,0 @@ -# FrontendBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**permission_mode** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/FrontendBody1.md b/sdk/python/sdk/zrok/docs/FrontendBody1.md deleted file mode 100644 index 7bcd3be5..00000000 --- a/sdk/python/sdk/zrok/docs/FrontendBody1.md +++ /dev/null @@ -1,9 +0,0 @@ -# FrontendBody1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/FrontendBody2.md b/sdk/python/sdk/zrok/docs/FrontendBody2.md deleted file mode 100644 index e459d152..00000000 --- a/sdk/python/sdk/zrok/docs/FrontendBody2.md +++ /dev/null @@ -1,11 +0,0 @@ -# FrontendBody2 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**public_name** | **str** | | [optional] -**url_template** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Frontends.md b/sdk/python/sdk/zrok/docs/Frontends.md deleted file mode 100644 index c308436b..00000000 --- a/sdk/python/sdk/zrok/docs/Frontends.md +++ /dev/null @@ -1,8 +0,0 @@ -# Frontends - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/GrantsBody.md b/sdk/python/sdk/zrok/docs/GrantsBody.md deleted file mode 100644 index 1e744a53..00000000 --- a/sdk/python/sdk/zrok/docs/GrantsBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# GrantsBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/IdentityBody.md b/sdk/python/sdk/zrok/docs/IdentityBody.md deleted file mode 100644 index 39125ca5..00000000 --- a/sdk/python/sdk/zrok/docs/IdentityBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# IdentityBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse200.md b/sdk/python/sdk/zrok/docs/InlineResponse200.md deleted file mode 100644 index cc5f9b8b..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse200.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse200 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2001.md b/sdk/python/sdk/zrok/docs/InlineResponse2001.md deleted file mode 100644 index 820bf042..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2001.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2001 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2002.md b/sdk/python/sdk/zrok/docs/InlineResponse2002.md deleted file mode 100644 index d50b57e3..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2002.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineResponse2002 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2003.md b/sdk/python/sdk/zrok/docs/InlineResponse2003.md deleted file mode 100644 index 39488d9e..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2003.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2003 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**members** | [**list[InlineResponse2003Members]**](InlineResponse2003Members.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md b/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md deleted file mode 100644 index ddc3c4dd..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2003Members - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004.md b/sdk/python/sdk/zrok/docs/InlineResponse2004.md deleted file mode 100644 index 8c11d95d..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2004.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2004 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organizations** | [**list[InlineResponse2004Organizations]**](InlineResponse2004Organizations.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md b/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md deleted file mode 100644 index 9a3ba443..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2004Members - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md b/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md deleted file mode 100644 index 053d9f98..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2004Organizations - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005.md b/sdk/python/sdk/zrok/docs/InlineResponse2005.md deleted file mode 100644 index 8f539747..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2005.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2005 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**memberships** | [**list[InlineResponse2005Memberships]**](InlineResponse2005Memberships.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md b/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md deleted file mode 100644 index 147189c3..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2005Memberships - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md b/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md deleted file mode 100644 index 2f4ba151..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2005Organizations - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**token** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2006.md b/sdk/python/sdk/zrok/docs/InlineResponse2006.md deleted file mode 100644 index 7a03d61e..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2006.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2006 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sparklines** | [**list[Metrics]**](Metrics.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md b/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md deleted file mode 100644 index 3c6e1efe..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2006Memberships - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2007.md b/sdk/python/sdk/zrok/docs/InlineResponse2007.md deleted file mode 100644 index e0914fdd..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2007.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2007 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**controller_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse201.md b/sdk/python/sdk/zrok/docs/InlineResponse201.md deleted file mode 100644 index bbe25b94..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse201.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse201 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2011.md b/sdk/python/sdk/zrok/docs/InlineResponse2011.md deleted file mode 100644 index 8fd74494..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2011.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2011 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] -**cfg** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2012.md b/sdk/python/sdk/zrok/docs/InlineResponse2012.md deleted file mode 100644 index a72f2065..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2012.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2012 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2013.md b/sdk/python/sdk/zrok/docs/InlineResponse2013.md deleted file mode 100644 index 98930cb2..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2013.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2013 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**backend_mode** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse400.md b/sdk/python/sdk/zrok/docs/InlineResponse400.md deleted file mode 100644 index 29c731f6..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse400.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse400 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InviteBody.md b/sdk/python/sdk/zrok/docs/InviteBody.md deleted file mode 100644 index 0fb2fcb0..00000000 --- a/sdk/python/sdk/zrok/docs/InviteBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# InviteBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**invite_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/LoginBody.md b/sdk/python/sdk/zrok/docs/LoginBody.md deleted file mode 100644 index b877ebb8..00000000 --- a/sdk/python/sdk/zrok/docs/LoginBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# LoginBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationAddBody.md b/sdk/python/sdk/zrok/docs/OrganizationAddBody.md deleted file mode 100644 index 485613d0..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationAddBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# OrganizationAddBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationBody.md b/sdk/python/sdk/zrok/docs/OrganizationBody.md deleted file mode 100644 index 014b7e7a..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationBody1.md b/sdk/python/sdk/zrok/docs/OrganizationBody1.md deleted file mode 100644 index 2fbaf697..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationBody1.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationBody1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationListBody.md b/sdk/python/sdk/zrok/docs/OrganizationListBody.md deleted file mode 100644 index 2ceb8a7d..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationListBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationListBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md b/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md deleted file mode 100644 index f61c0b93..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# OrganizationRemoveBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md b/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md deleted file mode 100644 index 930d7945..00000000 --- a/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# RegenerateAccountTokenBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md b/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md deleted file mode 100644 index 2c863aba..00000000 --- a/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# RegenerateTokenBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/RegisterBody.md b/sdk/python/sdk/zrok/docs/RegisterBody.md deleted file mode 100644 index 0adc3fc8..00000000 --- a/sdk/python/sdk/zrok/docs/RegisterBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# RegisterBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ResetPasswordBody.md b/sdk/python/sdk/zrok/docs/ResetPasswordBody.md deleted file mode 100644 index 9f74c6d6..00000000 --- a/sdk/python/sdk/zrok/docs/ResetPasswordBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# ResetPasswordBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reset_token** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md b/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md deleted file mode 100644 index a59834d9..00000000 --- a/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# ResetPasswordRequestBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ShareBody.md b/sdk/python/sdk/zrok/docs/ShareBody.md deleted file mode 100644 index 4c01d818..00000000 --- a/sdk/python/sdk/zrok/docs/ShareBody.md +++ /dev/null @@ -1,12 +0,0 @@ -# ShareBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**share_token** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**add_access_grants** | **list[str]** | | [optional] -**remove_access_grants** | **list[str]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Shares.md b/sdk/python/sdk/zrok/docs/Shares.md deleted file mode 100644 index 5e8cabd6..00000000 --- a/sdk/python/sdk/zrok/docs/Shares.md +++ /dev/null @@ -1,8 +0,0 @@ -# Shares - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/SparkData.md b/sdk/python/sdk/zrok/docs/SparkData.md deleted file mode 100644 index a0065208..00000000 --- a/sdk/python/sdk/zrok/docs/SparkData.md +++ /dev/null @@ -1,8 +0,0 @@ -# SparkData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/SparklinesBody.md b/sdk/python/sdk/zrok/docs/SparklinesBody.md deleted file mode 100644 index 94437504..00000000 --- a/sdk/python/sdk/zrok/docs/SparklinesBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# SparklinesBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | **bool** | | [optional] -**environments** | **list[str]** | | [optional] -**shares** | **list[str]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/TokenGenerateBody.md b/sdk/python/sdk/zrok/docs/TokenGenerateBody.md deleted file mode 100644 index 0622eb92..00000000 --- a/sdk/python/sdk/zrok/docs/TokenGenerateBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# TokenGenerateBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invite_tokens** | **list[str]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/UnaccessBody.md b/sdk/python/sdk/zrok/docs/UnaccessBody.md deleted file mode 100644 index d3bcdfbe..00000000 --- a/sdk/python/sdk/zrok/docs/UnaccessBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnaccessBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/UnshareBody.md b/sdk/python/sdk/zrok/docs/UnshareBody.md deleted file mode 100644 index ec7c4dd1..00000000 --- a/sdk/python/sdk/zrok/docs/UnshareBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnshareBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**reserved** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/VerifyBody.md b/sdk/python/sdk/zrok/docs/VerifyBody.md deleted file mode 100644 index 993e6a34..00000000 --- a/sdk/python/sdk/zrok/docs/VerifyBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# VerifyBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Version.md b/sdk/python/sdk/zrok/docs/Version.md deleted file mode 100644 index 203ff4a1..00000000 --- a/sdk/python/sdk/zrok/docs/Version.md +++ /dev/null @@ -1,8 +0,0 @@ -# Version - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/VersionBody.md b/sdk/python/sdk/zrok/docs/VersionBody.md deleted file mode 100644 index 43f385ee..00000000 --- a/sdk/python/sdk/zrok/docs/VersionBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# VersionBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/VersionCheckBody.md b/sdk/python/sdk/zrok/docs/VersionCheckBody.md deleted file mode 100644 index b00f7a3f..00000000 --- a/sdk/python/sdk/zrok/docs/VersionCheckBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# VersionCheckBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/test/test_access_body.py b/sdk/python/sdk/zrok/test/test_access_body.py deleted file mode 100644 index 7e936247..00000000 --- a/sdk/python/sdk/zrok/test/test_access_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.access_body import AccessBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAccessBody(unittest.TestCase): - """AccessBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAccessBody(self): - """Test AccessBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.access_body.AccessBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_access_body1.py b/sdk/python/sdk/zrok/test/test_access_body1.py deleted file mode 100644 index 53e78285..00000000 --- a/sdk/python/sdk/zrok/test/test_access_body1.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.access_body1 import AccessBody1 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAccessBody1(unittest.TestCase): - """AccessBody1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAccessBody1(self): - """Test AccessBody1""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.access_body1.AccessBody1() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_account_api.py b/sdk/python/sdk/zrok/test/test_account_api.py index 2a02a258..419e1f1b 100644 --- a/sdk/python/sdk/zrok/test/test_account_api.py +++ b/sdk/python/sdk/zrok/test/test_account_api.py @@ -3,74 +3,72 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.api.account_api import AccountApi # noqa: E501 -from zrok_api.rest import ApiException +from zrok_api.api.account_api import AccountApi class TestAccountApi(unittest.TestCase): """AccountApi unit test stubs""" - def setUp(self): - self.api = AccountApi() # noqa: E501 + def setUp(self) -> None: + self.api = AccountApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_change_password(self): + def test_change_password(self) -> None: """Test case for change_password """ pass - def test_invite(self): + def test_invite(self) -> None: """Test case for invite """ pass - def test_login(self): + def test_login(self) -> None: """Test case for login """ pass - def test_regenerate_token(self): - """Test case for regenerate_token + def test_regenerate_account_token(self) -> None: + """Test case for regenerate_account_token """ pass - def test_register(self): + def test_register(self) -> None: """Test case for register """ pass - def test_reset_password(self): + def test_reset_password(self) -> None: """Test case for reset_password """ pass - def test_reset_password_request(self): + def test_reset_password_request(self) -> None: """Test case for reset_password_request """ pass - def test_verify(self): + def test_verify(self) -> None: """Test case for verify """ diff --git a/sdk/python/sdk/zrok/test/test_account_body.py b/sdk/python/sdk/zrok/test/test_account_body.py deleted file mode 100644 index 56a6837a..00000000 --- a/sdk/python/sdk/zrok/test/test_account_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.account_body import AccountBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAccountBody(unittest.TestCase): - """AccountBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAccountBody(self): - """Test AccountBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.account_body.AccountBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_admin_api.py b/sdk/python/sdk/zrok/test/test_admin_api.py index 5b9a30b4..720e8832 100644 --- a/sdk/python/sdk/zrok/test/test_admin_api.py +++ b/sdk/python/sdk/zrok/test/test_admin_api.py @@ -3,110 +3,108 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.api.admin_api import AdminApi # noqa: E501 -from zrok_api.rest import ApiException +from zrok_api.api.admin_api import AdminApi class TestAdminApi(unittest.TestCase): """AdminApi unit test stubs""" - def setUp(self): - self.api = AdminApi() # noqa: E501 + def setUp(self) -> None: + self.api = AdminApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_add_organization_member(self): + def test_add_organization_member(self) -> None: """Test case for add_organization_member """ pass - def test_create_account(self): + def test_create_account(self) -> None: """Test case for create_account """ pass - def test_create_frontend(self): + def test_create_frontend(self) -> None: """Test case for create_frontend """ pass - def test_create_identity(self): + def test_create_identity(self) -> None: """Test case for create_identity """ pass - def test_create_organization(self): + def test_create_organization(self) -> None: """Test case for create_organization """ pass - def test_delete_frontend(self): + def test_delete_frontend(self) -> None: """Test case for delete_frontend """ pass - def test_delete_organization(self): + def test_delete_organization(self) -> None: """Test case for delete_organization """ pass - def test_grants(self): + def test_grants(self) -> None: """Test case for grants """ pass - def test_invite_token_generate(self): + def test_invite_token_generate(self) -> None: """Test case for invite_token_generate """ pass - def test_list_frontends(self): + def test_list_frontends(self) -> None: """Test case for list_frontends """ pass - def test_list_organization_members(self): + def test_list_organization_members(self) -> None: """Test case for list_organization_members """ pass - def test_list_organizations(self): + def test_list_organizations(self) -> None: """Test case for list_organizations """ pass - def test_remove_organization_member(self): + def test_remove_organization_member(self) -> None: """Test case for remove_organization_member """ pass - def test_update_frontend(self): + def test_update_frontend(self) -> None: """Test case for update_frontend """ diff --git a/sdk/python/sdk/zrok/test/test_auth_user.py b/sdk/python/sdk/zrok/test/test_auth_user.py index 3e362a20..e5d70b26 100644 --- a/sdk/python/sdk/zrok/test/test_auth_user.py +++ b/sdk/python/sdk/zrok/test/test_auth_user.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.auth_user import AuthUser # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.auth_user import AuthUser class TestAuthUser(unittest.TestCase): """AuthUser unit test stubs""" @@ -28,12 +25,28 @@ class TestAuthUser(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> AuthUser: + """Test AuthUser + include_optional 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 `AuthUser` + """ + model = AuthUser() + if include_optional: + return AuthUser( + username = '', + password = '' + ) + else: + return AuthUser( + ) + """ + def testAuthUser(self): """Test AuthUser""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.auth_user.AuthUser() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_change_password_body.py b/sdk/python/sdk/zrok/test/test_change_password_body.py deleted file mode 100644 index d1ebf600..00000000 --- a/sdk/python/sdk/zrok/test/test_change_password_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.change_password_body import ChangePasswordBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestChangePasswordBody(unittest.TestCase): - """ChangePasswordBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChangePasswordBody(self): - """Test ChangePasswordBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.change_password_body.ChangePasswordBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_client_version_check_body.py b/sdk/python/sdk/zrok/test/test_client_version_check_body.py deleted file mode 100644 index 11fec3f4..00000000 --- a/sdk/python/sdk/zrok/test/test_client_version_check_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.client_version_check_body import ClientVersionCheckBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestClientVersionCheckBody(unittest.TestCase): - """ClientVersionCheckBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClientVersionCheckBody(self): - """Test ClientVersionCheckBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.client_version_check_body.ClientVersionCheckBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_configuration.py b/sdk/python/sdk/zrok/test/test_configuration.py index 29ad044b..bf80210e 100644 --- a/sdk/python/sdk/zrok/test/test_configuration.py +++ b/sdk/python/sdk/zrok/test/test_configuration.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.configuration import Configuration # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.configuration import Configuration class TestConfiguration(unittest.TestCase): """Configuration unit test stubs""" @@ -28,12 +25,31 @@ class TestConfiguration(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Configuration: + """Test Configuration + include_optional 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 `Configuration` + """ + model = Configuration() + if include_optional: + return Configuration( + version = '', + tou_link = '', + invites_open = True, + requires_invite_token = True, + invite_token_contact = '' + ) + else: + return Configuration( + ) + """ + def testConfiguration(self): """Test Configuration""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.configuration.Configuration() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_disable_body.py b/sdk/python/sdk/zrok/test/test_disable_body.py deleted file mode 100644 index ab342d59..00000000 --- a/sdk/python/sdk/zrok/test/test_disable_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.disable_body import DisableBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestDisableBody(unittest.TestCase): - """DisableBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDisableBody(self): - """Test DisableBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.disable_body.DisableBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_enable_body.py b/sdk/python/sdk/zrok/test/test_enable_body.py deleted file mode 100644 index d3eec4b3..00000000 --- a/sdk/python/sdk/zrok/test/test_enable_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.enable_body import EnableBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnableBody(unittest.TestCase): - """EnableBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnableBody(self): - """Test EnableBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.enable_body.EnableBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environment.py b/sdk/python/sdk/zrok/test/test_environment.py index 3a339b29..d2e28280 100644 --- a/sdk/python/sdk/zrok/test/test_environment.py +++ b/sdk/python/sdk/zrok/test/test_environment.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.environment import Environment # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.environment import Environment class TestEnvironment(unittest.TestCase): """Environment unit test stubs""" @@ -28,12 +25,38 @@ class TestEnvironment(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Environment: + """Test Environment + include_optional 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 `Environment` + """ + model = Environment() + if include_optional: + return Environment( + description = '', + host = '', + address = '', + z_id = '', + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56 + ) + else: + return Environment( + ) + """ + def testEnvironment(self): """Test Environment""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.environment.Environment() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_environment_and_resources.py b/sdk/python/sdk/zrok/test/test_environment_and_resources.py index ab4f4501..56cafdac 100644 --- a/sdk/python/sdk/zrok/test/test_environment_and_resources.py +++ b/sdk/python/sdk/zrok/test/test_environment_and_resources.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.environment_and_resources import EnvironmentAndResources # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.environment_and_resources import EnvironmentAndResources class TestEnvironmentAndResources(unittest.TestCase): """EnvironmentAndResources unit test stubs""" @@ -28,12 +25,70 @@ class TestEnvironmentAndResources(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> EnvironmentAndResources: + """Test EnvironmentAndResources + include_optional 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 `EnvironmentAndResources` + """ + model = EnvironmentAndResources() + if include_optional: + return EnvironmentAndResources( + environment = zrok_api.models.environment.environment( + description = '', + host = '', + address = '', + z_id = '', + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56, ), + frontends = [ + zrok_api.models.frontend.frontend( + id = 56, + frontend_token = '', + share_token = '', + backend_mode = '', + bind_address = '', + description = '', + z_id = '', + created_at = 56, + updated_at = 56, ) + ], + shares = [ + zrok_api.models.share.share( + share_token = '', + z_id = '', + share_mode = '', + backend_mode = '', + frontend_selection = '', + frontend_endpoint = '', + backend_proxy_endpoint = '', + reserved = True, + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56, ) + ] + ) + else: + return EnvironmentAndResources( + ) + """ + def testEnvironmentAndResources(self): """Test EnvironmentAndResources""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.environment_and_resources.EnvironmentAndResources() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_environment_api.py b/sdk/python/sdk/zrok/test/test_environment_api.py index c70480e6..83aeacd8 100644 --- a/sdk/python/sdk/zrok/test/test_environment_api.py +++ b/sdk/python/sdk/zrok/test/test_environment_api.py @@ -3,38 +3,36 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.api.environment_api import EnvironmentApi # noqa: E501 -from zrok_api.rest import ApiException +from zrok_api.api.environment_api import EnvironmentApi class TestEnvironmentApi(unittest.TestCase): """EnvironmentApi unit test stubs""" - def setUp(self): - self.api = EnvironmentApi() # noqa: E501 + def setUp(self) -> None: + self.api = EnvironmentApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_disable(self): + def test_disable(self) -> None: """Test case for disable """ pass - def test_enable(self): + def test_enable(self) -> None: """Test case for enable """ diff --git a/sdk/python/sdk/zrok/test/test_environments.py b/sdk/python/sdk/zrok/test/test_environments.py deleted file mode 100644 index 21972eca..00000000 --- a/sdk/python/sdk/zrok/test/test_environments.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.environments import Environments # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnvironments(unittest.TestCase): - """Environments unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnvironments(self): - """Test Environments""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.environments.Environments() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_error_message.py b/sdk/python/sdk/zrok/test/test_error_message.py deleted file mode 100644 index db509710..00000000 --- a/sdk/python/sdk/zrok/test/test_error_message.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.error_message import ErrorMessage # noqa: E501 -from zrok_api.rest import ApiException - - -class TestErrorMessage(unittest.TestCase): - """ErrorMessage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testErrorMessage(self): - """Test ErrorMessage""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.error_message.ErrorMessage() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend.py b/sdk/python/sdk/zrok/test/test_frontend.py index 7b44e3ef..eba715d9 100644 --- a/sdk/python/sdk/zrok/test/test_frontend.py +++ b/sdk/python/sdk/zrok/test/test_frontend.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.frontend import Frontend # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.frontend import Frontend class TestFrontend(unittest.TestCase): """Frontend unit test stubs""" @@ -28,12 +25,35 @@ class TestFrontend(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Frontend: + """Test Frontend + include_optional 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 `Frontend` + """ + model = Frontend() + if include_optional: + return Frontend( + id = 56, + frontend_token = '', + share_token = '', + backend_mode = '', + bind_address = '', + description = '', + z_id = '', + created_at = 56, + updated_at = 56 + ) + else: + return Frontend( + ) + """ + def testFrontend(self): """Test Frontend""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend.Frontend() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_frontend_body.py b/sdk/python/sdk/zrok/test/test_frontend_body.py deleted file mode 100644 index 8519edbc..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontend_body import FrontendBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontendBody(unittest.TestCase): - """FrontendBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontendBody(self): - """Test FrontendBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend_body.FrontendBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend_body1.py b/sdk/python/sdk/zrok/test/test_frontend_body1.py deleted file mode 100644 index 5a560aff..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend_body1.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontend_body1 import FrontendBody1 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontendBody1(unittest.TestCase): - """FrontendBody1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontendBody1(self): - """Test FrontendBody1""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend_body1.FrontendBody1() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend_body2.py b/sdk/python/sdk/zrok/test/test_frontend_body2.py deleted file mode 100644 index c8b2016c..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend_body2.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontend_body2 import FrontendBody2 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontendBody2(unittest.TestCase): - """FrontendBody2 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontendBody2(self): - """Test FrontendBody2""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend_body2.FrontendBody2() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontends.py b/sdk/python/sdk/zrok/test/test_frontends.py deleted file mode 100644 index 0a7a8e45..00000000 --- a/sdk/python/sdk/zrok/test/test_frontends.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontends(unittest.TestCase): - """Frontends unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontends(self): - """Test Frontends""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontends.Frontends() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_grants_body.py b/sdk/python/sdk/zrok/test/test_grants_body.py deleted file mode 100644 index 431fd27b..00000000 --- a/sdk/python/sdk/zrok/test/test_grants_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.grants_body import GrantsBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestGrantsBody(unittest.TestCase): - """GrantsBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGrantsBody(self): - """Test GrantsBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.grants_body.GrantsBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_identity_body.py b/sdk/python/sdk/zrok/test/test_identity_body.py deleted file mode 100644 index b3716d87..00000000 --- a/sdk/python/sdk/zrok/test/test_identity_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.identity_body import IdentityBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestIdentityBody(unittest.TestCase): - """IdentityBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testIdentityBody(self): - """Test IdentityBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.identity_body.IdentityBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response200.py b/sdk/python/sdk/zrok/test/test_inline_response200.py deleted file mode 100644 index a447716d..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response200.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response200 import InlineResponse200 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse200(unittest.TestCase): - """InlineResponse200 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse200(self): - """Test InlineResponse200""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response200.InlineResponse200() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2001.py b/sdk/python/sdk/zrok/test/test_inline_response2001.py deleted file mode 100644 index 73fc1356..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2001.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2001 import InlineResponse2001 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2001(unittest.TestCase): - """InlineResponse2001 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2001(self): - """Test InlineResponse2001""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2001.InlineResponse2001() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2002.py b/sdk/python/sdk/zrok/test/test_inline_response2002.py deleted file mode 100644 index 0230ae38..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2002.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2002 import InlineResponse2002 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2002(unittest.TestCase): - """InlineResponse2002 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2002(self): - """Test InlineResponse2002""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2002.InlineResponse2002() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2003.py b/sdk/python/sdk/zrok/test/test_inline_response2003.py deleted file mode 100644 index dc30845e..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2003.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2003 import InlineResponse2003 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2003(unittest.TestCase): - """InlineResponse2003 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2003(self): - """Test InlineResponse2003""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2003.InlineResponse2003() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2003_members.py b/sdk/python/sdk/zrok/test/test_inline_response2003_members.py deleted file mode 100644 index 1fd04fa1..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2003_members.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2003_members import InlineResponse2003Members # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2003Members(unittest.TestCase): - """InlineResponse2003Members unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2003Members(self): - """Test InlineResponse2003Members""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2003_members.InlineResponse2003Members() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004.py b/sdk/python/sdk/zrok/test/test_inline_response2004.py deleted file mode 100644 index 264bc094..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2004.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2004 import InlineResponse2004 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2004(unittest.TestCase): - """InlineResponse2004 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2004(self): - """Test InlineResponse2004""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2004.InlineResponse2004() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004_members.py b/sdk/python/sdk/zrok/test/test_inline_response2004_members.py deleted file mode 100644 index 7376a0b9..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2004_members.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2004_members import InlineResponse2004Members # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2004Members(unittest.TestCase): - """InlineResponse2004Members unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2004Members(self): - """Test InlineResponse2004Members""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2004_members.InlineResponse2004Members() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py b/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py deleted file mode 100644 index 598471e6..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2004Organizations(unittest.TestCase): - """InlineResponse2004Organizations unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2004Organizations(self): - """Test InlineResponse2004Organizations""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2004_organizations.InlineResponse2004Organizations() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005.py b/sdk/python/sdk/zrok/test/test_inline_response2005.py deleted file mode 100644 index cf3b41ac..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2005.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2005 import InlineResponse2005 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2005(unittest.TestCase): - """InlineResponse2005 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2005(self): - """Test InlineResponse2005""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2005.InlineResponse2005() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py b/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py deleted file mode 100644 index 230a6ac2..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2005Memberships(unittest.TestCase): - """InlineResponse2005Memberships unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2005Memberships(self): - """Test InlineResponse2005Memberships""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2005_memberships.InlineResponse2005Memberships() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py b/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py deleted file mode 100644 index 6c3e995e..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2005_organizations import InlineResponse2005Organizations # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2005Organizations(unittest.TestCase): - """InlineResponse2005Organizations unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2005Organizations(self): - """Test InlineResponse2005Organizations""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2005_organizations.InlineResponse2005Organizations() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2006.py b/sdk/python/sdk/zrok/test/test_inline_response2006.py deleted file mode 100644 index fd19aa10..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2006.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2006 import InlineResponse2006 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2006(unittest.TestCase): - """InlineResponse2006 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2006(self): - """Test InlineResponse2006""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2006.InlineResponse2006() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py b/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py deleted file mode 100644 index 1a779c3e..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2006_memberships import InlineResponse2006Memberships # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2006Memberships(unittest.TestCase): - """InlineResponse2006Memberships unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2006Memberships(self): - """Test InlineResponse2006Memberships""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2006_memberships.InlineResponse2006Memberships() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2007.py b/sdk/python/sdk/zrok/test/test_inline_response2007.py deleted file mode 100644 index 52ae67ba..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2007.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2007 import InlineResponse2007 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2007(unittest.TestCase): - """InlineResponse2007 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2007(self): - """Test InlineResponse2007""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2007.InlineResponse2007() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response201.py b/sdk/python/sdk/zrok/test/test_inline_response201.py deleted file mode 100644 index 3c719ebd..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response201.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response201 import InlineResponse201 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse201(unittest.TestCase): - """InlineResponse201 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse201(self): - """Test InlineResponse201""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response201.InlineResponse201() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2011.py b/sdk/python/sdk/zrok/test/test_inline_response2011.py deleted file mode 100644 index 3594d34c..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2011.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2011 import InlineResponse2011 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2011(unittest.TestCase): - """InlineResponse2011 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2011(self): - """Test InlineResponse2011""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2011.InlineResponse2011() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2012.py b/sdk/python/sdk/zrok/test/test_inline_response2012.py deleted file mode 100644 index cc69a570..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2012.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2012 import InlineResponse2012 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2012(unittest.TestCase): - """InlineResponse2012 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2012(self): - """Test InlineResponse2012""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2012.InlineResponse2012() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2013.py b/sdk/python/sdk/zrok/test/test_inline_response2013.py deleted file mode 100644 index 3b028a6c..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2013.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2013 import InlineResponse2013 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2013(unittest.TestCase): - """InlineResponse2013 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2013(self): - """Test InlineResponse2013""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2013.InlineResponse2013() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response400.py b/sdk/python/sdk/zrok/test/test_inline_response400.py deleted file mode 100644 index 13e6f8c6..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response400.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response400 import InlineResponse400 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse400(unittest.TestCase): - """InlineResponse400 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse400(self): - """Test InlineResponse400""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response400.InlineResponse400() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_invite_body.py b/sdk/python/sdk/zrok/test/test_invite_body.py deleted file mode 100644 index 8228bdc0..00000000 --- a/sdk/python/sdk/zrok/test/test_invite_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.invite_body import InviteBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInviteBody(unittest.TestCase): - """InviteBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInviteBody(self): - """Test InviteBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.invite_body.InviteBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_login_body.py b/sdk/python/sdk/zrok/test/test_login_body.py deleted file mode 100644 index 3dd5df4d..00000000 --- a/sdk/python/sdk/zrok/test/test_login_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.login_body import LoginBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestLoginBody(unittest.TestCase): - """LoginBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLoginBody(self): - """Test LoginBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.login_body.LoginBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metadata_api.py b/sdk/python/sdk/zrok/test/test_metadata_api.py index 4d75a9a4..2424ae4c 100644 --- a/sdk/python/sdk/zrok/test/test_metadata_api.py +++ b/sdk/python/sdk/zrok/test/test_metadata_api.py @@ -3,115 +3,125 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.api.metadata_api import MetadataApi # noqa: E501 -from zrok_api.rest import ApiException +from zrok_api.api.metadata_api import MetadataApi class TestMetadataApi(unittest.TestCase): """MetadataApi unit test stubs""" - def setUp(self): - self.api = MetadataApi() # noqa: E501 + def setUp(self) -> None: + self.api = MetadataApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_configuration(self): + def test_client_version_check(self) -> None: + """Test case for client_version_check + + """ + pass + + def test_configuration(self) -> None: """Test case for configuration """ pass - def test_get_account_detail(self): + def test_get_account_detail(self) -> None: """Test case for get_account_detail """ pass - def test_get_account_metrics(self): + def test_get_account_metrics(self) -> None: """Test case for get_account_metrics """ pass - def test_get_environment_detail(self): + def test_get_environment_detail(self) -> None: """Test case for get_environment_detail """ pass - def test_get_environment_metrics(self): + def test_get_environment_metrics(self) -> None: """Test case for get_environment_metrics """ pass - def test_get_frontend_detail(self): + def test_get_frontend_detail(self) -> None: """Test case for get_frontend_detail """ pass - def test_get_share_detail(self): + def test_get_share_detail(self) -> None: """Test case for get_share_detail """ pass - def test_get_share_metrics(self): + def test_get_share_metrics(self) -> None: """Test case for get_share_metrics """ pass - def test_get_sparklines(self): + def test_get_sparklines(self) -> None: """Test case for get_sparklines """ pass - def test_list_memberships(self): + def test_list_memberships(self) -> None: """Test case for list_memberships """ pass - def test_list_org_members(self): + def test_list_org_members(self) -> None: """Test case for list_org_members """ pass - def test_org_account_overview(self): + def test_org_account_overview(self) -> None: """Test case for org_account_overview """ pass - def test_overview(self): + def test_overview(self) -> None: """Test case for overview """ pass - def test_version(self): + def test_version(self) -> None: """Test case for version """ pass + def test_version_inventory(self) -> None: + """Test case for version_inventory + + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metrics.py b/sdk/python/sdk/zrok/test/test_metrics.py index 71ae9c2a..04179009 100644 --- a/sdk/python/sdk/zrok/test/test_metrics.py +++ b/sdk/python/sdk/zrok/test/test_metrics.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.metrics import Metrics # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.metrics import Metrics class TestMetrics(unittest.TestCase): """Metrics unit test stubs""" @@ -28,12 +25,35 @@ class TestMetrics(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Metrics: + """Test Metrics + include_optional 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 `Metrics` + """ + model = Metrics() + if include_optional: + return Metrics( + scope = '', + id = '', + period = 1.337, + samples = [ + zrok_api.models.metrics_sample.metricsSample( + rx = 1.337, + tx = 1.337, + timestamp = 1.337, ) + ] + ) + else: + return Metrics( + ) + """ + def testMetrics(self): """Test Metrics""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.metrics.Metrics() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_metrics_sample.py b/sdk/python/sdk/zrok/test/test_metrics_sample.py index 19e956f0..0b58e38d 100644 --- a/sdk/python/sdk/zrok/test/test_metrics_sample.py +++ b/sdk/python/sdk/zrok/test/test_metrics_sample.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.metrics_sample import MetricsSample # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.metrics_sample import MetricsSample class TestMetricsSample(unittest.TestCase): """MetricsSample unit test stubs""" @@ -28,12 +25,29 @@ class TestMetricsSample(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> MetricsSample: + """Test MetricsSample + include_optional 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 `MetricsSample` + """ + model = MetricsSample() + if include_optional: + return MetricsSample( + rx = 1.337, + tx = 1.337, + timestamp = 1.337 + ) + else: + return MetricsSample( + ) + """ + def testMetricsSample(self): """Test MetricsSample""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.metrics_sample.MetricsSample() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_organization_add_body.py b/sdk/python/sdk/zrok/test/test_organization_add_body.py deleted file mode 100644 index 13274497..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_add_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_add_body import OrganizationAddBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationAddBody(unittest.TestCase): - """OrganizationAddBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationAddBody(self): - """Test OrganizationAddBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_add_body.OrganizationAddBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_body.py b/sdk/python/sdk/zrok/test/test_organization_body.py deleted file mode 100644 index 05e57436..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_body import OrganizationBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationBody(unittest.TestCase): - """OrganizationBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationBody(self): - """Test OrganizationBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_body.OrganizationBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_body1.py b/sdk/python/sdk/zrok/test/test_organization_body1.py deleted file mode 100644 index 930378cb..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_body1.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_body1 import OrganizationBody1 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationBody1(unittest.TestCase): - """OrganizationBody1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationBody1(self): - """Test OrganizationBody1""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_body1.OrganizationBody1() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_list_body.py b/sdk/python/sdk/zrok/test/test_organization_list_body.py deleted file mode 100644 index b43c57e4..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_list_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_list_body import OrganizationListBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationListBody(unittest.TestCase): - """OrganizationListBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationListBody(self): - """Test OrganizationListBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_list_body.OrganizationListBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_remove_body.py b/sdk/python/sdk/zrok/test/test_organization_remove_body.py deleted file mode 100644 index 07128ed8..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_remove_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_remove_body import OrganizationRemoveBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationRemoveBody(unittest.TestCase): - """OrganizationRemoveBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationRemoveBody(self): - """Test OrganizationRemoveBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_remove_body.OrganizationRemoveBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_overview.py b/sdk/python/sdk/zrok/test/test_overview.py index 8a92ad55..804007cd 100644 --- a/sdk/python/sdk/zrok/test/test_overview.py +++ b/sdk/python/sdk/zrok/test/test_overview.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.overview import Overview # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.overview import Overview class TestOverview(unittest.TestCase): """Overview unit test stubs""" @@ -28,12 +25,69 @@ class TestOverview(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Overview: + """Test Overview + include_optional 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 `Overview` + """ + model = Overview() + if include_optional: + return Overview( + account_limited = True, + environments = [ + zrok_api.models.environment_and_resources.environmentAndResources( + environment = zrok_api.models.environment.environment( + description = '', + host = '', + address = '', + z_id = '', + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56, ), + frontends = [ + zrok_api.models.frontend.frontend( + id = 56, + frontend_token = '', + share_token = '', + backend_mode = '', + bind_address = '', + description = '', + z_id = '', + created_at = 56, + updated_at = 56, ) + ], + shares = [ + zrok_api.models.share.share( + share_token = '', + z_id = '', + share_mode = '', + backend_mode = '', + frontend_selection = '', + frontend_endpoint = '', + backend_proxy_endpoint = '', + reserved = True, + limited = True, + created_at = 56, + updated_at = 56, ) + ], ) + ] + ) + else: + return Overview( + ) + """ + def testOverview(self): """Test Overview""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.overview.Overview() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_principal.py b/sdk/python/sdk/zrok/test/test_principal.py index f38cb221..f92c159c 100644 --- a/sdk/python/sdk/zrok/test/test_principal.py +++ b/sdk/python/sdk/zrok/test/test_principal.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.principal import Principal # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.principal import Principal class TestPrincipal(unittest.TestCase): """Principal unit test stubs""" @@ -28,12 +25,31 @@ class TestPrincipal(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Principal: + """Test Principal + include_optional 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 `Principal` + """ + model = Principal() + if include_optional: + return Principal( + id = 56, + email = '', + token = '', + limitless = True, + admin = True + ) + else: + return Principal( + ) + """ + def testPrincipal(self): """Test Principal""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.principal.Principal() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py b/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py deleted file mode 100644 index 405b07c4..00000000 --- a/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestRegenerateAccountTokenBody(unittest.TestCase): - """RegenerateAccountTokenBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRegenerateAccountTokenBody(self): - """Test RegenerateAccountTokenBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.regenerate_account_token_body.RegenerateAccountTokenBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_regenerate_token_body.py b/sdk/python/sdk/zrok/test/test_regenerate_token_body.py deleted file mode 100644 index adfd771e..00000000 --- a/sdk/python/sdk/zrok/test/test_regenerate_token_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.regenerate_token_body import RegenerateTokenBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestRegenerateTokenBody(unittest.TestCase): - """RegenerateTokenBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRegenerateTokenBody(self): - """Test RegenerateTokenBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.regenerate_token_body.RegenerateTokenBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_register_body.py b/sdk/python/sdk/zrok/test/test_register_body.py deleted file mode 100644 index fe72be1e..00000000 --- a/sdk/python/sdk/zrok/test/test_register_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.register_body import RegisterBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestRegisterBody(unittest.TestCase): - """RegisterBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRegisterBody(self): - """Test RegisterBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.register_body.RegisterBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_reset_password_body.py b/sdk/python/sdk/zrok/test/test_reset_password_body.py deleted file mode 100644 index f4c4561d..00000000 --- a/sdk/python/sdk/zrok/test/test_reset_password_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.reset_password_body import ResetPasswordBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestResetPasswordBody(unittest.TestCase): - """ResetPasswordBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testResetPasswordBody(self): - """Test ResetPasswordBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.reset_password_body.ResetPasswordBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_reset_password_request_body.py b/sdk/python/sdk/zrok/test/test_reset_password_request_body.py deleted file mode 100644 index d9a3360b..00000000 --- a/sdk/python/sdk/zrok/test/test_reset_password_request_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestResetPasswordRequestBody(unittest.TestCase): - """ResetPasswordRequestBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testResetPasswordRequestBody(self): - """Test ResetPasswordRequestBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.reset_password_request_body.ResetPasswordRequestBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share.py b/sdk/python/sdk/zrok/test/test_share.py index 80a16c16..ed498dc0 100644 --- a/sdk/python/sdk/zrok/test/test_share.py +++ b/sdk/python/sdk/zrok/test/test_share.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.share import Share # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.share import Share class TestShare(unittest.TestCase): """Share unit test stubs""" @@ -28,12 +25,42 @@ class TestShare(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> Share: + """Test Share + include_optional 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 `Share` + """ + model = Share() + if include_optional: + return Share( + share_token = '', + z_id = '', + share_mode = '', + backend_mode = '', + frontend_selection = '', + frontend_endpoint = '', + backend_proxy_endpoint = '', + reserved = True, + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56 + ) + else: + return Share( + ) + """ + def testShare(self): """Test Share""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share.Share() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_share_api.py b/sdk/python/sdk/zrok/test/test_share_api.py index e799f3c8..a22ef8bf 100644 --- a/sdk/python/sdk/zrok/test/test_share_api.py +++ b/sdk/python/sdk/zrok/test/test_share_api.py @@ -3,56 +3,60 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.api.share_api import ShareApi # noqa: E501 -from zrok_api.rest import ApiException +from zrok_api.api.share_api import ShareApi class TestShareApi(unittest.TestCase): """ShareApi unit test stubs""" - def setUp(self): - self.api = ShareApi() # noqa: E501 + def setUp(self) -> None: + self.api = ShareApi() - def tearDown(self): + def tearDown(self) -> None: pass - def test_access(self): + def test_access(self) -> None: """Test case for access """ pass - def test_share(self): + def test_share(self) -> None: """Test case for share """ pass - def test_unaccess(self): + def test_unaccess(self) -> None: """Test case for unaccess """ pass - def test_unshare(self): + def test_unshare(self) -> None: """Test case for unshare """ pass - def test_update_share(self): + def test_update_access(self) -> None: + """Test case for update_access + + """ + pass + + def test_update_share(self) -> None: """Test case for update_share """ diff --git a/sdk/python/sdk/zrok/test/test_share_body.py b/sdk/python/sdk/zrok/test/test_share_body.py deleted file mode 100644 index fcbdb3a2..00000000 --- a/sdk/python/sdk/zrok/test/test_share_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.share_body import ShareBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShareBody(unittest.TestCase): - """ShareBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShareBody(self): - """Test ShareBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share_body.ShareBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_request.py b/sdk/python/sdk/zrok/test/test_share_request.py index 79abd431..c543ae26 100644 --- a/sdk/python/sdk/zrok/test/test_share_request.py +++ b/sdk/python/sdk/zrok/test/test_share_request.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.share_request import ShareRequest # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.share_request import ShareRequest class TestShareRequest(unittest.TestCase): """ShareRequest unit test stubs""" @@ -28,12 +25,50 @@ class TestShareRequest(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> ShareRequest: + """Test ShareRequest + include_optional 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 `ShareRequest` + """ + model = ShareRequest() + if include_optional: + return ShareRequest( + env_zid = '', + share_mode = 'public', + frontend_selection = [ + '' + ], + backend_mode = 'proxy', + backend_proxy_endpoint = '', + auth_scheme = '', + auth_users = [ + zrok_api.models.auth_user.authUser( + username = '', + password = '', ) + ], + oauth_provider = 'github', + oauth_email_domains = [ + '' + ], + oauth_authorization_check_interval = '', + reserved = True, + permission_mode = 'open', + access_grants = [ + '' + ], + unique_name = '' + ) + else: + return ShareRequest( + ) + """ + def testShareRequest(self): """Test ShareRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share_request.ShareRequest() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_share_response.py b/sdk/python/sdk/zrok/test/test_share_response.py index e2ef3f94..46bb5af5 100644 --- a/sdk/python/sdk/zrok/test/test_share_response.py +++ b/sdk/python/sdk/zrok/test/test_share_response.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.share_response import ShareResponse # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.share_response import ShareResponse class TestShareResponse(unittest.TestCase): """ShareResponse unit test stubs""" @@ -28,12 +25,30 @@ class TestShareResponse(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> ShareResponse: + """Test ShareResponse + include_optional 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 `ShareResponse` + """ + model = ShareResponse() + if include_optional: + return ShareResponse( + frontend_proxy_endpoints = [ + '' + ], + share_token = '' + ) + else: + return ShareResponse( + ) + """ + def testShareResponse(self): """Test ShareResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share_response.ShareResponse() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_shares.py b/sdk/python/sdk/zrok/test/test_shares.py deleted file mode 100644 index f225a196..00000000 --- a/sdk/python/sdk/zrok/test/test_shares.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.shares import Shares # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShares(unittest.TestCase): - """Shares unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShares(self): - """Test Shares""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.shares.Shares() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_spark_data.py b/sdk/python/sdk/zrok/test/test_spark_data.py deleted file mode 100644 index 0543758e..00000000 --- a/sdk/python/sdk/zrok/test/test_spark_data.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.spark_data import SparkData # noqa: E501 -from zrok_api.rest import ApiException - - -class TestSparkData(unittest.TestCase): - """SparkData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSparkData(self): - """Test SparkData""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.spark_data.SparkData() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_spark_data_sample.py b/sdk/python/sdk/zrok/test/test_spark_data_sample.py index 993babe2..421d5dcd 100644 --- a/sdk/python/sdk/zrok/test/test_spark_data_sample.py +++ b/sdk/python/sdk/zrok/test/test_spark_data_sample.py @@ -3,21 +3,18 @@ """ zrok - zrok client access # noqa: E501 + zrok client access - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 -from __future__ import absolute_import import unittest -import zrok_api -from zrok_api.models.spark_data_sample import SparkDataSample # noqa: E501 -from zrok_api.rest import ApiException - +from zrok_api.models.spark_data_sample import SparkDataSample class TestSparkDataSample(unittest.TestCase): """SparkDataSample unit test stubs""" @@ -28,12 +25,28 @@ class TestSparkDataSample(unittest.TestCase): def tearDown(self): pass + def make_instance(self, include_optional) -> SparkDataSample: + """Test SparkDataSample + include_optional 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 `SparkDataSample` + """ + model = SparkDataSample() + if include_optional: + return SparkDataSample( + rx = 1.337, + tx = 1.337 + ) + else: + return SparkDataSample( + ) + """ + def testSparkDataSample(self): """Test SparkDataSample""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.spark_data_sample.SparkDataSample() # noqa: E501 - pass - + # 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/sdk/python/sdk/zrok/test/test_sparklines_body.py b/sdk/python/sdk/zrok/test/test_sparklines_body.py deleted file mode 100644 index 00165b62..00000000 --- a/sdk/python/sdk/zrok/test/test_sparklines_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.sparklines_body import SparklinesBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestSparklinesBody(unittest.TestCase): - """SparklinesBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSparklinesBody(self): - """Test SparklinesBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.sparklines_body.SparklinesBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_token_generate_body.py b/sdk/python/sdk/zrok/test/test_token_generate_body.py deleted file mode 100644 index 990712d1..00000000 --- a/sdk/python/sdk/zrok/test/test_token_generate_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.token_generate_body import TokenGenerateBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestTokenGenerateBody(unittest.TestCase): - """TokenGenerateBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTokenGenerateBody(self): - """Test TokenGenerateBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.token_generate_body.TokenGenerateBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_unaccess_body.py b/sdk/python/sdk/zrok/test/test_unaccess_body.py deleted file mode 100644 index 23e63156..00000000 --- a/sdk/python/sdk/zrok/test/test_unaccess_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.unaccess_body import UnaccessBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestUnaccessBody(unittest.TestCase): - """UnaccessBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUnaccessBody(self): - """Test UnaccessBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.unaccess_body.UnaccessBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_unshare_body.py b/sdk/python/sdk/zrok/test/test_unshare_body.py deleted file mode 100644 index 23236afe..00000000 --- a/sdk/python/sdk/zrok/test/test_unshare_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.unshare_body import UnshareBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestUnshareBody(unittest.TestCase): - """UnshareBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUnshareBody(self): - """Test UnshareBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.unshare_body.UnshareBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_verify_body.py b/sdk/python/sdk/zrok/test/test_verify_body.py deleted file mode 100644 index 9148441b..00000000 --- a/sdk/python/sdk/zrok/test/test_verify_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.verify_body import VerifyBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVerifyBody(unittest.TestCase): - """VerifyBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVerifyBody(self): - """Test VerifyBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.verify_body.VerifyBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version.py b/sdk/python/sdk/zrok/test/test_version.py deleted file mode 100644 index cad9c632..00000000 --- a/sdk/python/sdk/zrok/test/test_version.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.version import Version # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVersion(unittest.TestCase): - """Version unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVersion(self): - """Test Version""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.version.Version() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version_body.py b/sdk/python/sdk/zrok/test/test_version_body.py deleted file mode 100644 index 1c0a1898..00000000 --- a/sdk/python/sdk/zrok/test/test_version_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.version_body import VersionBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVersionBody(unittest.TestCase): - """VersionBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVersionBody(self): - """Test VersionBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.version_body.VersionBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version_check_body.py b/sdk/python/sdk/zrok/test/test_version_check_body.py deleted file mode 100644 index 5ba46b33..00000000 --- a/sdk/python/sdk/zrok/test/test_version_check_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.version_check_body import VersionCheckBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVersionCheckBody(unittest.TestCase): - """VersionCheckBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVersionCheckBody(self): - """Test VersionCheckBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.version_check_body.VersionCheckBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() From e7b4efab8999d96eda5f317a0b9ec76a44612a21 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Mon, 3 Mar 2025 18:23:57 -0500 Subject: [PATCH 16/56] checkpoint --- bin/generate_rest.sh | 19 +++-- sdk/python/sdk/zrok/zrok/environment/root.py | 40 ++++------ sdk/python/sdk/zrok/zrok/share.py | 81 +++++++++++++++++++- 3 files changed, 103 insertions(+), 37 deletions(-) diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index 2905f058..ca197a3a 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -57,17 +57,16 @@ rm -rf sdk/nodejs/sdk/src/api openapi-generator-cli generate -i specs/zrok.yml -o sdk/nodejs/sdk/src/api -g typescript-fetch echo "...generating python sdk client" -# Clean up existing files listed in .openapi-generator/FILES before regeneration -if [ -f sdk/python/sdk/zrok/.openapi-generator/FILES ]; then - while IFS= read -r file; do - if [ -f "sdk/python/sdk/zrok/$file" ]; then - echo "Removing existing file: sdk/python/sdk/zrok/$file" - rm "sdk/python/sdk/zrok/$file" - fi - done < sdk/python/sdk/zrok/.openapi-generator/FILES -fi -# Then remove the tracking file itself +# Delete tracked Python files +while IFS= read -r file; do + if [ -f "sdk/python/sdk/zrok/$file" ]; then + echo "Removing existing file: sdk/python/sdk/zrok/$file" + rm -f "sdk/python/sdk/zrok/$file" + fi +done < sdk/python/sdk/zrok/.openapi-generator/FILES +# Delete the tracking file rm -f sdk/python/sdk/zrok/.openapi-generator/FILES +# Generate and track new files openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/sdk/zrok --package-name zrok_api -g python git checkout rest_server_zrok/configure_zrok.go diff --git a/sdk/python/sdk/zrok/zrok/environment/root.py b/sdk/python/sdk/zrok/zrok/environment/root.py index df76324b..8fb97af6 100644 --- a/sdk/python/sdk/zrok/zrok/environment/root.py +++ b/sdk/python/sdk/zrok/zrok/environment/root.py @@ -5,11 +5,11 @@ import os import json import zrok_api as zrok from zrok_api.configuration import Configuration -from ..api_client_wrapper import ZrokApiClient -import re +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest V = "v1.0" + @dataclass class Metadata: V: str = "" @@ -43,27 +43,25 @@ class Root: def HasConfig(self) -> bool: return self.cfg != Config() - def Client(self) -> ZrokApiClient: + def Client(self) -> zrok.ApiClient: apiEndpoint = self.ApiEndpoint() cfg = Configuration() cfg.host = apiEndpoint[0] + "/api/v1" - cfg.api_key["x-token"] = self.env.Token - cfg.api_key_prefix['Authorization'] = 'Bearer' - - version_check_client = ZrokApiClient(configuration=cfg) - # Perform version check without authentication - self.client_version_check(version_check_client) - # Create a new client with the same configuration for authenticated requests - auth_client = ZrokApiClient(configuration=cfg) - # Explicitly set the x-token header in default_headers to ensure it's used - auth_client.set_default_header('x-token', self.env.Token) + # Update: Configure authentication token + # The token needs to be set with 'key' instead of 'x-token' + # This matches the securityDefinitions in the OpenAPI spec + cfg.api_key["key"] = self.env.Token + + # Create the API client with the configured authentication + auth_client = zrok.ApiClient(configuration=cfg) + self.client_version_check(auth_client) return auth_client def ApiEndpoint(self) -> ApiEndpoint: - apiEndpoint = "https://api.zrok.io" + apiEndpoint = "https://api-v1.zrok.io" frm = "binary" if self.cfg.ApiEndpoint != "": @@ -97,17 +95,10 @@ class Root: """Check if the client version is compatible with the API.""" metadata_api = zrok.MetadataApi(zrock_client) try: - # Create a request with NO authentication for version check - # We'll remove any authentication headers for this initial check - # The client's default_headers might already have x-token, so let's ensure this call doesn't use it - custom_headers = {} - for key, value in zrock_client.default_headers.items(): - if key.lower() != 'x-token': # Skip the auth token header - custom_headers[key] = value - + # Perform version check using the client_version_check method + request = ClientVersionCheckRequest(client_version=V) response = metadata_api.client_version_check_with_http_info( - body={"clientVersion": V}, - _headers=custom_headers # Pass custom headers without auth token + body=request, ) # Check if the response status code is 200 OK @@ -120,6 +111,7 @@ class Root: except Exception as e: raise Exception(f"Client version check failed: {str(e)}") + def Default() -> Root: r = Root() root = rootDir() diff --git a/sdk/python/sdk/zrok/zrok/share.py b/sdk/python/sdk/zrok/zrok/share.py index 4b861bf4..cff52858 100644 --- a/sdk/python/sdk/zrok/zrok/share.py +++ b/sdk/python/sdk/zrok/zrok/share.py @@ -4,6 +4,9 @@ from zrok.environment.root import Root from zrok_api.models.auth_user import AuthUser from zrok_api.models.share_request import ShareRequest from zrok_api.models.unshare_request import UnshareRequest +import json +from zrok_api.exceptions import ApiException +import zrok.model as model class Share(): @@ -55,8 +58,46 @@ def CreateShare(root: Root, request: model.ShareRequest) -> model.Share: zrok = root.Client() except Exception as e: raise Exception("error getting zrok client", e) + try: - res = ShareApi(zrok).share(body=out) + # Use share_with_http_info to get access to the HTTP info and handle custom response format + share_api = ShareApi(zrok) + # Add Accept header to handle the custom content type + custom_headers = { + 'Accept': 'application/json, application/zrok.v1+json' + } + + response_data = share_api.share_with_http_info( + body=out, + _headers=custom_headers + ) + + # Parse response + if hasattr(response_data, 'data') and response_data.data is not None: + res = response_data.data + else: + raise Exception("invalid response from server") + + except ApiException as e: + # If it's a content type error, try to parse the raw JSON + if "Unsupported content type: application/zrok.v1+json" in str(e) and hasattr(e, 'body'): + try: + # Parse the response body directly + res_dict = json.loads(e.body) + # Create a response object with the expected fields + class ShareResponse: + def __init__(self, share_token, frontend_proxy_endpoints): + self.share_token = share_token + self.frontend_proxy_endpoints = frontend_proxy_endpoints + + res = ShareResponse( + share_token=res_dict.get('shareToken', ''), + frontend_proxy_endpoints=res_dict.get('frontendProxyEndpoints', []) + ) + except (json.JSONDecodeError, ValueError, AttributeError) as json_err: + raise Exception(f"unable to parse API response: {str(json_err)}") from e + else: + raise Exception("unable to create share", e) except Exception as e: raise Exception("unable to create share", e) @@ -103,7 +144,24 @@ def DeleteShare(root: Root, shr: model.Share): raise Exception("error getting zrok client", e) try: - ShareApi(zrok).unshare(body=req) + # Add Accept header to handle the custom content type + share_api = ShareApi(zrok) + custom_headers = { + 'Accept': 'application/json, application/zrok.v1+json' + } + + # Use unshare_with_http_info to get access to the HTTP info + share_api.unshare_with_http_info( + body=req, + _headers=custom_headers + ) + except ApiException as e: + # If it's a content type error but the operation was likely successful, don't propagate the error + if "Unsupported content type: application/zrok.v1+json" in str(e) and (200 <= e.status <= 299): + # The operation was likely successful despite the content type error + pass + else: + raise Exception("error deleting share", e) except Exception as e: raise Exception("error deleting share", e) @@ -119,6 +177,23 @@ def ReleaseReservedShare(root: Root, shr: model.Share): raise Exception("error getting zrok client", e) try: - ShareApi(zrok).unshare(body=req) + # Add Accept header to handle the custom content type + share_api = ShareApi(zrok) + custom_headers = { + 'Accept': 'application/json, application/zrok.v1+json' + } + + # Use unshare_with_http_info to get access to the HTTP info + share_api.unshare_with_http_info( + body=req, + _headers=custom_headers + ) + except ApiException as e: + # If it's a content type error but the operation was likely successful, don't propagate the error + if "Unsupported content type: application/zrok.v1+json" in str(e) and (200 <= e.status <= 299): + # The operation was likely successful despite the content type error + pass + else: + raise Exception("error releasing share", e) except Exception as e: raise Exception("error releasing share", e) From 320172e2c912196ac94131c23dee5ae8f1ef3a8e Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 08:20:54 -0500 Subject: [PATCH 17/56] upgrade generator --- .../sdk/zrok/.openapi-generator/VERSION | 2 +- sdk/python/sdk/zrok/README.md | 4 +- sdk/python/sdk/zrok/docs/AccountApi.md | 16 -- sdk/python/sdk/zrok/docs/AdminApi.md | 28 --- sdk/python/sdk/zrok/docs/EnvironmentApi.md | 4 - sdk/python/sdk/zrok/docs/MetadataApi.md | 32 --- sdk/python/sdk/zrok/docs/ShareApi.md | 12 -- sdk/python/sdk/zrok/requirements.txt | 5 +- .../sdk/zrok/zrok_api/api/account_api.py | 32 ++- sdk/python/sdk/zrok/zrok_api/api/admin_api.py | 56 +++-- .../sdk/zrok/zrok_api/api/environment_api.py | 8 +- .../sdk/zrok/zrok_api/api/metadata_api.py | 64 ++++-- sdk/python/sdk/zrok/zrok_api/api/share_api.py | 24 ++- sdk/python/sdk/zrok/zrok_api/api_client.py | 24 ++- sdk/python/sdk/zrok/zrok_api/configuration.py | 195 ++++++++++++++---- sdk/python/sdk/zrok/zrok_api/exceptions.py | 17 ++ .../sdk/zrok/zrok_api/models/environment.py | 6 +- .../models/environment_and_resources.py | 12 +- .../models/get_sparklines200_response.py | 6 +- .../models/list_memberships200_response.py | 6 +- .../list_organization_members200_response.py | 6 +- .../models/list_organizations200_response.py | 6 +- .../sdk/zrok/zrok_api/models/metrics.py | 6 +- .../sdk/zrok/zrok_api/models/overview.py | 6 +- sdk/python/sdk/zrok/zrok_api/models/share.py | 6 +- .../sdk/zrok/zrok_api/models/share_request.py | 6 +- sdk/python/sdk/zrok/zrok_api/rest.py | 3 +- 27 files changed, 374 insertions(+), 218 deletions(-) diff --git a/sdk/python/sdk/zrok/.openapi-generator/VERSION b/sdk/python/sdk/zrok/.openapi-generator/VERSION index 1985849f..5f84a81d 100644 --- a/sdk/python/sdk/zrok/.openapi-generator/VERSION +++ b/sdk/python/sdk/zrok/.openapi-generator/VERSION @@ -1 +1 @@ -7.7.0 +7.12.0 diff --git a/sdk/python/sdk/zrok/README.md b/sdk/python/sdk/zrok/README.md index 7aa7d41a..98956302 100644 --- a/sdk/python/sdk/zrok/README.md +++ b/sdk/python/sdk/zrok/README.md @@ -5,12 +5,12 @@ This Python package is automatically generated by the [OpenAPI Generator](https: - API version: 1.0.0 - Package version: 1.0.0 -- Generator version: 7.7.0 +- Generator version: 7.12.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. -Python 3.7+ +Python 3.8+ ## Installation & Usage ### pip install diff --git a/sdk/python/sdk/zrok/docs/AccountApi.md b/sdk/python/sdk/zrok/docs/AccountApi.md index 669bfbc6..cb6a3e97 100644 --- a/sdk/python/sdk/zrok/docs/AccountApi.md +++ b/sdk/python/sdk/zrok/docs/AccountApi.md @@ -17,8 +17,6 @@ Method | HTTP request | Description # **change_password** > change_password(body=body) - - ### Example * Api Key Authentication (key): @@ -95,8 +93,6 @@ void (empty response body) # **invite** > invite(body=body) - - ### Example @@ -161,8 +157,6 @@ No authorization required # **login** > str login(body=body) - - ### Example @@ -227,8 +221,6 @@ No authorization required # **regenerate_account_token** > RegenerateAccountToken200Response regenerate_account_token(body=body) - - ### Example * Api Key Authentication (key): @@ -306,8 +298,6 @@ Name | Type | Description | Notes # **register** > RegenerateAccountToken200Response register(body=body) - - ### Example @@ -375,8 +365,6 @@ No authorization required # **reset_password** > reset_password(body=body) - - ### Example @@ -441,8 +429,6 @@ No authorization required # **reset_password_request** > reset_password_request(body=body) - - ### Example @@ -506,8 +492,6 @@ No authorization required # **verify** > Verify200Response verify(body=body) - - ### Example diff --git a/sdk/python/sdk/zrok/docs/AdminApi.md b/sdk/python/sdk/zrok/docs/AdminApi.md index 153aa3ea..7eec6028 100644 --- a/sdk/python/sdk/zrok/docs/AdminApi.md +++ b/sdk/python/sdk/zrok/docs/AdminApi.md @@ -23,8 +23,6 @@ Method | HTTP request | Description # **add_organization_member** > add_organization_member(body=body) - - ### Example * Api Key Authentication (key): @@ -100,8 +98,6 @@ void (empty response body) # **create_account** > RegenerateAccountToken200Response create_account(body=body) - - ### Example * Api Key Authentication (key): @@ -179,8 +175,6 @@ Name | Type | Description | Notes # **create_frontend** > CreateFrontend201Response create_frontend(body=body) - - ### Example * Api Key Authentication (key): @@ -260,8 +254,6 @@ Name | Type | Description | Notes # **create_identity** > CreateIdentity201Response create_identity(body=body) - - ### Example * Api Key Authentication (key): @@ -339,8 +331,6 @@ Name | Type | Description | Notes # **create_organization** > CreateOrganization201Response create_organization(body=body) - - ### Example * Api Key Authentication (key): @@ -418,8 +408,6 @@ Name | Type | Description | Notes # **delete_frontend** > delete_frontend(body=body) - - ### Example * Api Key Authentication (key): @@ -495,8 +483,6 @@ void (empty response body) # **delete_organization** > delete_organization(body=body) - - ### Example * Api Key Authentication (key): @@ -572,8 +558,6 @@ void (empty response body) # **grants** > grants(body=body) - - ### Example * Api Key Authentication (key): @@ -649,8 +633,6 @@ void (empty response body) # **invite_token_generate** > invite_token_generate(body=body) - - ### Example * Api Key Authentication (key): @@ -726,8 +708,6 @@ void (empty response body) # **list_frontends** > List[ListFrontends200ResponseInner] list_frontends() - - ### Example * Api Key Authentication (key): @@ -800,8 +780,6 @@ This endpoint does not need any parameter. # **list_organization_members** > ListOrganizationMembers200Response list_organization_members(body=body) - - ### Example * Api Key Authentication (key): @@ -880,8 +858,6 @@ Name | Type | Description | Notes # **list_organizations** > ListOrganizations200Response list_organizations() - - ### Example * Api Key Authentication (key): @@ -954,8 +930,6 @@ This endpoint does not need any parameter. # **remove_organization_member** > remove_organization_member(body=body) - - ### Example * Api Key Authentication (key): @@ -1031,8 +1005,6 @@ void (empty response body) # **update_frontend** > update_frontend(body=body) - - ### Example * Api Key Authentication (key): diff --git a/sdk/python/sdk/zrok/docs/EnvironmentApi.md b/sdk/python/sdk/zrok/docs/EnvironmentApi.md index b55009de..a50ae1d3 100644 --- a/sdk/python/sdk/zrok/docs/EnvironmentApi.md +++ b/sdk/python/sdk/zrok/docs/EnvironmentApi.md @@ -11,8 +11,6 @@ Method | HTTP request | Description # **disable** > disable(body=body) - - ### Example * Api Key Authentication (key): @@ -87,8 +85,6 @@ void (empty response body) # **enable** > CreateIdentity201Response enable(body=body) - - ### Example * Api Key Authentication (key): diff --git a/sdk/python/sdk/zrok/docs/MetadataApi.md b/sdk/python/sdk/zrok/docs/MetadataApi.md index 22c06b51..ecb0cf8b 100644 --- a/sdk/python/sdk/zrok/docs/MetadataApi.md +++ b/sdk/python/sdk/zrok/docs/MetadataApi.md @@ -25,8 +25,6 @@ Method | HTTP request | Description # **client_version_check** > client_version_check(body=body) - - ### Example @@ -89,8 +87,6 @@ No authorization required # **configuration** > Configuration configuration() - - ### Example @@ -150,8 +146,6 @@ No authorization required # **get_account_detail** > List[Environment] get_account_detail() - - ### Example * Api Key Authentication (key): @@ -223,8 +217,6 @@ This endpoint does not need any parameter. # **get_account_metrics** > Metrics get_account_metrics(duration=duration) - - ### Example * Api Key Authentication (key): @@ -301,8 +293,6 @@ Name | Type | Description | Notes # **get_environment_detail** > EnvironmentAndResources get_environment_detail(env_zid) - - ### Example * Api Key Authentication (key): @@ -380,8 +370,6 @@ Name | Type | Description | Notes # **get_environment_metrics** > Metrics get_environment_metrics(env_id, duration=duration) - - ### Example * Api Key Authentication (key): @@ -461,8 +449,6 @@ Name | Type | Description | Notes # **get_frontend_detail** > Frontend get_frontend_detail(frontend_id) - - ### Example * Api Key Authentication (key): @@ -540,8 +526,6 @@ Name | Type | Description | Notes # **get_share_detail** > Share get_share_detail(share_token) - - ### Example * Api Key Authentication (key): @@ -619,8 +603,6 @@ Name | Type | Description | Notes # **get_share_metrics** > Metrics get_share_metrics(share_token, duration=duration) - - ### Example * Api Key Authentication (key): @@ -700,8 +682,6 @@ Name | Type | Description | Notes # **get_sparklines** > GetSparklines200Response get_sparklines(body=body) - - ### Example * Api Key Authentication (key): @@ -779,8 +759,6 @@ Name | Type | Description | Notes # **list_memberships** > ListMemberships200Response list_memberships() - - ### Example * Api Key Authentication (key): @@ -852,8 +830,6 @@ This endpoint does not need any parameter. # **list_org_members** > ListOrganizationMembers200Response list_org_members(organization_token) - - ### Example * Api Key Authentication (key): @@ -930,8 +906,6 @@ Name | Type | Description | Notes # **org_account_overview** > Overview org_account_overview(organization_token, account_email) - - ### Example * Api Key Authentication (key): @@ -1010,8 +984,6 @@ Name | Type | Description | Notes # **overview** > Overview overview() - - ### Example * Api Key Authentication (key): @@ -1083,8 +1055,6 @@ This endpoint does not need any parameter. # **version** > str version() - - ### Example @@ -1143,8 +1113,6 @@ No authorization required # **version_inventory** > VersionInventory200Response version_inventory() - - ### Example diff --git a/sdk/python/sdk/zrok/docs/ShareApi.md b/sdk/python/sdk/zrok/docs/ShareApi.md index 244b6f11..2831f1d2 100644 --- a/sdk/python/sdk/zrok/docs/ShareApi.md +++ b/sdk/python/sdk/zrok/docs/ShareApi.md @@ -15,8 +15,6 @@ Method | HTTP request | Description # **access** > Access201Response access(body=body) - - ### Example * Api Key Authentication (key): @@ -95,8 +93,6 @@ Name | Type | Description | Notes # **share** > ShareResponse share(body=body) - - ### Example * Api Key Authentication (key): @@ -177,8 +173,6 @@ Name | Type | Description | Notes # **unaccess** > unaccess(body=body) - - ### Example * Api Key Authentication (key): @@ -254,8 +248,6 @@ void (empty response body) # **unshare** > unshare(body=body) - - ### Example * Api Key Authentication (key): @@ -331,8 +323,6 @@ void (empty response body) # **update_access** > update_access(body=body) - - ### Example * Api Key Authentication (key): @@ -408,8 +398,6 @@ void (empty response body) # **update_share** > update_share(body=body) - - ### Example * Api Key Authentication (key): diff --git a/sdk/python/sdk/zrok/requirements.txt b/sdk/python/sdk/zrok/requirements.txt index cc85509e..67f7f68d 100644 --- a/sdk/python/sdk/zrok/requirements.txt +++ b/sdk/python/sdk/zrok/requirements.txt @@ -1,5 +1,4 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3, < 2.1.0 +urllib3 >= 1.25.3, < 3.0.0 +python_dateutil >= 2.8.2 pydantic >= 2 typing-extensions >= 4.7.1 diff --git a/sdk/python/sdk/zrok/zrok_api/api/account_api.py b/sdk/python/sdk/zrok/zrok_api/api/account_api.py index 7565f4a7..d6a93a82 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/account_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/account_api.py @@ -270,7 +270,9 @@ class AccountApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -548,7 +550,9 @@ class AccountApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -819,7 +823,9 @@ class AccountApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1093,7 +1099,9 @@ class AccountApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1371,7 +1379,9 @@ class AccountApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1648,7 +1658,9 @@ class AccountApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1922,7 +1934,9 @@ class AccountApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2189,7 +2203,9 @@ class AccountApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py index d99d3d3b..6e0952fe 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py @@ -273,7 +273,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -541,7 +543,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -822,7 +826,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1097,7 +1103,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1372,7 +1380,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1650,7 +1660,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1921,7 +1933,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2192,7 +2206,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2463,7 +2479,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2718,7 +2736,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2981,7 +3001,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3243,7 +3265,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3506,7 +3530,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3777,7 +3803,9 @@ class AdminApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py b/sdk/python/sdk/zrok/zrok_api/api/environment_api.py index ded46760..4495d736 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/environment_api.py @@ -257,7 +257,9 @@ class EnvironmentApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -528,7 +530,9 @@ class EnvironmentApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py index 8ade5b51..ae780e05 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py @@ -265,7 +265,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -520,7 +522,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -763,7 +767,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1023,7 +1029,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1290,7 +1298,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1568,7 +1578,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1837,7 +1849,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2102,7 +2116,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2380,7 +2396,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2646,7 +2664,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2905,7 +2925,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3165,7 +3187,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3440,7 +3464,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3688,7 +3714,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3929,7 +3957,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4169,7 +4199,9 @@ class MetadataApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/sdk/python/sdk/zrok/zrok_api/api/share_api.py b/sdk/python/sdk/zrok/zrok_api/api/share_api.py index 955ca11b..626035ee 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/share_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/share_api.py @@ -265,7 +265,9 @@ class ShareApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -549,7 +551,9 @@ class ShareApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -827,7 +831,9 @@ class ShareApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1098,7 +1104,9 @@ class ShareApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1376,7 +1384,9 @@ class ShareApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1650,7 +1660,9 @@ class ShareApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/sdk/python/sdk/zrok/zrok_api/api_client.py b/sdk/python/sdk/zrok/zrok_api/api_client.py index a9d8285f..7b417812 100644 --- a/sdk/python/sdk/zrok/zrok_api/api_client.py +++ b/sdk/python/sdk/zrok/zrok_api/api_client.py @@ -15,6 +15,7 @@ import datetime from dateutil.parser import parse from enum import Enum +import decimal import json import mimetypes import os @@ -66,6 +67,7 @@ class ApiClient: 'bool': bool, 'date': datetime.date, 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, 'object': object, } _pool = None @@ -338,6 +340,7 @@ class ApiClient: If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. @@ -363,6 +366,8 @@ class ApiClient: ) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) elif isinstance(obj, dict): obj_dict = obj @@ -399,12 +404,12 @@ class ApiClient: data = json.loads(response_text) except ValueError: data = response_text - elif content_type.startswith("application/json"): + elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): if response_text == "": data = "" else: data = json.loads(response_text) - elif content_type.startswith("text/plain"): + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): data = response_text else: raise ApiException( @@ -454,6 +459,8 @@ class ApiClient: return self.__deserialize_date(data) elif klass == datetime.datetime: return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) elif issubclass(klass, Enum): return self.__deserialize_enum(data, klass) else: @@ -510,7 +517,7 @@ class ApiClient: if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': - new_params.extend((k, str(value)) for value in v) + new_params.extend((k, quote(str(value))) for value in v) else: if collection_format == 'ssv': delimiter = ' ' @@ -528,7 +535,10 @@ class ApiClient: return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files: Dict[str, Union[str, bytes]]): + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): """Builds form parameters. :param files: File parameters. @@ -543,6 +553,12 @@ class ApiClient: elif isinstance(v, bytes): filename = k filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue else: raise ValueError("Unsupported file value") mimetype = ( diff --git a/sdk/python/sdk/zrok/zrok_api/configuration.py b/sdk/python/sdk/zrok/zrok_api/configuration.py index 868ba242..d504babc 100644 --- a/sdk/python/sdk/zrok/zrok_api/configuration.py +++ b/sdk/python/sdk/zrok/zrok_api/configuration.py @@ -13,14 +13,16 @@ import copy +import http.client as httplib import logging from logging import FileHandler import multiprocessing import sys -from typing import Optional +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + import urllib3 -import http.client as httplib JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', @@ -28,6 +30,107 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = { 'minLength', 'pattern', 'maxItems', 'minItems' } +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "key": APIKeyAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + class Configuration: """This class contains various settings of the API client. @@ -58,6 +161,8 @@ class Configuration: :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format. :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. :Example: @@ -81,20 +186,27 @@ conf = zrok_api.Configuration( Cookie: JSESSIONID abc123 """ - _default = None + _default: ClassVar[Optional[Self]] = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ignore_operation_servers=False, - ssl_ca_cert=None, - retries=None, - *, - debug: Optional[bool] = None - ) -> None: + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + *, + debug: Optional[bool] = None, + ) -> None: """Constructor """ self._base_path = "/api/v1" if host is None else host @@ -169,6 +281,10 @@ conf = zrok_api.Configuration( self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ self.cert_file = None """client certificate file """ @@ -218,7 +334,7 @@ conf = zrok_api.Configuration( """date format """ - def __deepcopy__(self, memo): + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result @@ -232,11 +348,11 @@ conf = zrok_api.Configuration( result.debug = self.debug return result - def __setattr__(self, name, value): + def __setattr__(self, name: str, value: Any) -> None: object.__setattr__(self, name, value) @classmethod - def set_default(cls, default): + def set_default(cls, default: Optional[Self]) -> None: """Set default instance of configuration. It stores default configuration, which can be @@ -247,7 +363,7 @@ conf = zrok_api.Configuration( cls._default = default @classmethod - def get_default_copy(cls): + def get_default_copy(cls) -> Self: """Deprecated. Please use `get_default` instead. Deprecated. Please use `get_default` instead. @@ -257,7 +373,7 @@ conf = zrok_api.Configuration( return cls.get_default() @classmethod - def get_default(cls): + def get_default(cls) -> Self: """Return the default configuration. This method returns newly created, based on default constructor, @@ -267,11 +383,11 @@ conf = zrok_api.Configuration( :return: The configuration object. """ if cls._default is None: - cls._default = Configuration() + cls._default = cls() return cls._default @property - def logger_file(self): + def logger_file(self) -> Optional[str]: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -283,7 +399,7 @@ conf = zrok_api.Configuration( return self.__logger_file @logger_file.setter - def logger_file(self, value): + def logger_file(self, value: Optional[str]) -> None: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -302,7 +418,7 @@ conf = zrok_api.Configuration( logger.addHandler(self.logger_file_handler) @property - def debug(self): + def debug(self) -> bool: """Debug status :param value: The debug status, True or False. @@ -311,7 +427,7 @@ conf = zrok_api.Configuration( return self.__debug @debug.setter - def debug(self, value): + def debug(self, value: bool) -> None: """Debug status :param value: The debug status, True or False. @@ -333,7 +449,7 @@ conf = zrok_api.Configuration( httplib.HTTPConnection.debuglevel = 0 @property - def logger_format(self): + def logger_format(self) -> str: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -344,7 +460,7 @@ conf = zrok_api.Configuration( return self.__logger_format @logger_format.setter - def logger_format(self, value): + def logger_format(self, value: str) -> None: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -355,7 +471,7 @@ conf = zrok_api.Configuration( self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier, alias=None): + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -372,7 +488,9 @@ conf = zrok_api.Configuration( else: return key - def get_basic_auth_token(self): + return None + + def get_basic_auth_token(self) -> Optional[str]: """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. @@ -387,12 +505,12 @@ conf = zrok_api.Configuration( basic_auth=username + ':' + password ).get('authorization') - def auth_settings(self): + def auth_settings(self)-> AuthSettings: """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ - auth = {} + auth: AuthSettings = {} if 'key' in self.api_key: auth['key'] = { 'type': 'api_key', @@ -404,7 +522,7 @@ conf = zrok_api.Configuration( } return auth - def to_debug_report(self): + def to_debug_report(self) -> str: """Gets the essential information for debugging. :return: The report for debugging. @@ -416,7 +534,7 @@ conf = zrok_api.Configuration( "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) - def get_host_settings(self): + def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings :return: An array of host settings @@ -428,7 +546,12 @@ conf = zrok_api.Configuration( } ] - def get_host_from_settings(self, index, variables=None, servers=None): + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -468,12 +591,12 @@ conf = zrok_api.Configuration( return url @property - def host(self): + def host(self) -> str: """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter - def host(self, value): + def host(self, value: str) -> None: """Fix base path.""" self._base_path = value self.server_index = None diff --git a/sdk/python/sdk/zrok/zrok_api/exceptions.py b/sdk/python/sdk/zrok/zrok_api/exceptions.py index 999f4d6c..1b37d862 100644 --- a/sdk/python/sdk/zrok/zrok_api/exceptions.py +++ b/sdk/python/sdk/zrok/zrok_api/exceptions.py @@ -150,6 +150,13 @@ class ApiException(OpenApiException): if http_resp.status == 404: raise NotFoundException(http_resp=http_resp, body=body, data=data) + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + if 500 <= http_resp.status <= 599: raise ServiceException(http_resp=http_resp, body=body, data=data) raise ApiException(http_resp=http_resp, body=body, data=data) @@ -188,6 +195,16 @@ class ServiceException(ApiException): pass +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment.py b/sdk/python/sdk/zrok/zrok_api/models/environment.py index 7f6bd2f7..063ff59e 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/environment.py +++ b/sdk/python/sdk/zrok/zrok_api/models/environment.py @@ -79,9 +79,9 @@ class Environment(BaseModel): # override the default output from pydantic by calling `to_dict()` of each item in activity (list) _items = [] if self.activity: - for _item in self.activity: - if _item: - _items.append(_item.to_dict()) + for _item_activity in self.activity: + if _item_activity: + _items.append(_item_activity.to_dict()) _dict['activity'] = _items return _dict diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py b/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py index 9c1608fe..65e4f257 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py +++ b/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py @@ -79,16 +79,16 @@ class EnvironmentAndResources(BaseModel): # override the default output from pydantic by calling `to_dict()` of each item in frontends (list) _items = [] if self.frontends: - for _item in self.frontends: - if _item: - _items.append(_item.to_dict()) + for _item_frontends in self.frontends: + if _item_frontends: + _items.append(_item_frontends.to_dict()) _dict['frontends'] = _items # override the default output from pydantic by calling `to_dict()` of each item in shares (list) _items = [] if self.shares: - for _item in self.shares: - if _item: - _items.append(_item.to_dict()) + for _item_shares in self.shares: + if _item_shares: + _items.append(_item_shares.to_dict()) _dict['shares'] = _items return _dict diff --git a/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py index e2847c98..177b0efa 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py +++ b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py @@ -72,9 +72,9 @@ class GetSparklines200Response(BaseModel): # override the default output from pydantic by calling `to_dict()` of each item in sparklines (list) _items = [] if self.sparklines: - for _item in self.sparklines: - if _item: - _items.append(_item.to_dict()) + for _item_sparklines in self.sparklines: + if _item_sparklines: + _items.append(_item_sparklines.to_dict()) _dict['sparklines'] = _items return _dict diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py index cef5e9f1..f3db8fa7 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py +++ b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py @@ -72,9 +72,9 @@ class ListMemberships200Response(BaseModel): # override the default output from pydantic by calling `to_dict()` of each item in memberships (list) _items = [] if self.memberships: - for _item in self.memberships: - if _item: - _items.append(_item.to_dict()) + for _item_memberships in self.memberships: + if _item_memberships: + _items.append(_item_memberships.to_dict()) _dict['memberships'] = _items return _dict diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py index c233d717..6058124c 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py +++ b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py @@ -72,9 +72,9 @@ class ListOrganizationMembers200Response(BaseModel): # override the default output from pydantic by calling `to_dict()` of each item in members (list) _items = [] if self.members: - for _item in self.members: - if _item: - _items.append(_item.to_dict()) + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) _dict['members'] = _items return _dict diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py index 34b9a19c..03fe63da 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py +++ b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py @@ -72,9 +72,9 @@ class ListOrganizations200Response(BaseModel): # 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()) + for _item_organizations in self.organizations: + if _item_organizations: + _items.append(_item_organizations.to_dict()) _dict['organizations'] = _items return _dict diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics.py b/sdk/python/sdk/zrok/zrok_api/models/metrics.py index c3d91c23..40db696c 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/metrics.py +++ b/sdk/python/sdk/zrok/zrok_api/models/metrics.py @@ -75,9 +75,9 @@ class Metrics(BaseModel): # override the default output from pydantic by calling `to_dict()` of each item in samples (list) _items = [] if self.samples: - for _item in self.samples: - if _item: - _items.append(_item.to_dict()) + for _item_samples in self.samples: + if _item_samples: + _items.append(_item_samples.to_dict()) _dict['samples'] = _items return _dict diff --git a/sdk/python/sdk/zrok/zrok_api/models/overview.py b/sdk/python/sdk/zrok/zrok_api/models/overview.py index 80af2b23..2feb65cc 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/overview.py +++ b/sdk/python/sdk/zrok/zrok_api/models/overview.py @@ -73,9 +73,9 @@ class Overview(BaseModel): # override the default output from pydantic by calling `to_dict()` of each item in environments (list) _items = [] if self.environments: - for _item in self.environments: - if _item: - _items.append(_item.to_dict()) + for _item_environments in self.environments: + if _item_environments: + _items.append(_item_environments.to_dict()) _dict['environments'] = _items return _dict diff --git a/sdk/python/sdk/zrok/zrok_api/models/share.py b/sdk/python/sdk/zrok/zrok_api/models/share.py index 76a63e37..aaf72fb8 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share.py @@ -83,9 +83,9 @@ class Share(BaseModel): # override the default output from pydantic by calling `to_dict()` of each item in activity (list) _items = [] if self.activity: - for _item in self.activity: - if _item: - _items.append(_item.to_dict()) + for _item_activity in self.activity: + if _item_activity: + _items.append(_item_activity.to_dict()) _dict['activity'] = _items return _dict diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_request.py b/sdk/python/sdk/zrok/zrok_api/models/share_request.py index f29b9c89..7ea8d828 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/share_request.py +++ b/sdk/python/sdk/zrok/zrok_api/models/share_request.py @@ -125,9 +125,9 @@ class ShareRequest(BaseModel): # override the default output from pydantic by calling `to_dict()` of each item in auth_users (list) _items = [] if self.auth_users: - for _item in self.auth_users: - if _item: - _items.append(_item.to_dict()) + for _item_auth_users in self.auth_users: + if _item_auth_users: + _items.append(_item_auth_users.to_dict()) _dict['authUsers'] = _items return _dict diff --git a/sdk/python/sdk/zrok/zrok_api/rest.py b/sdk/python/sdk/zrok/zrok_api/rest.py index 1d80eeba..f09faee7 100644 --- a/sdk/python/sdk/zrok/zrok_api/rest.py +++ b/sdk/python/sdk/zrok/zrok_api/rest.py @@ -76,6 +76,7 @@ class RESTClientObject: "ca_certs": configuration.ssl_ca_cert, "cert_file": configuration.cert_file, "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, } if configuration.assert_hostname is not None: pool_args['assert_hostname'] = ( @@ -225,7 +226,7 @@ class RESTClientObject: headers=headers, preload_content=False ) - elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): request_body = "true" if body else "false" r = self.pool_manager.request( method, From 294397dd9cf0abc9fa42c7bfec7653808ad2ecaf Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 12:30:54 -0500 Subject: [PATCH 18/56] fix wrapper params --- sdk/python/sdk/zrok/zrok/access.py | 4 ++-- sdk/python/sdk/zrok/zrok/share.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/python/sdk/zrok/zrok/access.py b/sdk/python/sdk/zrok/zrok/access.py index 8c91e869..60f2dfd2 100644 --- a/sdk/python/sdk/zrok/zrok/access.py +++ b/sdk/python/sdk/zrok/zrok/access.py @@ -26,7 +26,7 @@ def CreateAccess(root: Root, request: model.AccessRequest) -> model.Access: if not root.IsEnabled(): raise Exception("environment is not enabled; enable with 'zrok enable' first!") - out = AccessRequest(shr_token=request.ShareToken, + out = AccessRequest(share_token=request.ShareToken, env_zid=root.env.ZitiIdentity) try: @@ -44,7 +44,7 @@ def CreateAccess(root: Root, request: model.AccessRequest) -> model.Access: def DeleteAccess(root: Root, acc: model.Access): req = UnaccessRequest(frontend_token=acc.Token, - shr_token=acc.ShareToken, + share_token=acc.ShareToken, env_zid=root.env.ZitiIdentity) try: diff --git a/sdk/python/sdk/zrok/zrok/share.py b/sdk/python/sdk/zrok/zrok/share.py index cff52858..509e234d 100644 --- a/sdk/python/sdk/zrok/zrok/share.py +++ b/sdk/python/sdk/zrok/zrok/share.py @@ -136,7 +136,7 @@ def __newPublicShare(root: Root, request: model.ShareRequest) -> ShareRequest: def DeleteShare(root: Root, shr: model.Share): req = UnshareRequest(env_zid=root.env.ZitiIdentity, - shr_token=shr.Token) + share_token=shr.Token) try: zrok = root.Client() @@ -168,7 +168,7 @@ def DeleteShare(root: Root, shr: model.Share): def ReleaseReservedShare(root: Root, shr: model.Share): req = UnshareRequest(env_zid=root.env.ZitiIdentity, - shr_token=shr.Token, + share_token=shr.Token, reserved=True) try: From a0654aa2a23b1683ca918e45d970f3ceb50348b8 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 12:59:56 -0500 Subject: [PATCH 19/56] minimize deps --- bin/generate_rest.sh | 2 +- sdk/python/sdk/zrok/README.md | 2 +- sdk/python/sdk/zrok/setup.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index ca197a3a..10e07755 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -67,6 +67,6 @@ done < sdk/python/sdk/zrok/.openapi-generator/FILES # Delete the tracking file rm -f sdk/python/sdk/zrok/.openapi-generator/FILES # Generate and track new files -openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/sdk/zrok --package-name zrok_api -g python +openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/sdk/zrok --package-name zrok_api --additional-properties projectName=zrok -g python git checkout rest_server_zrok/configure_zrok.go diff --git a/sdk/python/sdk/zrok/README.md b/sdk/python/sdk/zrok/README.md index 98956302..25ad2fe6 100644 --- a/sdk/python/sdk/zrok/README.md +++ b/sdk/python/sdk/zrok/README.md @@ -1,4 +1,4 @@ -# zrok-api +# zrok zrok client access This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/sdk/python/sdk/zrok/setup.py b/sdk/python/sdk/zrok/setup.py index a58ce211..1d85db8d 100644 --- a/sdk/python/sdk/zrok/setup.py +++ b/sdk/python/sdk/zrok/setup.py @@ -12,7 +12,8 @@ VERSION = "1.0.0" # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil", "openziti >= 1.0.0"] +# urllib3 2.1.0 introduced breaking changes that are implemented by openapi-generator 7.12.0 +REQUIRES = ["openziti >= 1.0.0", "urllib3 >= 2.1.0" ] setup( name=NAME, @@ -21,7 +22,7 @@ setup( description="zrok", author_email="", url="", - keywords=["Swagger", "zrok"], + keywords=["zrok"], install_requires=REQUIRES, python_requires='>3.10.0', packages=find_packages(), From 2752e68f0a8e51ce7a8b1c13b360ac8c388e7e98 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 14:08:22 -0500 Subject: [PATCH 20/56] reflect generated client deps in module setup --- sdk/python/sdk/zrok/setup.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sdk/python/sdk/zrok/setup.py b/sdk/python/sdk/zrok/setup.py index 1d85db8d..93b095f4 100644 --- a/sdk/python/sdk/zrok/setup.py +++ b/sdk/python/sdk/zrok/setup.py @@ -5,15 +5,13 @@ import versioneer # optionally upload to TestPyPi with alternative name in testing repo NAME = os.getenv('ZROK_PY_NAME', "zrok") VERSION = "1.0.0" -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -# urllib3 2.1.0 introduced breaking changes that are implemented by openapi-generator 7.12.0 -REQUIRES = ["openziti >= 1.0.0", "urllib3 >= 2.1.0" ] +REQUIRES = [ + "openziti >= 1.0.0", + "urllib3 >= 2.1.0", # urllib3 2.1.0 introduced breaking changes that are implemented by openapi-generator 7.12.0 + "python_dateutil >= 2.8.2", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] setup( name=NAME, From 153dead44a6c4fc9e0dc9d10c798c5d590fe6fec Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 14:25:38 -0500 Subject: [PATCH 21/56] use generated requirements --- sdk/python/sdk/zrok/setup.py | 47 ++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/sdk/python/sdk/zrok/setup.py b/sdk/python/sdk/zrok/setup.py index 93b095f4..b0804965 100644 --- a/sdk/python/sdk/zrok/setup.py +++ b/sdk/python/sdk/zrok/setup.py @@ -1,17 +1,45 @@ from setuptools import setup, find_packages # noqa: H301 import os import versioneer +from pathlib import Path +import re -# optionally upload to TestPyPi with alternative name in testing repo NAME = os.getenv('ZROK_PY_NAME', "zrok") VERSION = "1.0.0" -REQUIRES = [ - "openziti >= 1.0.0", - "urllib3 >= 2.1.0", # urllib3 2.1.0 introduced breaking changes that are implemented by openapi-generator 7.12.0 - "python_dateutil >= 2.8.2", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] + +# Define your package overrides here - these take precedence over the generated requirements.txt +OVERRIDES = { + # Override specific packages with version constraints different from the generated requirements.txt + "openziti": "openziti >= 1.0.0", + "urllib3": "urllib3 >= 2.1.0", # urllib3 2.1.0 introduced breaking changes that are implemented by openapi-generator 7.12.0 +} + +# Parse the generated requirements.txt +def parse_requirements(filename): + requirements = [] + if not Path(filename).exists(): + return requirements + + with open(filename, 'r') as f: + for line in f: + line = line.strip() + if not line or line.startswith('#'): + continue + + # Extract package name (everything before any version specifier) + package_name = re.split(r'[<>=~]', line)[0].strip() + + # If we have an override for this package, skip it + if package_name in OVERRIDES: + continue + + requirements.append(line) + + return requirements + +# Combine requirements from requirements.txt and overrides +requirements_file = Path(__file__).parent / "requirements.txt" +REQUIRES = parse_requirements(requirements_file) + list(OVERRIDES.values()) setup( name=NAME, @@ -25,6 +53,9 @@ setup( python_requires='>3.10.0', packages=find_packages(), include_package_data=True, + package_data={ + '': ['requirements.txt'], # Include the generated requirements.txt in the package + }, long_description="""\ Geo-scale, next-generation peer-to-peer sharing platform built on top of OpenZiti. """ From bf0db4a21ea2e7d21bd265ae5563ca018afc379f Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 14:27:39 -0500 Subject: [PATCH 22/56] minimize flask server deps --- sdk/python/examples/http-server/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/python/examples/http-server/requirements.txt b/sdk/python/examples/http-server/requirements.txt index 23ab2518..0c7f5853 100644 --- a/sdk/python/examples/http-server/requirements.txt +++ b/sdk/python/examples/http-server/requirements.txt @@ -1,3 +1,3 @@ -Flask==3.0.0 -waitress==2.1.2 -zrok \ No newline at end of file +zrok +flask +waitress \ No newline at end of file From ae7fd48be5afaaea609b1415a8686cacb6d1f65f Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 14:51:55 -0500 Subject: [PATCH 23/56] remove the generated py client, docs, test, etc. --- sdk/python/sdk/zrok/.gitignore | 66 - sdk/python/sdk/zrok/README.md | 215 - sdk/python/sdk/zrok/docs/Access201Response.md | 30 - sdk/python/sdk/zrok/docs/AccessRequest.md | 32 - sdk/python/sdk/zrok/docs/AccountApi.md | 557 --- .../zrok/docs/AddOrganizationMemberRequest.md | 31 - sdk/python/sdk/zrok/docs/AdminApi.md | 1079 ----- sdk/python/sdk/zrok/docs/AuthUser.md | 30 - .../sdk/zrok/docs/ChangePasswordRequest.md | 31 - .../zrok/docs/ClientVersionCheckRequest.md | 29 - sdk/python/sdk/zrok/docs/Configuration.md | 33 - .../zrok/docs/CreateFrontend201Response.md | 29 - .../sdk/zrok/docs/CreateFrontendRequest.md | 32 - .../zrok/docs/CreateIdentity201Response.md | 30 - .../sdk/zrok/docs/CreateIdentityRequest.md | 29 - .../docs/CreateOrganization201Response.md | 29 - .../zrok/docs/CreateOrganizationRequest.md | 29 - sdk/python/sdk/zrok/docs/DisableRequest.md | 29 - sdk/python/sdk/zrok/docs/EnableRequest.md | 30 - sdk/python/sdk/zrok/docs/Environment.md | 36 - .../sdk/zrok/docs/EnvironmentAndResources.md | 31 - sdk/python/sdk/zrok/docs/EnvironmentApi.md | 162 - sdk/python/sdk/zrok/docs/Frontend.md | 37 - .../sdk/zrok/docs/GetSparklines200Response.md | 29 - .../sdk/zrok/docs/GetSparklinesRequest.md | 31 - sdk/python/sdk/zrok/docs/InviteRequest.md | 30 - .../zrok/docs/InviteTokenGenerateRequest.md | 29 - .../docs/ListFrontends200ResponseInner.md | 34 - .../zrok/docs/ListMemberships200Response.md | 29 - ...tMemberships200ResponseMembershipsInner.md | 31 - .../ListOrganizationMembers200Response.md | 29 - ...anizationMembers200ResponseMembersInner.md | 30 - .../zrok/docs/ListOrganizations200Response.md | 29 - ...anizations200ResponseOrganizationsInner.md | 30 - sdk/python/sdk/zrok/docs/LoginRequest.md | 30 - sdk/python/sdk/zrok/docs/MetadataApi.md | 1171 ----- sdk/python/sdk/zrok/docs/Metrics.md | 32 - sdk/python/sdk/zrok/docs/MetricsSample.md | 31 - sdk/python/sdk/zrok/docs/Overview.md | 30 - sdk/python/sdk/zrok/docs/Principal.md | 33 - .../docs/RegenerateAccountToken200Response.md | 29 - .../docs/RegenerateAccountTokenRequest.md | 29 - sdk/python/sdk/zrok/docs/RegisterRequest.md | 30 - .../docs/RemoveOrganizationMemberRequest.md | 30 - .../sdk/zrok/docs/ResetPasswordRequest.md | 30 - sdk/python/sdk/zrok/docs/Share.md | 40 - sdk/python/sdk/zrok/docs/ShareApi.md | 473 -- sdk/python/sdk/zrok/docs/ShareRequest.md | 42 - sdk/python/sdk/zrok/docs/ShareResponse.md | 30 - sdk/python/sdk/zrok/docs/SparkDataSample.md | 30 - sdk/python/sdk/zrok/docs/UnaccessRequest.md | 31 - sdk/python/sdk/zrok/docs/UnshareRequest.md | 31 - .../sdk/zrok/docs/UpdateAccessRequest.md | 31 - .../sdk/zrok/docs/UpdateFrontendRequest.md | 31 - .../sdk/zrok/docs/UpdateShareRequest.md | 32 - sdk/python/sdk/zrok/docs/Verify200Response.md | 29 - sdk/python/sdk/zrok/docs/VerifyRequest.md | 29 - .../zrok/docs/VersionInventory200Response.md | 29 - sdk/python/sdk/zrok/requirements.txt | 4 - sdk/python/sdk/zrok/test/__init__.py | 0 .../sdk/zrok/test/test_access201_response.py | 52 - .../sdk/zrok/test/test_access_request.py | 54 - sdk/python/sdk/zrok/test/test_account_api.py | 79 - .../test_add_organization_member_request.py | 53 - sdk/python/sdk/zrok/test/test_admin_api.py | 115 - sdk/python/sdk/zrok/test/test_auth_user.py | 52 - .../zrok/test/test_change_password_request.py | 53 - .../test/test_client_version_check_request.py | 51 - .../sdk/zrok/test/test_configuration.py | 55 - .../test/test_create_frontend201_response.py | 51 - .../zrok/test/test_create_frontend_request.py | 54 - .../test/test_create_identity201_response.py | 52 - .../zrok/test/test_create_identity_request.py | 51 - .../test_create_organization201_response.py | 51 - .../test/test_create_organization_request.py | 51 - .../sdk/zrok/test/test_disable_request.py | 51 - .../sdk/zrok/test/test_enable_request.py | 52 - sdk/python/sdk/zrok/test/test_environment.py | 62 - .../test/test_environment_and_resources.py | 94 - .../sdk/zrok/test/test_environment_api.py | 43 - sdk/python/sdk/zrok/test/test_frontend.py | 59 - .../test/test_get_sparklines200_response.py | 62 - .../zrok/test/test_get_sparklines_request.py | 57 - .../sdk/zrok/test/test_invite_request.py | 52 - .../test_invite_token_generate_request.py | 53 - .../test_list_frontends200_response_inner.py | 56 - .../test/test_list_memberships200_response.py | 56 - ...mberships200_response_memberships_inner.py | 53 - ...t_list_organization_members200_response.py | 55 - ...ation_members200_response_members_inner.py | 52 - .../test_list_organizations200_response.py | 55 - ...zations200_response_organizations_inner.py | 52 - .../sdk/zrok/test/test_login_request.py | 52 - sdk/python/sdk/zrok/test/test_metadata_api.py | 127 - sdk/python/sdk/zrok/test/test_metrics.py | 59 - .../sdk/zrok/test/test_metrics_sample.py | 53 - sdk/python/sdk/zrok/test/test_overview.py | 93 - sdk/python/sdk/zrok/test/test_principal.py | 55 - ...st_regenerate_account_token200_response.py | 51 - .../test_regenerate_account_token_request.py | 51 - .../sdk/zrok/test/test_register_request.py | 52 - ...test_remove_organization_member_request.py | 52 - .../zrok/test/test_reset_password_request.py | 52 - sdk/python/sdk/zrok/test/test_share.py | 66 - sdk/python/sdk/zrok/test/test_share_api.py | 67 - .../sdk/zrok/test/test_share_request.py | 74 - .../sdk/zrok/test/test_share_response.py | 54 - .../sdk/zrok/test/test_spark_data_sample.py | 52 - .../sdk/zrok/test/test_unaccess_request.py | 53 - .../sdk/zrok/test/test_unshare_request.py | 53 - .../zrok/test/test_update_access_request.py | 53 - .../zrok/test/test_update_frontend_request.py | 53 - .../zrok/test/test_update_share_request.py | 58 - .../sdk/zrok/test/test_verify200_response.py | 51 - .../sdk/zrok/test/test_verify_request.py | 51 - .../test_version_inventory200_response.py | 51 - .../sdk/zrok/zrok/api_client_wrapper.py | 50 - sdk/python/sdk/zrok/zrok_api/__init__.py | 88 - sdk/python/sdk/zrok/zrok_api/api/__init__.py | 9 - .../sdk/zrok/zrok_api/api/account_api.py | 2261 --------- sdk/python/sdk/zrok/zrok_api/api/admin_api.py | 3855 --------------- .../sdk/zrok/zrok_api/api/environment_api.py | 589 --- .../sdk/zrok/zrok_api/api/metadata_api.py | 4242 ----------------- sdk/python/sdk/zrok/zrok_api/api/share_api.py | 1712 ------- sdk/python/sdk/zrok/zrok_api/api_client.py | 797 ---- sdk/python/sdk/zrok/zrok_api/api_response.py | 21 - sdk/python/sdk/zrok/zrok_api/configuration.py | 602 --- sdk/python/sdk/zrok/zrok_api/exceptions.py | 216 - .../sdk/zrok/zrok_api/models/__init__.py | 67 - .../zrok_api/models/access201_response.py | 89 - .../zrok/zrok_api/models/access_request.py | 93 - .../models/add_organization_member_request.py | 91 - .../sdk/zrok/zrok_api/models/auth_user.py | 89 - .../models/change_password_request.py | 91 - .../models/client_version_check_request.py | 87 - .../sdk/zrok/zrok_api/models/configuration.py | 95 - .../models/create_frontend201_response.py | 87 - .../models/create_frontend_request.py | 103 - .../models/create_identity201_response.py | 89 - .../models/create_identity_request.py | 87 - .../models/create_organization201_response.py | 87 - .../models/create_organization_request.py | 87 - .../zrok/zrok_api/models/disable_request.py | 87 - .../zrok/zrok_api/models/enable_request.py | 89 - .../sdk/zrok/zrok_api/models/environment.py | 109 - .../models/environment_and_resources.py | 111 - .../sdk/zrok/zrok_api/models/frontend.py | 103 - .../models/get_sparklines200_response.py | 95 - .../zrok_api/models/get_sparklines_request.py | 91 - .../zrok/zrok_api/models/invite_request.py | 89 - .../models/invite_token_generate_request.py | 87 - .../list_frontends200_response_inner.py | 97 - .../models/list_memberships200_response.py | 95 - ...mberships200_response_memberships_inner.py | 91 - .../list_organization_members200_response.py | 95 - ...ation_members200_response_members_inner.py | 89 - .../models/list_organizations200_response.py | 95 - ...zations200_response_organizations_inner.py | 89 - .../sdk/zrok/zrok_api/models/login_request.py | 89 - .../sdk/zrok/zrok_api/models/metrics.py | 101 - .../zrok/zrok_api/models/metrics_sample.py | 91 - .../sdk/zrok/zrok_api/models/overview.py | 97 - .../sdk/zrok/zrok_api/models/principal.py | 95 - .../regenerate_account_token200_response.py | 87 - .../regenerate_account_token_request.py | 87 - .../zrok/zrok_api/models/register_request.py | 89 - .../remove_organization_member_request.py | 89 - .../zrok_api/models/reset_password_request.py | 89 - sdk/python/sdk/zrok/zrok_api/models/share.py | 117 - .../sdk/zrok/zrok_api/models/share_request.py | 161 - .../zrok/zrok_api/models/share_response.py | 89 - .../zrok/zrok_api/models/spark_data_sample.py | 89 - .../zrok/zrok_api/models/unaccess_request.py | 91 - .../zrok/zrok_api/models/unshare_request.py | 91 - .../zrok_api/models/update_access_request.py | 91 - .../models/update_frontend_request.py | 91 - .../zrok_api/models/update_share_request.py | 93 - .../zrok_api/models/verify200_response.py | 87 - .../zrok/zrok_api/models/verify_request.py | 87 - .../models/version_inventory200_response.py | 87 - sdk/python/sdk/zrok/zrok_api/py.typed | 0 sdk/python/sdk/zrok/zrok_api/rest.py | 258 - 182 files changed, 28117 deletions(-) delete mode 100644 sdk/python/sdk/zrok/.gitignore delete mode 100644 sdk/python/sdk/zrok/README.md delete mode 100644 sdk/python/sdk/zrok/docs/Access201Response.md delete mode 100644 sdk/python/sdk/zrok/docs/AccessRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/AccountApi.md delete mode 100644 sdk/python/sdk/zrok/docs/AddOrganizationMemberRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/AdminApi.md delete mode 100644 sdk/python/sdk/zrok/docs/AuthUser.md delete mode 100644 sdk/python/sdk/zrok/docs/ChangePasswordRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/ClientVersionCheckRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/Configuration.md delete mode 100644 sdk/python/sdk/zrok/docs/CreateFrontend201Response.md delete mode 100644 sdk/python/sdk/zrok/docs/CreateFrontendRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/CreateIdentity201Response.md delete mode 100644 sdk/python/sdk/zrok/docs/CreateIdentityRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/CreateOrganization201Response.md delete mode 100644 sdk/python/sdk/zrok/docs/CreateOrganizationRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/DisableRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/EnableRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/Environment.md delete mode 100644 sdk/python/sdk/zrok/docs/EnvironmentAndResources.md delete mode 100644 sdk/python/sdk/zrok/docs/EnvironmentApi.md delete mode 100644 sdk/python/sdk/zrok/docs/Frontend.md delete mode 100644 sdk/python/sdk/zrok/docs/GetSparklines200Response.md delete mode 100644 sdk/python/sdk/zrok/docs/GetSparklinesRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/InviteRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/InviteTokenGenerateRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/ListFrontends200ResponseInner.md delete mode 100644 sdk/python/sdk/zrok/docs/ListMemberships200Response.md delete mode 100644 sdk/python/sdk/zrok/docs/ListMemberships200ResponseMembershipsInner.md delete mode 100644 sdk/python/sdk/zrok/docs/ListOrganizationMembers200Response.md delete mode 100644 sdk/python/sdk/zrok/docs/ListOrganizationMembers200ResponseMembersInner.md delete mode 100644 sdk/python/sdk/zrok/docs/ListOrganizations200Response.md delete mode 100644 sdk/python/sdk/zrok/docs/ListOrganizations200ResponseOrganizationsInner.md delete mode 100644 sdk/python/sdk/zrok/docs/LoginRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/MetadataApi.md delete mode 100644 sdk/python/sdk/zrok/docs/Metrics.md delete mode 100644 sdk/python/sdk/zrok/docs/MetricsSample.md delete mode 100644 sdk/python/sdk/zrok/docs/Overview.md delete mode 100644 sdk/python/sdk/zrok/docs/Principal.md delete mode 100644 sdk/python/sdk/zrok/docs/RegenerateAccountToken200Response.md delete mode 100644 sdk/python/sdk/zrok/docs/RegenerateAccountTokenRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/RegisterRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/RemoveOrganizationMemberRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/ResetPasswordRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/Share.md delete mode 100644 sdk/python/sdk/zrok/docs/ShareApi.md delete mode 100644 sdk/python/sdk/zrok/docs/ShareRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/ShareResponse.md delete mode 100644 sdk/python/sdk/zrok/docs/SparkDataSample.md delete mode 100644 sdk/python/sdk/zrok/docs/UnaccessRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/UnshareRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/UpdateAccessRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/UpdateFrontendRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/UpdateShareRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/Verify200Response.md delete mode 100644 sdk/python/sdk/zrok/docs/VerifyRequest.md delete mode 100644 sdk/python/sdk/zrok/docs/VersionInventory200Response.md delete mode 100644 sdk/python/sdk/zrok/requirements.txt delete mode 100644 sdk/python/sdk/zrok/test/__init__.py delete mode 100644 sdk/python/sdk/zrok/test/test_access201_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_access_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_account_api.py delete mode 100644 sdk/python/sdk/zrok/test/test_add_organization_member_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_admin_api.py delete mode 100644 sdk/python/sdk/zrok/test/test_auth_user.py delete mode 100644 sdk/python/sdk/zrok/test/test_change_password_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_client_version_check_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_configuration.py delete mode 100644 sdk/python/sdk/zrok/test/test_create_frontend201_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_create_frontend_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_create_identity201_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_create_identity_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_create_organization201_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_create_organization_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_disable_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_enable_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_environment.py delete mode 100644 sdk/python/sdk/zrok/test/test_environment_and_resources.py delete mode 100644 sdk/python/sdk/zrok/test/test_environment_api.py delete mode 100644 sdk/python/sdk/zrok/test/test_frontend.py delete mode 100644 sdk/python/sdk/zrok/test/test_get_sparklines200_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_get_sparklines_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_invite_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_invite_token_generate_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_list_frontends200_response_inner.py delete mode 100644 sdk/python/sdk/zrok/test/test_list_memberships200_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_list_memberships200_response_memberships_inner.py delete mode 100644 sdk/python/sdk/zrok/test/test_list_organization_members200_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_list_organization_members200_response_members_inner.py delete mode 100644 sdk/python/sdk/zrok/test/test_list_organizations200_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_list_organizations200_response_organizations_inner.py delete mode 100644 sdk/python/sdk/zrok/test/test_login_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_metadata_api.py delete mode 100644 sdk/python/sdk/zrok/test/test_metrics.py delete mode 100644 sdk/python/sdk/zrok/test/test_metrics_sample.py delete mode 100644 sdk/python/sdk/zrok/test/test_overview.py delete mode 100644 sdk/python/sdk/zrok/test/test_principal.py delete mode 100644 sdk/python/sdk/zrok/test/test_regenerate_account_token200_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_regenerate_account_token_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_register_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_remove_organization_member_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_reset_password_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_share.py delete mode 100644 sdk/python/sdk/zrok/test/test_share_api.py delete mode 100644 sdk/python/sdk/zrok/test/test_share_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_share_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_spark_data_sample.py delete mode 100644 sdk/python/sdk/zrok/test/test_unaccess_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_unshare_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_update_access_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_update_frontend_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_update_share_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_verify200_response.py delete mode 100644 sdk/python/sdk/zrok/test/test_verify_request.py delete mode 100644 sdk/python/sdk/zrok/test/test_version_inventory200_response.py delete mode 100644 sdk/python/sdk/zrok/zrok/api_client_wrapper.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/__init__.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/api/__init__.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/api/account_api.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/api/admin_api.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/api/environment_api.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/api/metadata_api.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/api/share_api.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/api_client.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/api_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/configuration.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/exceptions.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/__init__.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/access201_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/access_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/add_organization_member_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/auth_user.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/change_password_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/client_version_check_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/configuration.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_frontend201_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_identity201_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_identity_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_organization201_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/create_organization_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/disable_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/enable_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/environment.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/frontend.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/get_sparklines_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/invite_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_frontends200_response_inner.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response_memberships_inner.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response_members_inner.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response_organizations_inner.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/login_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/metrics.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/overview.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/principal.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token200_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/register_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/remove_organization_member_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/share.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/share_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/share_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/unshare_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/update_access_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/update_share_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/verify200_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/verify_request.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/models/version_inventory200_response.py delete mode 100644 sdk/python/sdk/zrok/zrok_api/py.typed delete mode 100644 sdk/python/sdk/zrok/zrok_api/rest.py diff --git a/sdk/python/sdk/zrok/.gitignore b/sdk/python/sdk/zrok/.gitignore deleted file mode 100644 index 43995bd4..00000000 --- a/sdk/python/sdk/zrok/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/sdk/python/sdk/zrok/README.md b/sdk/python/sdk/zrok/README.md deleted file mode 100644 index 25ad2fe6..00000000 --- a/sdk/python/sdk/zrok/README.md +++ /dev/null @@ -1,215 +0,0 @@ -# zrok -zrok client access - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Package version: 1.0.0 -- Generator version: 7.12.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -Python 3.8+ - -## Installation & Usage -### pip install - -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 -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import zrok_api -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import zrok_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) - - try: - api_instance.change_password(body=body) - except ApiException as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to */api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AccountApi* | [**change_password**](docs/AccountApi.md#change_password) | **POST** /changePassword | -*AccountApi* | [**invite**](docs/AccountApi.md#invite) | **POST** /invite | -*AccountApi* | [**login**](docs/AccountApi.md#login) | **POST** /login | -*AccountApi* | [**regenerate_account_token**](docs/AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | -*AccountApi* | [**register**](docs/AccountApi.md#register) | **POST** /register | -*AccountApi* | [**reset_password**](docs/AccountApi.md#reset_password) | **POST** /resetPassword | -*AccountApi* | [**reset_password_request**](docs/AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | -*AccountApi* | [**verify**](docs/AccountApi.md#verify) | **POST** /verify | -*AdminApi* | [**add_organization_member**](docs/AdminApi.md#add_organization_member) | **POST** /organization/add | -*AdminApi* | [**create_account**](docs/AdminApi.md#create_account) | **POST** /account | -*AdminApi* | [**create_frontend**](docs/AdminApi.md#create_frontend) | **POST** /frontend | -*AdminApi* | [**create_identity**](docs/AdminApi.md#create_identity) | **POST** /identity | -*AdminApi* | [**create_organization**](docs/AdminApi.md#create_organization) | **POST** /organization | -*AdminApi* | [**delete_frontend**](docs/AdminApi.md#delete_frontend) | **DELETE** /frontend | -*AdminApi* | [**delete_organization**](docs/AdminApi.md#delete_organization) | **DELETE** /organization | -*AdminApi* | [**grants**](docs/AdminApi.md#grants) | **POST** /grants | -*AdminApi* | [**invite_token_generate**](docs/AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | -*AdminApi* | [**list_frontends**](docs/AdminApi.md#list_frontends) | **GET** /frontends | -*AdminApi* | [**list_organization_members**](docs/AdminApi.md#list_organization_members) | **POST** /organization/list | -*AdminApi* | [**list_organizations**](docs/AdminApi.md#list_organizations) | **GET** /organizations | -*AdminApi* | [**remove_organization_member**](docs/AdminApi.md#remove_organization_member) | **POST** /organization/remove | -*AdminApi* | [**update_frontend**](docs/AdminApi.md#update_frontend) | **PATCH** /frontend | -*EnvironmentApi* | [**disable**](docs/EnvironmentApi.md#disable) | **POST** /disable | -*EnvironmentApi* | [**enable**](docs/EnvironmentApi.md#enable) | **POST** /enable | -*MetadataApi* | [**client_version_check**](docs/MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | -*MetadataApi* | [**configuration**](docs/MetadataApi.md#configuration) | **GET** /configuration | -*MetadataApi* | [**get_account_detail**](docs/MetadataApi.md#get_account_detail) | **GET** /detail/account | -*MetadataApi* | [**get_account_metrics**](docs/MetadataApi.md#get_account_metrics) | **GET** /metrics/account | -*MetadataApi* | [**get_environment_detail**](docs/MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | -*MetadataApi* | [**get_environment_metrics**](docs/MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | -*MetadataApi* | [**get_frontend_detail**](docs/MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | -*MetadataApi* | [**get_share_detail**](docs/MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | -*MetadataApi* | [**get_share_metrics**](docs/MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | -*MetadataApi* | [**get_sparklines**](docs/MetadataApi.md#get_sparklines) | **POST** /sparklines | -*MetadataApi* | [**list_memberships**](docs/MetadataApi.md#list_memberships) | **GET** /memberships | -*MetadataApi* | [**list_org_members**](docs/MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | -*MetadataApi* | [**org_account_overview**](docs/MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | -*MetadataApi* | [**overview**](docs/MetadataApi.md#overview) | **GET** /overview | -*MetadataApi* | [**version**](docs/MetadataApi.md#version) | **GET** /version | -*MetadataApi* | [**version_inventory**](docs/MetadataApi.md#version_inventory) | **GET** /versions | -*ShareApi* | [**access**](docs/ShareApi.md#access) | **POST** /access | -*ShareApi* | [**share**](docs/ShareApi.md#share) | **POST** /share | -*ShareApi* | [**unaccess**](docs/ShareApi.md#unaccess) | **DELETE** /unaccess | -*ShareApi* | [**unshare**](docs/ShareApi.md#unshare) | **DELETE** /unshare | -*ShareApi* | [**update_access**](docs/ShareApi.md#update_access) | **PATCH** /access | -*ShareApi* | [**update_share**](docs/ShareApi.md#update_share) | **PATCH** /share | - - -## Documentation For Models - - - [Access201Response](docs/Access201Response.md) - - [AccessRequest](docs/AccessRequest.md) - - [AddOrganizationMemberRequest](docs/AddOrganizationMemberRequest.md) - - [AuthUser](docs/AuthUser.md) - - [ChangePasswordRequest](docs/ChangePasswordRequest.md) - - [ClientVersionCheckRequest](docs/ClientVersionCheckRequest.md) - - [Configuration](docs/Configuration.md) - - [CreateFrontend201Response](docs/CreateFrontend201Response.md) - - [CreateFrontendRequest](docs/CreateFrontendRequest.md) - - [CreateIdentity201Response](docs/CreateIdentity201Response.md) - - [CreateIdentityRequest](docs/CreateIdentityRequest.md) - - [CreateOrganization201Response](docs/CreateOrganization201Response.md) - - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md) - - [DisableRequest](docs/DisableRequest.md) - - [EnableRequest](docs/EnableRequest.md) - - [Environment](docs/Environment.md) - - [EnvironmentAndResources](docs/EnvironmentAndResources.md) - - [Frontend](docs/Frontend.md) - - [GetSparklines200Response](docs/GetSparklines200Response.md) - - [GetSparklinesRequest](docs/GetSparklinesRequest.md) - - [InviteRequest](docs/InviteRequest.md) - - [InviteTokenGenerateRequest](docs/InviteTokenGenerateRequest.md) - - [ListFrontends200ResponseInner](docs/ListFrontends200ResponseInner.md) - - [ListMemberships200Response](docs/ListMemberships200Response.md) - - [ListMemberships200ResponseMembershipsInner](docs/ListMemberships200ResponseMembershipsInner.md) - - [ListOrganizationMembers200Response](docs/ListOrganizationMembers200Response.md) - - [ListOrganizationMembers200ResponseMembersInner](docs/ListOrganizationMembers200ResponseMembersInner.md) - - [ListOrganizations200Response](docs/ListOrganizations200Response.md) - - [ListOrganizations200ResponseOrganizationsInner](docs/ListOrganizations200ResponseOrganizationsInner.md) - - [LoginRequest](docs/LoginRequest.md) - - [Metrics](docs/Metrics.md) - - [MetricsSample](docs/MetricsSample.md) - - [Overview](docs/Overview.md) - - [Principal](docs/Principal.md) - - [RegenerateAccountToken200Response](docs/RegenerateAccountToken200Response.md) - - [RegenerateAccountTokenRequest](docs/RegenerateAccountTokenRequest.md) - - [RegisterRequest](docs/RegisterRequest.md) - - [RemoveOrganizationMemberRequest](docs/RemoveOrganizationMemberRequest.md) - - [ResetPasswordRequest](docs/ResetPasswordRequest.md) - - [Share](docs/Share.md) - - [ShareRequest](docs/ShareRequest.md) - - [ShareResponse](docs/ShareResponse.md) - - [SparkDataSample](docs/SparkDataSample.md) - - [UnaccessRequest](docs/UnaccessRequest.md) - - [UnshareRequest](docs/UnshareRequest.md) - - [UpdateAccessRequest](docs/UpdateAccessRequest.md) - - [UpdateFrontendRequest](docs/UpdateFrontendRequest.md) - - [UpdateShareRequest](docs/UpdateShareRequest.md) - - [Verify200Response](docs/Verify200Response.md) - - [VerifyRequest](docs/VerifyRequest.md) - - [VersionInventory200Response](docs/VersionInventory200Response.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### key - -- **Type**: API key -- **API key parameter name**: x-token -- **Location**: HTTP header - - -## Author - - - - diff --git a/sdk/python/sdk/zrok/docs/Access201Response.md b/sdk/python/sdk/zrok/docs/Access201Response.md deleted file mode 100644 index bc12a97a..00000000 --- a/sdk/python/sdk/zrok/docs/Access201Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# Access201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**backend_mode** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.access201_response import Access201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of Access201Response from a JSON string -access201_response_instance = Access201Response.from_json(json) -# print the JSON string representation of the object -print(Access201Response.to_json()) - -# convert the object into a dict -access201_response_dict = access201_response_instance.to_dict() -# create an instance of Access201Response from a dict -access201_response_from_dict = Access201Response.from_dict(access201_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/sdk/python/sdk/zrok/docs/AccessRequest.md b/sdk/python/sdk/zrok/docs/AccessRequest.md deleted file mode 100644 index 288b82ae..00000000 --- a/sdk/python/sdk/zrok/docs/AccessRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# AccessRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.access_request import AccessRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of AccessRequest from a JSON string -access_request_instance = AccessRequest.from_json(json) -# print the JSON string representation of the object -print(AccessRequest.to_json()) - -# convert the object into a dict -access_request_dict = access_request_instance.to_dict() -# create an instance of AccessRequest from a dict -access_request_from_dict = AccessRequest.from_dict(access_request_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/sdk/python/sdk/zrok/docs/AccountApi.md b/sdk/python/sdk/zrok/docs/AccountApi.md deleted file mode 100644 index cb6a3e97..00000000 --- a/sdk/python/sdk/zrok/docs/AccountApi.md +++ /dev/null @@ -1,557 +0,0 @@ -# zrok_api.AccountApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**change_password**](AccountApi.md#change_password) | **POST** /changePassword | -[**invite**](AccountApi.md#invite) | **POST** /invite | -[**login**](AccountApi.md#login) | **POST** /login | -[**regenerate_account_token**](AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | -[**register**](AccountApi.md#register) | **POST** /register | -[**reset_password**](AccountApi.md#reset_password) | **POST** /resetPassword | -[**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | -[**verify**](AccountApi.md#verify) | **POST** /verify | - - -# **change_password** -> change_password(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) - - try: - api_instance.change_password(body=body) - except Exception as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ChangePasswordRequest**](ChangePasswordRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | password changed | - | -**400** | password not changed | - | -**401** | unauthorized | - | -**422** | password validation failure | - | -**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) - -# **invite** -> invite(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.invite_request import InviteRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.InviteRequest() # InviteRequest | (optional) - - try: - api_instance.invite(body=body) - except Exception as e: - print("Exception when calling AccountApi->invite: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**InviteRequest**](InviteRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | invitation created | - | -**400** | invitation not created (already exists) | - | -**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) - -# **login** -> str login(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.login_request import LoginRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.LoginRequest() # LoginRequest | (optional) - - try: - api_response = api_instance.login(body=body) - print("The response of AccountApi->login:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->login: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**LoginRequest**](LoginRequest.md)| | [optional] - -### Return type - -**str** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | login successful | - | -**401** | invalid login | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **regenerate_account_token** -> RegenerateAccountToken200Response regenerate_account_token(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) - - try: - api_response = api_instance.regenerate_account_token(body=body) - print("The response of AccountApi->regenerate_account_token:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] - -### Return type - -[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | regenerate account token | - | -**404** | account 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) - -# **register** -> RegenerateAccountToken200Response register(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.register_request import RegisterRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.RegisterRequest() # RegisterRequest | (optional) - - try: - api_response = api_instance.register(body=body) - print("The response of AccountApi->register:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->register: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegisterRequest**](RegisterRequest.md)| | [optional] - -### Return type - -[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | account created | - | -**404** | request not found | - | -**422** | password validation failure | - | -**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) - -# **reset_password** -> reset_password(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.ResetPasswordRequest() # ResetPasswordRequest | (optional) - - try: - api_instance.reset_password(body=body) - except Exception as e: - print("Exception when calling AccountApi->reset_password: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ResetPasswordRequest**](ResetPasswordRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | password reset | - | -**404** | request not found | - | -**422** | password validation failure | - | -**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) - -# **reset_password_request** -> reset_password_request(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) - - try: - api_instance.reset_password_request(body=body) - except Exception as e: - print("Exception when calling AccountApi->reset_password_request: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | reset password request created | - | -**400** | reset password request not created | - | -**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) - -# **verify** -> Verify200Response verify(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.VerifyRequest() # VerifyRequest | (optional) - - try: - api_response = api_instance.verify(body=body) - print("The response of AccountApi->verify:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->verify: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**VerifyRequest**](VerifyRequest.md)| | [optional] - -### Return type - -[**Verify200Response**](Verify200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | registration token ready | - | -**404** | registration token 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/sdk/python/sdk/zrok/docs/AddOrganizationMemberRequest.md b/sdk/python/sdk/zrok/docs/AddOrganizationMemberRequest.md deleted file mode 100644 index c866784a..00000000 --- a/sdk/python/sdk/zrok/docs/AddOrganizationMemberRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# AddOrganizationMemberRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of AddOrganizationMemberRequest from a JSON string -add_organization_member_request_instance = AddOrganizationMemberRequest.from_json(json) -# print the JSON string representation of the object -print(AddOrganizationMemberRequest.to_json()) - -# convert the object into a dict -add_organization_member_request_dict = add_organization_member_request_instance.to_dict() -# create an instance of AddOrganizationMemberRequest from a dict -add_organization_member_request_from_dict = AddOrganizationMemberRequest.from_dict(add_organization_member_request_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/sdk/python/sdk/zrok/docs/AdminApi.md b/sdk/python/sdk/zrok/docs/AdminApi.md deleted file mode 100644 index 7eec6028..00000000 --- a/sdk/python/sdk/zrok/docs/AdminApi.md +++ /dev/null @@ -1,1079 +0,0 @@ -# zrok_api.AdminApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_organization_member**](AdminApi.md#add_organization_member) | **POST** /organization/add | -[**create_account**](AdminApi.md#create_account) | **POST** /account | -[**create_frontend**](AdminApi.md#create_frontend) | **POST** /frontend | -[**create_identity**](AdminApi.md#create_identity) | **POST** /identity | -[**create_organization**](AdminApi.md#create_organization) | **POST** /organization | -[**delete_frontend**](AdminApi.md#delete_frontend) | **DELETE** /frontend | -[**delete_organization**](AdminApi.md#delete_organization) | **DELETE** /organization | -[**grants**](AdminApi.md#grants) | **POST** /grants | -[**invite_token_generate**](AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | -[**list_frontends**](AdminApi.md#list_frontends) | **GET** /frontends | -[**list_organization_members**](AdminApi.md#list_organization_members) | **POST** /organization/list | -[**list_organizations**](AdminApi.md#list_organizations) | **GET** /organizations | -[**remove_organization_member**](AdminApi.md#remove_organization_member) | **POST** /organization/remove | -[**update_frontend**](AdminApi.md#update_frontend) | **PATCH** /frontend | - - -# **add_organization_member** -> add_organization_member(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.AddOrganizationMemberRequest() # AddOrganizationMemberRequest | (optional) - - try: - api_instance.add_organization_member(body=body) - except Exception as e: - print("Exception when calling AdminApi->add_organization_member: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AddOrganizationMemberRequest**](AddOrganizationMemberRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | member added | - | -**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_account** -> RegenerateAccountToken200Response create_account(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.LoginRequest() # LoginRequest | (optional) - - try: - api_response = api_instance.create_account(body=body) - print("The response of AdminApi->create_account:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_account: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**LoginRequest**](LoginRequest.md)| | [optional] - -### Return type - -[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | created | - | -**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) - -# **create_frontend** -> CreateFrontend201Response create_frontend(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateFrontendRequest() # CreateFrontendRequest | (optional) - - try: - api_response = api_instance.create_frontend(body=body) - print("The response of AdminApi->create_frontend:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_frontend: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateFrontendRequest**](CreateFrontendRequest.md)| | [optional] - -### Return type - -[**CreateFrontend201Response**](CreateFrontend201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | frontend created | - | -**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_identity** -> CreateIdentity201Response create_identity(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateIdentityRequest() # CreateIdentityRequest | (optional) - - try: - api_response = api_instance.create_identity(body=body) - print("The response of AdminApi->create_identity:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_identity: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateIdentityRequest**](CreateIdentityRequest.md)| | [optional] - -### Return type - -[**CreateIdentity201Response**](CreateIdentity201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | created | - | -**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) - -# **create_organization** -> CreateOrganization201Response create_organization(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateOrganizationRequest() # CreateOrganizationRequest | (optional) - - try: - api_response = api_instance.create_organization(body=body) - print("The response of AdminApi->create_organization:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_organization: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md)| | [optional] - -### Return type - -[**CreateOrganization201Response**](CreateOrganization201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | organization created | - | -**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) - -# **delete_frontend** -> delete_frontend(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateFrontend201Response() # CreateFrontend201Response | (optional) - - try: - api_instance.delete_frontend(body=body) - except Exception as e: - print("Exception when calling AdminApi->delete_frontend: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateFrontend201Response**](CreateFrontend201Response.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | frontend deleted | - | -**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) - -# **delete_organization** -> delete_organization(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) - - try: - api_instance.delete_organization(body=body) - except Exception as e: - print("Exception when calling AdminApi->delete_organization: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | organization deleted | - | -**401** | unauthorized | - | -**404** | organization 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) - -# **grants** -> grants(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.Verify200Response() # Verify200Response | (optional) - - try: - api_instance.grants(body=body) - except Exception as e: - print("Exception when calling AdminApi->grants: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Verify200Response**](Verify200Response.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **invite_token_generate** -> invite_token_generate(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.InviteTokenGenerateRequest() # InviteTokenGenerateRequest | (optional) - - try: - api_instance.invite_token_generate(body=body) - except Exception as e: - print("Exception when calling AdminApi->invite_token_generate: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**InviteTokenGenerateRequest**](InviteTokenGenerateRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | invite tokens created | - | -**400** | invite tokens not created | - | -**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) - -# **list_frontends** -> List[ListFrontends200ResponseInner] list_frontends() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - - try: - api_response = api_instance.list_frontends() - print("The response of AdminApi->list_frontends:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->list_frontends: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[ListFrontends200ResponseInner]**](ListFrontends200ResponseInner.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **list_organization_members** -> ListOrganizationMembers200Response list_organization_members(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) - - try: - api_response = api_instance.list_organization_members(body=body) - print("The response of AdminApi->list_organization_members:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->list_organization_members: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] - -### Return type - -[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | list organization members | - | -**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_organizations** -> ListOrganizations200Response list_organizations() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - - try: - api_response = api_instance.list_organizations() - print("The response of AdminApi->list_organizations:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->list_organizations: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ListOrganizations200Response**](ListOrganizations200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **remove_organization_member** -> remove_organization_member(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.RemoveOrganizationMemberRequest() # RemoveOrganizationMemberRequest | (optional) - - try: - api_instance.remove_organization_member(body=body) - except Exception as e: - print("Exception when calling AdminApi->remove_organization_member: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RemoveOrganizationMemberRequest**](RemoveOrganizationMemberRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | member removed | - | -**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_frontend** -> update_frontend(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.UpdateFrontendRequest() # UpdateFrontendRequest | (optional) - - try: - api_instance.update_frontend(body=body) - except Exception as e: - print("Exception when calling AdminApi->update_frontend: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UpdateFrontendRequest**](UpdateFrontendRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | frontend updated | - | -**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/sdk/python/sdk/zrok/docs/AuthUser.md b/sdk/python/sdk/zrok/docs/AuthUser.md deleted file mode 100644 index 99960687..00000000 --- a/sdk/python/sdk/zrok/docs/AuthUser.md +++ /dev/null @@ -1,30 +0,0 @@ -# AuthUser - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.auth_user import AuthUser - -# TODO update the JSON string below -json = "{}" -# create an instance of AuthUser from a JSON string -auth_user_instance = AuthUser.from_json(json) -# print the JSON string representation of the object -print(AuthUser.to_json()) - -# convert the object into a dict -auth_user_dict = auth_user_instance.to_dict() -# create an instance of AuthUser from a dict -auth_user_from_dict = AuthUser.from_dict(auth_user_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/sdk/python/sdk/zrok/docs/ChangePasswordRequest.md b/sdk/python/sdk/zrok/docs/ChangePasswordRequest.md deleted file mode 100644 index 5fea099e..00000000 --- a/sdk/python/sdk/zrok/docs/ChangePasswordRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# ChangePasswordRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**old_password** | **str** | | [optional] -**new_password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.change_password_request import ChangePasswordRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ChangePasswordRequest from a JSON string -change_password_request_instance = ChangePasswordRequest.from_json(json) -# print the JSON string representation of the object -print(ChangePasswordRequest.to_json()) - -# convert the object into a dict -change_password_request_dict = change_password_request_instance.to_dict() -# create an instance of ChangePasswordRequest from a dict -change_password_request_from_dict = ChangePasswordRequest.from_dict(change_password_request_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/sdk/python/sdk/zrok/docs/ClientVersionCheckRequest.md b/sdk/python/sdk/zrok/docs/ClientVersionCheckRequest.md deleted file mode 100644 index 53d9e16e..00000000 --- a/sdk/python/sdk/zrok/docs/ClientVersionCheckRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# ClientVersionCheckRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ClientVersionCheckRequest from a JSON string -client_version_check_request_instance = ClientVersionCheckRequest.from_json(json) -# print the JSON string representation of the object -print(ClientVersionCheckRequest.to_json()) - -# convert the object into a dict -client_version_check_request_dict = client_version_check_request_instance.to_dict() -# create an instance of ClientVersionCheckRequest from a dict -client_version_check_request_from_dict = ClientVersionCheckRequest.from_dict(client_version_check_request_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/sdk/python/sdk/zrok/docs/Configuration.md b/sdk/python/sdk/zrok/docs/Configuration.md deleted file mode 100644 index 07eec945..00000000 --- a/sdk/python/sdk/zrok/docs/Configuration.md +++ /dev/null @@ -1,33 +0,0 @@ -# Configuration - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **str** | | [optional] -**tou_link** | **str** | | [optional] -**invites_open** | **bool** | | [optional] -**requires_invite_token** | **bool** | | [optional] -**invite_token_contact** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.configuration import Configuration - -# TODO update the JSON string below -json = "{}" -# create an instance of Configuration from a JSON string -configuration_instance = Configuration.from_json(json) -# print the JSON string representation of the object -print(Configuration.to_json()) - -# convert the object into a dict -configuration_dict = configuration_instance.to_dict() -# create an instance of Configuration from a dict -configuration_from_dict = Configuration.from_dict(configuration_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/sdk/python/sdk/zrok/docs/CreateFrontend201Response.md b/sdk/python/sdk/zrok/docs/CreateFrontend201Response.md deleted file mode 100644 index 7239add1..00000000 --- a/sdk/python/sdk/zrok/docs/CreateFrontend201Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateFrontend201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_frontend201_response import CreateFrontend201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateFrontend201Response from a JSON string -create_frontend201_response_instance = CreateFrontend201Response.from_json(json) -# print the JSON string representation of the object -print(CreateFrontend201Response.to_json()) - -# convert the object into a dict -create_frontend201_response_dict = create_frontend201_response_instance.to_dict() -# create an instance of CreateFrontend201Response from a dict -create_frontend201_response_from_dict = CreateFrontend201Response.from_dict(create_frontend201_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/sdk/python/sdk/zrok/docs/CreateFrontendRequest.md b/sdk/python/sdk/zrok/docs/CreateFrontendRequest.md deleted file mode 100644 index 63fe8779..00000000 --- a/sdk/python/sdk/zrok/docs/CreateFrontendRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# CreateFrontendRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**permission_mode** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_frontend_request import CreateFrontendRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateFrontendRequest from a JSON string -create_frontend_request_instance = CreateFrontendRequest.from_json(json) -# print the JSON string representation of the object -print(CreateFrontendRequest.to_json()) - -# convert the object into a dict -create_frontend_request_dict = create_frontend_request_instance.to_dict() -# create an instance of CreateFrontendRequest from a dict -create_frontend_request_from_dict = CreateFrontendRequest.from_dict(create_frontend_request_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/sdk/python/sdk/zrok/docs/CreateIdentity201Response.md b/sdk/python/sdk/zrok/docs/CreateIdentity201Response.md deleted file mode 100644 index 245275e2..00000000 --- a/sdk/python/sdk/zrok/docs/CreateIdentity201Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# CreateIdentity201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] -**cfg** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_identity201_response import CreateIdentity201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateIdentity201Response from a JSON string -create_identity201_response_instance = CreateIdentity201Response.from_json(json) -# print the JSON string representation of the object -print(CreateIdentity201Response.to_json()) - -# convert the object into a dict -create_identity201_response_dict = create_identity201_response_instance.to_dict() -# create an instance of CreateIdentity201Response from a dict -create_identity201_response_from_dict = CreateIdentity201Response.from_dict(create_identity201_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/sdk/python/sdk/zrok/docs/CreateIdentityRequest.md b/sdk/python/sdk/zrok/docs/CreateIdentityRequest.md deleted file mode 100644 index 50cb9457..00000000 --- a/sdk/python/sdk/zrok/docs/CreateIdentityRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateIdentityRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_identity_request import CreateIdentityRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateIdentityRequest from a JSON string -create_identity_request_instance = CreateIdentityRequest.from_json(json) -# print the JSON string representation of the object -print(CreateIdentityRequest.to_json()) - -# convert the object into a dict -create_identity_request_dict = create_identity_request_instance.to_dict() -# create an instance of CreateIdentityRequest from a dict -create_identity_request_from_dict = CreateIdentityRequest.from_dict(create_identity_request_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/sdk/python/sdk/zrok/docs/CreateOrganization201Response.md b/sdk/python/sdk/zrok/docs/CreateOrganization201Response.md deleted file mode 100644 index 26bc640c..00000000 --- a/sdk/python/sdk/zrok/docs/CreateOrganization201Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateOrganization201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_organization201_response import CreateOrganization201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateOrganization201Response from a JSON string -create_organization201_response_instance = CreateOrganization201Response.from_json(json) -# print the JSON string representation of the object -print(CreateOrganization201Response.to_json()) - -# convert the object into a dict -create_organization201_response_dict = create_organization201_response_instance.to_dict() -# create an instance of CreateOrganization201Response from a dict -create_organization201_response_from_dict = CreateOrganization201Response.from_dict(create_organization201_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/sdk/python/sdk/zrok/docs/CreateOrganizationRequest.md b/sdk/python/sdk/zrok/docs/CreateOrganizationRequest.md deleted file mode 100644 index 458e339b..00000000 --- a/sdk/python/sdk/zrok/docs/CreateOrganizationRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateOrganizationRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_organization_request import CreateOrganizationRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateOrganizationRequest from a JSON string -create_organization_request_instance = CreateOrganizationRequest.from_json(json) -# print the JSON string representation of the object -print(CreateOrganizationRequest.to_json()) - -# convert the object into a dict -create_organization_request_dict = create_organization_request_instance.to_dict() -# create an instance of CreateOrganizationRequest from a dict -create_organization_request_from_dict = CreateOrganizationRequest.from_dict(create_organization_request_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/sdk/python/sdk/zrok/docs/DisableRequest.md b/sdk/python/sdk/zrok/docs/DisableRequest.md deleted file mode 100644 index 4e4490f1..00000000 --- a/sdk/python/sdk/zrok/docs/DisableRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# DisableRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.disable_request import DisableRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of DisableRequest from a JSON string -disable_request_instance = DisableRequest.from_json(json) -# print the JSON string representation of the object -print(DisableRequest.to_json()) - -# convert the object into a dict -disable_request_dict = disable_request_instance.to_dict() -# create an instance of DisableRequest from a dict -disable_request_from_dict = DisableRequest.from_dict(disable_request_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/sdk/python/sdk/zrok/docs/EnableRequest.md b/sdk/python/sdk/zrok/docs/EnableRequest.md deleted file mode 100644 index 7720b3b9..00000000 --- a/sdk/python/sdk/zrok/docs/EnableRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# EnableRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**host** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.enable_request import EnableRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of EnableRequest from a JSON string -enable_request_instance = EnableRequest.from_json(json) -# print the JSON string representation of the object -print(EnableRequest.to_json()) - -# convert the object into a dict -enable_request_dict = enable_request_instance.to_dict() -# create an instance of EnableRequest from a dict -enable_request_from_dict = EnableRequest.from_dict(enable_request_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/sdk/python/sdk/zrok/docs/Environment.md b/sdk/python/sdk/zrok/docs/Environment.md deleted file mode 100644 index 44a9356b..00000000 --- a/sdk/python/sdk/zrok/docs/Environment.md +++ /dev/null @@ -1,36 +0,0 @@ -# Environment - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**host** | **str** | | [optional] -**address** | **str** | | [optional] -**z_id** | **str** | | [optional] -**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] -**limited** | **bool** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.environment import Environment - -# TODO update the JSON string below -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()) - -# convert the object into a dict -environment_dict = environment_instance.to_dict() -# create an instance of Environment from a dict -environment_from_dict = Environment.from_dict(environment_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/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md b/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md deleted file mode 100644 index a218ae3c..00000000 --- a/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md +++ /dev/null @@ -1,31 +0,0 @@ -# EnvironmentAndResources - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**environment** | [**Environment**](Environment.md) | | [optional] -**frontends** | [**List[Frontend]**](Frontend.md) | | [optional] -**shares** | [**List[Share]**](Share.md) | | [optional] - -## Example - -```python -from zrok_api.models.environment_and_resources import EnvironmentAndResources - -# TODO update the JSON string below -json = "{}" -# create an instance of EnvironmentAndResources from a JSON string -environment_and_resources_instance = EnvironmentAndResources.from_json(json) -# print the JSON string representation of the object -print(EnvironmentAndResources.to_json()) - -# convert the object into a dict -environment_and_resources_dict = environment_and_resources_instance.to_dict() -# create an instance of EnvironmentAndResources from a dict -environment_and_resources_from_dict = EnvironmentAndResources.from_dict(environment_and_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/sdk/python/sdk/zrok/docs/EnvironmentApi.md b/sdk/python/sdk/zrok/docs/EnvironmentApi.md deleted file mode 100644 index a50ae1d3..00000000 --- a/sdk/python/sdk/zrok/docs/EnvironmentApi.md +++ /dev/null @@ -1,162 +0,0 @@ -# zrok_api.EnvironmentApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**disable**](EnvironmentApi.md#disable) | **POST** /disable | -[**enable**](EnvironmentApi.md#enable) | **POST** /enable | - - -# **disable** -> disable(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.disable_request import DisableRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.EnvironmentApi(api_client) - body = zrok_api.DisableRequest() # DisableRequest | (optional) - - try: - api_instance.disable(body=body) - except Exception as e: - print("Exception when calling EnvironmentApi->disable: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DisableRequest**](DisableRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | environment disabled | - | -**401** | invalid environment | - | -**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) - -# **enable** -> CreateIdentity201Response enable(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.enable_request import EnableRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.EnvironmentApi(api_client) - body = zrok_api.EnableRequest() # EnableRequest | (optional) - - try: - api_response = api_instance.enable(body=body) - print("The response of EnvironmentApi->enable:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EnvironmentApi->enable: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**EnableRequest**](EnableRequest.md)| | [optional] - -### Return type - -[**CreateIdentity201Response**](CreateIdentity201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | environment enabled | - | -**401** | unauthorized | - | -**404** | account 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/sdk/python/sdk/zrok/docs/Frontend.md b/sdk/python/sdk/zrok/docs/Frontend.md deleted file mode 100644 index ce41a9b7..00000000 --- a/sdk/python/sdk/zrok/docs/Frontend.md +++ /dev/null @@ -1,37 +0,0 @@ -# Frontend - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**frontend_token** | **str** | | [optional] -**share_token** | **str** | | [optional] -**backend_mode** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] -**z_id** | **str** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.frontend import Frontend - -# TODO update the JSON string below -json = "{}" -# create an instance of Frontend from a JSON string -frontend_instance = Frontend.from_json(json) -# print the JSON string representation of the object -print(Frontend.to_json()) - -# convert the object into a dict -frontend_dict = frontend_instance.to_dict() -# create an instance of Frontend from a dict -frontend_from_dict = Frontend.from_dict(frontend_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/sdk/python/sdk/zrok/docs/GetSparklines200Response.md b/sdk/python/sdk/zrok/docs/GetSparklines200Response.md deleted file mode 100644 index 66528c7e..00000000 --- a/sdk/python/sdk/zrok/docs/GetSparklines200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetSparklines200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sparklines** | [**List[Metrics]**](Metrics.md) | | [optional] - -## Example - -```python -from zrok_api.models.get_sparklines200_response import GetSparklines200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetSparklines200Response from a JSON string -get_sparklines200_response_instance = GetSparklines200Response.from_json(json) -# print the JSON string representation of the object -print(GetSparklines200Response.to_json()) - -# convert the object into a dict -get_sparklines200_response_dict = get_sparklines200_response_instance.to_dict() -# create an instance of GetSparklines200Response from a dict -get_sparklines200_response_from_dict = GetSparklines200Response.from_dict(get_sparklines200_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/sdk/python/sdk/zrok/docs/GetSparklinesRequest.md b/sdk/python/sdk/zrok/docs/GetSparklinesRequest.md deleted file mode 100644 index 29369ebc..00000000 --- a/sdk/python/sdk/zrok/docs/GetSparklinesRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# GetSparklinesRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | **bool** | | [optional] -**environments** | **List[str]** | | [optional] -**shares** | **List[str]** | | [optional] - -## Example - -```python -from zrok_api.models.get_sparklines_request import GetSparklinesRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of GetSparklinesRequest from a JSON string -get_sparklines_request_instance = GetSparklinesRequest.from_json(json) -# print the JSON string representation of the object -print(GetSparklinesRequest.to_json()) - -# convert the object into a dict -get_sparklines_request_dict = get_sparklines_request_instance.to_dict() -# create an instance of GetSparklinesRequest from a dict -get_sparklines_request_from_dict = GetSparklinesRequest.from_dict(get_sparklines_request_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/sdk/python/sdk/zrok/docs/InviteRequest.md b/sdk/python/sdk/zrok/docs/InviteRequest.md deleted file mode 100644 index 039132e8..00000000 --- a/sdk/python/sdk/zrok/docs/InviteRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# InviteRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**invite_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.invite_request import InviteRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of InviteRequest from a JSON string -invite_request_instance = InviteRequest.from_json(json) -# print the JSON string representation of the object -print(InviteRequest.to_json()) - -# convert the object into a dict -invite_request_dict = invite_request_instance.to_dict() -# create an instance of InviteRequest from a dict -invite_request_from_dict = InviteRequest.from_dict(invite_request_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/sdk/python/sdk/zrok/docs/InviteTokenGenerateRequest.md b/sdk/python/sdk/zrok/docs/InviteTokenGenerateRequest.md deleted file mode 100644 index 33a20d70..00000000 --- a/sdk/python/sdk/zrok/docs/InviteTokenGenerateRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# InviteTokenGenerateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invite_tokens** | **List[str]** | | [optional] - -## Example - -```python -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of InviteTokenGenerateRequest from a JSON string -invite_token_generate_request_instance = InviteTokenGenerateRequest.from_json(json) -# print the JSON string representation of the object -print(InviteTokenGenerateRequest.to_json()) - -# convert the object into a dict -invite_token_generate_request_dict = invite_token_generate_request_instance.to_dict() -# create an instance of InviteTokenGenerateRequest from a dict -invite_token_generate_request_from_dict = InviteTokenGenerateRequest.from_dict(invite_token_generate_request_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/sdk/python/sdk/zrok/docs/ListFrontends200ResponseInner.md b/sdk/python/sdk/zrok/docs/ListFrontends200ResponseInner.md deleted file mode 100644 index 625ea343..00000000 --- a/sdk/python/sdk/zrok/docs/ListFrontends200ResponseInner.md +++ /dev/null @@ -1,34 +0,0 @@ -# ListFrontends200ResponseInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListFrontends200ResponseInner from a JSON string -list_frontends200_response_inner_instance = ListFrontends200ResponseInner.from_json(json) -# print the JSON string representation of the object -print(ListFrontends200ResponseInner.to_json()) - -# convert the object into a dict -list_frontends200_response_inner_dict = list_frontends200_response_inner_instance.to_dict() -# create an instance of ListFrontends200ResponseInner from a dict -list_frontends200_response_inner_from_dict = ListFrontends200ResponseInner.from_dict(list_frontends200_response_inner_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/sdk/python/sdk/zrok/docs/ListMemberships200Response.md b/sdk/python/sdk/zrok/docs/ListMemberships200Response.md deleted file mode 100644 index 48e19dbf..00000000 --- a/sdk/python/sdk/zrok/docs/ListMemberships200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListMemberships200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**memberships** | [**List[ListMemberships200ResponseMembershipsInner]**](ListMemberships200ResponseMembershipsInner.md) | | [optional] - -## Example - -```python -from zrok_api.models.list_memberships200_response import ListMemberships200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListMemberships200Response from a JSON string -list_memberships200_response_instance = ListMemberships200Response.from_json(json) -# print the JSON string representation of the object -print(ListMemberships200Response.to_json()) - -# convert the object into a dict -list_memberships200_response_dict = list_memberships200_response_instance.to_dict() -# create an instance of ListMemberships200Response from a dict -list_memberships200_response_from_dict = ListMemberships200Response.from_dict(list_memberships200_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/sdk/python/sdk/zrok/docs/ListMemberships200ResponseMembershipsInner.md b/sdk/python/sdk/zrok/docs/ListMemberships200ResponseMembershipsInner.md deleted file mode 100644 index e85c7440..00000000 --- a/sdk/python/sdk/zrok/docs/ListMemberships200ResponseMembershipsInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# ListMemberships200ResponseMembershipsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListMemberships200ResponseMembershipsInner from a JSON string -list_memberships200_response_memberships_inner_instance = ListMemberships200ResponseMembershipsInner.from_json(json) -# print the JSON string representation of the object -print(ListMemberships200ResponseMembershipsInner.to_json()) - -# convert the object into a dict -list_memberships200_response_memberships_inner_dict = list_memberships200_response_memberships_inner_instance.to_dict() -# create an instance of ListMemberships200ResponseMembershipsInner from a dict -list_memberships200_response_memberships_inner_from_dict = ListMemberships200ResponseMembershipsInner.from_dict(list_memberships200_response_memberships_inner_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/sdk/python/sdk/zrok/docs/ListOrganizationMembers200Response.md b/sdk/python/sdk/zrok/docs/ListOrganizationMembers200Response.md deleted file mode 100644 index e05a28bf..00000000 --- a/sdk/python/sdk/zrok/docs/ListOrganizationMembers200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListOrganizationMembers200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**members** | [**List[ListOrganizationMembers200ResponseMembersInner]**](ListOrganizationMembers200ResponseMembersInner.md) | | [optional] - -## Example - -```python -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizationMembers200Response from a JSON string -list_organization_members200_response_instance = ListOrganizationMembers200Response.from_json(json) -# print the JSON string representation of the object -print(ListOrganizationMembers200Response.to_json()) - -# convert the object into a dict -list_organization_members200_response_dict = list_organization_members200_response_instance.to_dict() -# create an instance of ListOrganizationMembers200Response from a dict -list_organization_members200_response_from_dict = ListOrganizationMembers200Response.from_dict(list_organization_members200_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/sdk/python/sdk/zrok/docs/ListOrganizationMembers200ResponseMembersInner.md b/sdk/python/sdk/zrok/docs/ListOrganizationMembers200ResponseMembersInner.md deleted file mode 100644 index 8ebbb35e..00000000 --- a/sdk/python/sdk/zrok/docs/ListOrganizationMembers200ResponseMembersInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListOrganizationMembers200ResponseMembersInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizationMembers200ResponseMembersInner from a JSON string -list_organization_members200_response_members_inner_instance = ListOrganizationMembers200ResponseMembersInner.from_json(json) -# print the JSON string representation of the object -print(ListOrganizationMembers200ResponseMembersInner.to_json()) - -# convert the object into a dict -list_organization_members200_response_members_inner_dict = list_organization_members200_response_members_inner_instance.to_dict() -# create an instance of ListOrganizationMembers200ResponseMembersInner from a dict -list_organization_members200_response_members_inner_from_dict = ListOrganizationMembers200ResponseMembersInner.from_dict(list_organization_members200_response_members_inner_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/sdk/python/sdk/zrok/docs/ListOrganizations200Response.md b/sdk/python/sdk/zrok/docs/ListOrganizations200Response.md deleted file mode 100644 index 46fe4d60..00000000 --- a/sdk/python/sdk/zrok/docs/ListOrganizations200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListOrganizations200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organizations** | [**List[ListOrganizations200ResponseOrganizationsInner]**](ListOrganizations200ResponseOrganizationsInner.md) | | [optional] - -## Example - -```python -from zrok_api.models.list_organizations200_response import ListOrganizations200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizations200Response from a JSON string -list_organizations200_response_instance = ListOrganizations200Response.from_json(json) -# print the JSON string representation of the object -print(ListOrganizations200Response.to_json()) - -# convert the object into a dict -list_organizations200_response_dict = list_organizations200_response_instance.to_dict() -# create an instance of ListOrganizations200Response from a dict -list_organizations200_response_from_dict = ListOrganizations200Response.from_dict(list_organizations200_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/sdk/python/sdk/zrok/docs/ListOrganizations200ResponseOrganizationsInner.md b/sdk/python/sdk/zrok/docs/ListOrganizations200ResponseOrganizationsInner.md deleted file mode 100644 index 468447f2..00000000 --- a/sdk/python/sdk/zrok/docs/ListOrganizations200ResponseOrganizationsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListOrganizations200ResponseOrganizationsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizations200ResponseOrganizationsInner from a JSON string -list_organizations200_response_organizations_inner_instance = ListOrganizations200ResponseOrganizationsInner.from_json(json) -# print the JSON string representation of the object -print(ListOrganizations200ResponseOrganizationsInner.to_json()) - -# convert the object into a dict -list_organizations200_response_organizations_inner_dict = list_organizations200_response_organizations_inner_instance.to_dict() -# create an instance of ListOrganizations200ResponseOrganizationsInner from a dict -list_organizations200_response_organizations_inner_from_dict = ListOrganizations200ResponseOrganizationsInner.from_dict(list_organizations200_response_organizations_inner_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/sdk/python/sdk/zrok/docs/LoginRequest.md b/sdk/python/sdk/zrok/docs/LoginRequest.md deleted file mode 100644 index 05728618..00000000 --- a/sdk/python/sdk/zrok/docs/LoginRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# LoginRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.login_request import LoginRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of LoginRequest from a JSON string -login_request_instance = LoginRequest.from_json(json) -# print the JSON string representation of the object -print(LoginRequest.to_json()) - -# convert the object into a dict -login_request_dict = login_request_instance.to_dict() -# create an instance of LoginRequest from a dict -login_request_from_dict = LoginRequest.from_dict(login_request_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/sdk/python/sdk/zrok/docs/MetadataApi.md b/sdk/python/sdk/zrok/docs/MetadataApi.md deleted file mode 100644 index ecb0cf8b..00000000 --- a/sdk/python/sdk/zrok/docs/MetadataApi.md +++ /dev/null @@ -1,1171 +0,0 @@ -# zrok_api.MetadataApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**client_version_check**](MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | -[**configuration**](MetadataApi.md#configuration) | **GET** /configuration | -[**get_account_detail**](MetadataApi.md#get_account_detail) | **GET** /detail/account | -[**get_account_metrics**](MetadataApi.md#get_account_metrics) | **GET** /metrics/account | -[**get_environment_detail**](MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | -[**get_environment_metrics**](MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | -[**get_frontend_detail**](MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | -[**get_share_detail**](MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | -[**get_share_metrics**](MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | -[**get_sparklines**](MetadataApi.md#get_sparklines) | **POST** /sparklines | -[**list_memberships**](MetadataApi.md#list_memberships) | **GET** /memberships | -[**list_org_members**](MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | -[**org_account_overview**](MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | -[**overview**](MetadataApi.md#overview) | **GET** /overview | -[**version**](MetadataApi.md#version) | **GET** /version | -[**version_inventory**](MetadataApi.md#version_inventory) | **GET** /versions | - - -# **client_version_check** -> client_version_check(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - body = zrok_api.ClientVersionCheckRequest() # ClientVersionCheckRequest | (optional) - - try: - api_instance.client_version_check(body=body) - except Exception as e: - print("Exception when calling MetadataApi->client_version_check: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ClientVersionCheckRequest**](ClientVersionCheckRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | compatible | - | -**400** | not compatible | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **configuration** -> Configuration configuration() - -### Example - - -```python -import zrok_api -from zrok_api.models.configuration import Configuration -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.configuration() - print("The response of MetadataApi->configuration:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->configuration: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Configuration**](Configuration.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | current configuration | - | - -[[Back to top]](#) [[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_account_detail** -> List[Environment] get_account_detail() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.environment import Environment -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.get_account_detail() - print("The response of MetadataApi->get_account_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_account_detail: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[Environment]**](Environment.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_account_metrics** -> Metrics get_account_metrics(duration=duration) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.metrics import Metrics -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - duration = 'duration_example' # str | (optional) - - try: - api_response = api_instance.get_account_metrics(duration=duration) - print("The response of MetadataApi->get_account_metrics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | account metrics | - | -**400** | bad request | - | -**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_environment_detail** -> EnvironmentAndResources get_environment_detail(env_zid) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - env_zid = 'env_zid_example' # str | - - try: - api_response = api_instance.get_environment_detail(env_zid) - print("The response of MetadataApi->get_environment_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_zid** | **str**| | - -### Return type - -[**EnvironmentAndResources**](EnvironmentAndResources.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_environment_metrics** -> Metrics get_environment_metrics(env_id, duration=duration) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.metrics import Metrics -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - env_id = 'env_id_example' # str | - duration = 'duration_example' # str | (optional) - - try: - api_response = api_instance.get_environment_metrics(env_id, duration=duration) - print("The response of MetadataApi->get_environment_metrics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_id** | **str**| | - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | environment metrics | - | -**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) - -# **get_frontend_detail** -> Frontend get_frontend_detail(frontend_id) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.frontend import Frontend -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - frontend_id = 56 # int | - - try: - api_response = api_instance.get_frontend_detail(frontend_id) - print("The response of MetadataApi->get_frontend_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **frontend_id** | **int**| | - -### Return type - -[**Frontend**](Frontend.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_share_detail** -> Share get_share_detail(share_token) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.share import Share -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - share_token = 'share_token_example' # str | - - try: - api_response = api_instance.get_share_detail(share_token) - print("The response of MetadataApi->get_share_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_share_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_token** | **str**| | - -### Return type - -[**Share**](Share.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_share_metrics** -> Metrics get_share_metrics(share_token, duration=duration) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.metrics import Metrics -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - share_token = 'share_token_example' # str | - duration = 'duration_example' # str | (optional) - - try: - api_response = api_instance.get_share_metrics(share_token, duration=duration) - print("The response of MetadataApi->get_share_metrics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_token** | **str**| | - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | share metrics | - | -**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) - -# **get_sparklines** -> GetSparklines200Response get_sparklines(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - body = zrok_api.GetSparklinesRequest() # GetSparklinesRequest | (optional) - - try: - api_response = api_instance.get_sparklines(body=body) - print("The response of MetadataApi->get_sparklines:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_sparklines: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**GetSparklinesRequest**](GetSparklinesRequest.md)| | [optional] - -### Return type - -[**GetSparklines200Response**](GetSparklines200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | sparklines data | - | -**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) - -# **list_memberships** -> ListMemberships200Response list_memberships() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.list_memberships() - print("The response of MetadataApi->list_memberships:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->list_memberships: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ListMemberships200Response**](ListMemberships200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_org_members** -> ListOrganizationMembers200Response list_org_members(organization_token) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - organization_token = 'organization_token_example' # str | - - try: - api_response = api_instance.list_org_members(organization_token) - print("The response of MetadataApi->list_org_members:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->list_org_members: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_token** | **str**| | - -### Return type - -[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **org_account_overview** -> Overview org_account_overview(organization_token, account_email) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.overview import Overview -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - organization_token = 'organization_token_example' # str | - account_email = 'account_email_example' # str | - - try: - api_response = api_instance.org_account_overview(organization_token, account_email) - print("The response of MetadataApi->org_account_overview:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->org_account_overview: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_token** | **str**| | - **account_email** | **str**| | - -### Return type - -[**Overview**](Overview.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **overview** -> Overview overview() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.overview import Overview -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.overview() - print("The response of MetadataApi->overview:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->overview: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Overview**](Overview.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | overview returned | - | -**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) - -# **version** -> str version() - -### Example - - -```python -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.version() - print("The response of MetadataApi->version:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->version: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**str** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | legacy upgrade required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **version_inventory** -> VersionInventory200Response version_inventory() - -### Example - - -```python -import zrok_api -from zrok_api.models.version_inventory200_response import VersionInventory200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.version_inventory() - print("The response of MetadataApi->version_inventory:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->version_inventory: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**VersionInventory200Response**](VersionInventory200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | - -[[Back to top]](#) [[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/sdk/python/sdk/zrok/docs/Metrics.md b/sdk/python/sdk/zrok/docs/Metrics.md deleted file mode 100644 index 9216f700..00000000 --- a/sdk/python/sdk/zrok/docs/Metrics.md +++ /dev/null @@ -1,32 +0,0 @@ -# Metrics - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope** | **str** | | [optional] -**id** | **str** | | [optional] -**period** | **float** | | [optional] -**samples** | [**List[MetricsSample]**](MetricsSample.md) | | [optional] - -## Example - -```python -from zrok_api.models.metrics import Metrics - -# TODO update the JSON string below -json = "{}" -# create an instance of Metrics from a JSON string -metrics_instance = Metrics.from_json(json) -# print the JSON string representation of the object -print(Metrics.to_json()) - -# convert the object into a dict -metrics_dict = metrics_instance.to_dict() -# create an instance of Metrics from a dict -metrics_from_dict = Metrics.from_dict(metrics_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/sdk/python/sdk/zrok/docs/MetricsSample.md b/sdk/python/sdk/zrok/docs/MetricsSample.md deleted file mode 100644 index 96c1d94e..00000000 --- a/sdk/python/sdk/zrok/docs/MetricsSample.md +++ /dev/null @@ -1,31 +0,0 @@ -# MetricsSample - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rx** | **float** | | [optional] -**tx** | **float** | | [optional] -**timestamp** | **float** | | [optional] - -## Example - -```python -from zrok_api.models.metrics_sample import MetricsSample - -# TODO update the JSON string below -json = "{}" -# create an instance of MetricsSample from a JSON string -metrics_sample_instance = MetricsSample.from_json(json) -# print the JSON string representation of the object -print(MetricsSample.to_json()) - -# convert the object into a dict -metrics_sample_dict = metrics_sample_instance.to_dict() -# create an instance of MetricsSample from a dict -metrics_sample_from_dict = MetricsSample.from_dict(metrics_sample_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/sdk/python/sdk/zrok/docs/Overview.md b/sdk/python/sdk/zrok/docs/Overview.md deleted file mode 100644 index f50d6232..00000000 --- a/sdk/python/sdk/zrok/docs/Overview.md +++ /dev/null @@ -1,30 +0,0 @@ -# Overview - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_limited** | **bool** | | [optional] -**environments** | [**List[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional] - -## Example - -```python -from zrok_api.models.overview import Overview - -# TODO update the JSON string below -json = "{}" -# create an instance of Overview from a JSON string -overview_instance = Overview.from_json(json) -# print the JSON string representation of the object -print(Overview.to_json()) - -# convert the object into a dict -overview_dict = overview_instance.to_dict() -# create an instance of Overview from a dict -overview_from_dict = Overview.from_dict(overview_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/sdk/python/sdk/zrok/docs/Principal.md b/sdk/python/sdk/zrok/docs/Principal.md deleted file mode 100644 index 0a6d399c..00000000 --- a/sdk/python/sdk/zrok/docs/Principal.md +++ /dev/null @@ -1,33 +0,0 @@ -# Principal - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**email** | **str** | | [optional] -**token** | **str** | | [optional] -**limitless** | **bool** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.principal import Principal - -# TODO update the JSON string below -json = "{}" -# create an instance of Principal from a JSON string -principal_instance = Principal.from_json(json) -# print the JSON string representation of the object -print(Principal.to_json()) - -# convert the object into a dict -principal_dict = principal_instance.to_dict() -# create an instance of Principal from a dict -principal_from_dict = Principal.from_dict(principal_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/sdk/python/sdk/zrok/docs/RegenerateAccountToken200Response.md b/sdk/python/sdk/zrok/docs/RegenerateAccountToken200Response.md deleted file mode 100644 index e86cc294..00000000 --- a/sdk/python/sdk/zrok/docs/RegenerateAccountToken200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# RegenerateAccountToken200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of RegenerateAccountToken200Response from a JSON string -regenerate_account_token200_response_instance = RegenerateAccountToken200Response.from_json(json) -# print the JSON string representation of the object -print(RegenerateAccountToken200Response.to_json()) - -# convert the object into a dict -regenerate_account_token200_response_dict = regenerate_account_token200_response_instance.to_dict() -# create an instance of RegenerateAccountToken200Response from a dict -regenerate_account_token200_response_from_dict = RegenerateAccountToken200Response.from_dict(regenerate_account_token200_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/sdk/python/sdk/zrok/docs/RegenerateAccountTokenRequest.md b/sdk/python/sdk/zrok/docs/RegenerateAccountTokenRequest.md deleted file mode 100644 index 113262a6..00000000 --- a/sdk/python/sdk/zrok/docs/RegenerateAccountTokenRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# RegenerateAccountTokenRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RegenerateAccountTokenRequest from a JSON string -regenerate_account_token_request_instance = RegenerateAccountTokenRequest.from_json(json) -# print the JSON string representation of the object -print(RegenerateAccountTokenRequest.to_json()) - -# convert the object into a dict -regenerate_account_token_request_dict = regenerate_account_token_request_instance.to_dict() -# create an instance of RegenerateAccountTokenRequest from a dict -regenerate_account_token_request_from_dict = RegenerateAccountTokenRequest.from_dict(regenerate_account_token_request_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/sdk/python/sdk/zrok/docs/RegisterRequest.md b/sdk/python/sdk/zrok/docs/RegisterRequest.md deleted file mode 100644 index 6e268aff..00000000 --- a/sdk/python/sdk/zrok/docs/RegisterRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# RegisterRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.register_request import RegisterRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RegisterRequest from a JSON string -register_request_instance = RegisterRequest.from_json(json) -# print the JSON string representation of the object -print(RegisterRequest.to_json()) - -# convert the object into a dict -register_request_dict = register_request_instance.to_dict() -# create an instance of RegisterRequest from a dict -register_request_from_dict = RegisterRequest.from_dict(register_request_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/sdk/python/sdk/zrok/docs/RemoveOrganizationMemberRequest.md b/sdk/python/sdk/zrok/docs/RemoveOrganizationMemberRequest.md deleted file mode 100644 index 75743291..00000000 --- a/sdk/python/sdk/zrok/docs/RemoveOrganizationMemberRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# RemoveOrganizationMemberRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RemoveOrganizationMemberRequest from a JSON string -remove_organization_member_request_instance = RemoveOrganizationMemberRequest.from_json(json) -# print the JSON string representation of the object -print(RemoveOrganizationMemberRequest.to_json()) - -# convert the object into a dict -remove_organization_member_request_dict = remove_organization_member_request_instance.to_dict() -# create an instance of RemoveOrganizationMemberRequest from a dict -remove_organization_member_request_from_dict = RemoveOrganizationMemberRequest.from_dict(remove_organization_member_request_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/sdk/python/sdk/zrok/docs/ResetPasswordRequest.md b/sdk/python/sdk/zrok/docs/ResetPasswordRequest.md deleted file mode 100644 index e91e841a..00000000 --- a/sdk/python/sdk/zrok/docs/ResetPasswordRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# ResetPasswordRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reset_token** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.reset_password_request import ResetPasswordRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ResetPasswordRequest from a JSON string -reset_password_request_instance = ResetPasswordRequest.from_json(json) -# print the JSON string representation of the object -print(ResetPasswordRequest.to_json()) - -# convert the object into a dict -reset_password_request_dict = reset_password_request_instance.to_dict() -# create an instance of ResetPasswordRequest from a dict -reset_password_request_from_dict = ResetPasswordRequest.from_dict(reset_password_request_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/sdk/python/sdk/zrok/docs/Share.md b/sdk/python/sdk/zrok/docs/Share.md deleted file mode 100644 index 4fbfc430..00000000 --- a/sdk/python/sdk/zrok/docs/Share.md +++ /dev/null @@ -1,40 +0,0 @@ -# Share - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**share_token** | **str** | | [optional] -**z_id** | **str** | | [optional] -**share_mode** | **str** | | [optional] -**backend_mode** | **str** | | [optional] -**frontend_selection** | **str** | | [optional] -**frontend_endpoint** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**reserved** | **bool** | | [optional] -**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] -**limited** | **bool** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.share import Share - -# TODO update the JSON string below -json = "{}" -# create an instance of Share from a JSON string -share_instance = Share.from_json(json) -# print the JSON string representation of the object -print(Share.to_json()) - -# convert the object into a dict -share_dict = share_instance.to_dict() -# create an instance of Share from a dict -share_from_dict = Share.from_dict(share_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/sdk/python/sdk/zrok/docs/ShareApi.md b/sdk/python/sdk/zrok/docs/ShareApi.md deleted file mode 100644 index 2831f1d2..00000000 --- a/sdk/python/sdk/zrok/docs/ShareApi.md +++ /dev/null @@ -1,473 +0,0 @@ -# zrok_api.ShareApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**access**](ShareApi.md#access) | **POST** /access | -[**share**](ShareApi.md#share) | **POST** /share | -[**unaccess**](ShareApi.md#unaccess) | **DELETE** /unaccess | -[**unshare**](ShareApi.md#unshare) | **DELETE** /unshare | -[**update_access**](ShareApi.md#update_access) | **PATCH** /access | -[**update_share**](ShareApi.md#update_share) | **PATCH** /share | - - -# **access** -> Access201Response access(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.AccessRequest() # AccessRequest | (optional) - - try: - api_response = api_instance.access(body=body) - print("The response of ShareApi->access:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ShareApi->access: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AccessRequest**](AccessRequest.md)| | [optional] - -### Return type - -[**Access201Response**](Access201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | access created | - | -**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) - -# **share** -> ShareResponse share(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.ShareRequest() # ShareRequest | (optional) - - try: - api_response = api_instance.share(body=body) - print("The response of ShareApi->share:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ShareApi->share: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ShareRequest**](ShareRequest.md)| | [optional] - -### Return type - -[**ShareResponse**](ShareResponse.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | share created | - | -**401** | unauthorized | - | -**404** | not found | - | -**409** | conflict | - | -**422** | unprocessable | - | -**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) - -# **unaccess** -> unaccess(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UnaccessRequest() # UnaccessRequest | (optional) - - try: - api_instance.unaccess(body=body) - except Exception as e: - print("Exception when calling ShareApi->unaccess: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UnaccessRequest**](UnaccessRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | access removed | - | -**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) - -# **unshare** -> unshare(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UnshareRequest() # UnshareRequest | (optional) - - try: - api_instance.unshare(body=body) - except Exception as e: - print("Exception when calling ShareApi->unshare: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UnshareRequest**](UnshareRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | share removed | - | -**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_access** -> update_access(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UpdateAccessRequest() # UpdateAccessRequest | (optional) - - try: - api_instance.update_access(body=body) - except Exception as e: - print("Exception when calling ShareApi->update_access: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UpdateAccessRequest**](UpdateAccessRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | access updated | - | -**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_share** -> update_share(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.update_share_request import UpdateShareRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UpdateShareRequest() # UpdateShareRequest | (optional) - - try: - api_instance.update_share(body=body) - except Exception as e: - print("Exception when calling ShareApi->update_share: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UpdateShareRequest**](UpdateShareRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | share updated | - | -**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/sdk/python/sdk/zrok/docs/ShareRequest.md b/sdk/python/sdk/zrok/docs/ShareRequest.md deleted file mode 100644 index eb92f07a..00000000 --- a/sdk/python/sdk/zrok/docs/ShareRequest.md +++ /dev/null @@ -1,42 +0,0 @@ -# ShareRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_mode** | **str** | | [optional] -**frontend_selection** | **List[str]** | | [optional] -**backend_mode** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**auth_scheme** | **str** | | [optional] -**auth_users** | [**List[AuthUser]**](AuthUser.md) | | [optional] -**oauth_provider** | **str** | | [optional] -**oauth_email_domains** | **List[str]** | | [optional] -**oauth_authorization_check_interval** | **str** | | [optional] -**reserved** | **bool** | | [optional] -**permission_mode** | **str** | | [optional] -**access_grants** | **List[str]** | | [optional] -**unique_name** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.share_request import ShareRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareRequest from a JSON string -share_request_instance = ShareRequest.from_json(json) -# print the JSON string representation of the object -print(ShareRequest.to_json()) - -# convert the object into a dict -share_request_dict = share_request_instance.to_dict() -# create an instance of ShareRequest from a dict -share_request_from_dict = ShareRequest.from_dict(share_request_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/sdk/python/sdk/zrok/docs/ShareResponse.md b/sdk/python/sdk/zrok/docs/ShareResponse.md deleted file mode 100644 index 9bbedd0c..00000000 --- a/sdk/python/sdk/zrok/docs/ShareResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# ShareResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_proxy_endpoints** | **List[str]** | | [optional] -**share_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.share_response import ShareResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareResponse from a JSON string -share_response_instance = ShareResponse.from_json(json) -# print the JSON string representation of the object -print(ShareResponse.to_json()) - -# convert the object into a dict -share_response_dict = share_response_instance.to_dict() -# create an instance of ShareResponse from a dict -share_response_from_dict = ShareResponse.from_dict(share_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/sdk/python/sdk/zrok/docs/SparkDataSample.md b/sdk/python/sdk/zrok/docs/SparkDataSample.md deleted file mode 100644 index 6479404c..00000000 --- a/sdk/python/sdk/zrok/docs/SparkDataSample.md +++ /dev/null @@ -1,30 +0,0 @@ -# SparkDataSample - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rx** | **float** | | [optional] -**tx** | **float** | | [optional] - -## Example - -```python -from zrok_api.models.spark_data_sample import SparkDataSample - -# TODO update the JSON string below -json = "{}" -# create an instance of SparkDataSample from a JSON string -spark_data_sample_instance = SparkDataSample.from_json(json) -# print the JSON string representation of the object -print(SparkDataSample.to_json()) - -# convert the object into a dict -spark_data_sample_dict = spark_data_sample_instance.to_dict() -# create an instance of SparkDataSample from a dict -spark_data_sample_from_dict = SparkDataSample.from_dict(spark_data_sample_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/sdk/python/sdk/zrok/docs/UnaccessRequest.md b/sdk/python/sdk/zrok/docs/UnaccessRequest.md deleted file mode 100644 index c7d57fd8..00000000 --- a/sdk/python/sdk/zrok/docs/UnaccessRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UnaccessRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.unaccess_request import UnaccessRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnaccessRequest from a JSON string -unaccess_request_instance = UnaccessRequest.from_json(json) -# print the JSON string representation of the object -print(UnaccessRequest.to_json()) - -# convert the object into a dict -unaccess_request_dict = unaccess_request_instance.to_dict() -# create an instance of UnaccessRequest from a dict -unaccess_request_from_dict = UnaccessRequest.from_dict(unaccess_request_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/sdk/python/sdk/zrok/docs/UnshareRequest.md b/sdk/python/sdk/zrok/docs/UnshareRequest.md deleted file mode 100644 index d376f008..00000000 --- a/sdk/python/sdk/zrok/docs/UnshareRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UnshareRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**reserved** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.unshare_request import UnshareRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnshareRequest from a JSON string -unshare_request_instance = UnshareRequest.from_json(json) -# print the JSON string representation of the object -print(UnshareRequest.to_json()) - -# convert the object into a dict -unshare_request_dict = unshare_request_instance.to_dict() -# create an instance of UnshareRequest from a dict -unshare_request_from_dict = UnshareRequest.from_dict(unshare_request_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/sdk/python/sdk/zrok/docs/UpdateAccessRequest.md b/sdk/python/sdk/zrok/docs/UpdateAccessRequest.md deleted file mode 100644 index 7d9027da..00000000 --- a/sdk/python/sdk/zrok/docs/UpdateAccessRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UpdateAccessRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.update_access_request import UpdateAccessRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateAccessRequest from a JSON string -update_access_request_instance = UpdateAccessRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateAccessRequest.to_json()) - -# convert the object into a dict -update_access_request_dict = update_access_request_instance.to_dict() -# create an instance of UpdateAccessRequest from a dict -update_access_request_from_dict = UpdateAccessRequest.from_dict(update_access_request_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/sdk/python/sdk/zrok/docs/UpdateFrontendRequest.md b/sdk/python/sdk/zrok/docs/UpdateFrontendRequest.md deleted file mode 100644 index 754bf4b6..00000000 --- a/sdk/python/sdk/zrok/docs/UpdateFrontendRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UpdateFrontendRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**public_name** | **str** | | [optional] -**url_template** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.update_frontend_request import UpdateFrontendRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateFrontendRequest from a JSON string -update_frontend_request_instance = UpdateFrontendRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateFrontendRequest.to_json()) - -# convert the object into a dict -update_frontend_request_dict = update_frontend_request_instance.to_dict() -# create an instance of UpdateFrontendRequest from a dict -update_frontend_request_from_dict = UpdateFrontendRequest.from_dict(update_frontend_request_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/sdk/python/sdk/zrok/docs/UpdateShareRequest.md b/sdk/python/sdk/zrok/docs/UpdateShareRequest.md deleted file mode 100644 index 8719ab10..00000000 --- a/sdk/python/sdk/zrok/docs/UpdateShareRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# UpdateShareRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**share_token** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**add_access_grants** | **List[str]** | | [optional] -**remove_access_grants** | **List[str]** | | [optional] - -## Example - -```python -from zrok_api.models.update_share_request import UpdateShareRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateShareRequest from a JSON string -update_share_request_instance = UpdateShareRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateShareRequest.to_json()) - -# convert the object into a dict -update_share_request_dict = update_share_request_instance.to_dict() -# create an instance of UpdateShareRequest from a dict -update_share_request_from_dict = UpdateShareRequest.from_dict(update_share_request_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/sdk/python/sdk/zrok/docs/Verify200Response.md b/sdk/python/sdk/zrok/docs/Verify200Response.md deleted file mode 100644 index 5ca1769d..00000000 --- a/sdk/python/sdk/zrok/docs/Verify200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# Verify200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.verify200_response import Verify200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of Verify200Response from a JSON string -verify200_response_instance = Verify200Response.from_json(json) -# print the JSON string representation of the object -print(Verify200Response.to_json()) - -# convert the object into a dict -verify200_response_dict = verify200_response_instance.to_dict() -# create an instance of Verify200Response from a dict -verify200_response_from_dict = Verify200Response.from_dict(verify200_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/sdk/python/sdk/zrok/docs/VerifyRequest.md b/sdk/python/sdk/zrok/docs/VerifyRequest.md deleted file mode 100644 index da6a0728..00000000 --- a/sdk/python/sdk/zrok/docs/VerifyRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# VerifyRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.verify_request import VerifyRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of VerifyRequest from a JSON string -verify_request_instance = VerifyRequest.from_json(json) -# print the JSON string representation of the object -print(VerifyRequest.to_json()) - -# convert the object into a dict -verify_request_dict = verify_request_instance.to_dict() -# create an instance of VerifyRequest from a dict -verify_request_from_dict = VerifyRequest.from_dict(verify_request_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/sdk/python/sdk/zrok/docs/VersionInventory200Response.md b/sdk/python/sdk/zrok/docs/VersionInventory200Response.md deleted file mode 100644 index 2c08de2c..00000000 --- a/sdk/python/sdk/zrok/docs/VersionInventory200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# VersionInventory200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**controller_version** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.version_inventory200_response import VersionInventory200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of VersionInventory200Response from a JSON string -version_inventory200_response_instance = VersionInventory200Response.from_json(json) -# print the JSON string representation of the object -print(VersionInventory200Response.to_json()) - -# convert the object into a dict -version_inventory200_response_dict = version_inventory200_response_instance.to_dict() -# create an instance of VersionInventory200Response from a dict -version_inventory200_response_from_dict = VersionInventory200Response.from_dict(version_inventory200_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/sdk/python/sdk/zrok/requirements.txt b/sdk/python/sdk/zrok/requirements.txt deleted file mode 100644 index 67f7f68d..00000000 --- a/sdk/python/sdk/zrok/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -urllib3 >= 1.25.3, < 3.0.0 -python_dateutil >= 2.8.2 -pydantic >= 2 -typing-extensions >= 4.7.1 diff --git a/sdk/python/sdk/zrok/test/__init__.py b/sdk/python/sdk/zrok/test/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/sdk/python/sdk/zrok/test/test_access201_response.py b/sdk/python/sdk/zrok/test/test_access201_response.py deleted file mode 100644 index 9b698d1c..00000000 --- a/sdk/python/sdk/zrok/test/test_access201_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.access201_response import Access201Response - -class TestAccess201Response(unittest.TestCase): - """Access201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Access201Response: - """Test Access201Response - include_optional 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 `Access201Response` - """ - model = Access201Response() - if include_optional: - return Access201Response( - frontend_token = '', - backend_mode = '' - ) - else: - return Access201Response( - ) - """ - - def testAccess201Response(self): - """Test Access201Response""" - # 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/sdk/python/sdk/zrok/test/test_access_request.py b/sdk/python/sdk/zrok/test/test_access_request.py deleted file mode 100644 index 070903e9..00000000 --- a/sdk/python/sdk/zrok/test/test_access_request.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.access_request import AccessRequest - -class TestAccessRequest(unittest.TestCase): - """AccessRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccessRequest: - """Test AccessRequest - include_optional 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 `AccessRequest` - """ - model = AccessRequest() - if include_optional: - return AccessRequest( - env_zid = '', - share_token = '', - bind_address = '', - description = '' - ) - else: - return AccessRequest( - ) - """ - - def testAccessRequest(self): - """Test AccessRequest""" - # 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/sdk/python/sdk/zrok/test/test_account_api.py b/sdk/python/sdk/zrok/test/test_account_api.py deleted file mode 100644 index 419e1f1b..00000000 --- a/sdk/python/sdk/zrok/test/test_account_api.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.account_api import AccountApi - - -class TestAccountApi(unittest.TestCase): - """AccountApi unit test stubs""" - - def setUp(self) -> None: - self.api = AccountApi() - - def tearDown(self) -> None: - pass - - def test_change_password(self) -> None: - """Test case for change_password - - """ - pass - - def test_invite(self) -> None: - """Test case for invite - - """ - pass - - def test_login(self) -> None: - """Test case for login - - """ - pass - - def test_regenerate_account_token(self) -> None: - """Test case for regenerate_account_token - - """ - pass - - def test_register(self) -> None: - """Test case for register - - """ - pass - - def test_reset_password(self) -> None: - """Test case for reset_password - - """ - pass - - def test_reset_password_request(self) -> None: - """Test case for reset_password_request - - """ - pass - - def test_verify(self) -> None: - """Test case for verify - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_add_organization_member_request.py b/sdk/python/sdk/zrok/test/test_add_organization_member_request.py deleted file mode 100644 index 7a08de67..00000000 --- a/sdk/python/sdk/zrok/test/test_add_organization_member_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest - -class TestAddOrganizationMemberRequest(unittest.TestCase): - """AddOrganizationMemberRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AddOrganizationMemberRequest: - """Test AddOrganizationMemberRequest - include_optional 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 `AddOrganizationMemberRequest` - """ - model = AddOrganizationMemberRequest() - if include_optional: - return AddOrganizationMemberRequest( - organization_token = '', - email = '', - admin = True - ) - else: - return AddOrganizationMemberRequest( - ) - """ - - def testAddOrganizationMemberRequest(self): - """Test AddOrganizationMemberRequest""" - # 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/sdk/python/sdk/zrok/test/test_admin_api.py b/sdk/python/sdk/zrok/test/test_admin_api.py deleted file mode 100644 index 720e8832..00000000 --- a/sdk/python/sdk/zrok/test/test_admin_api.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.admin_api import AdminApi - - -class TestAdminApi(unittest.TestCase): - """AdminApi unit test stubs""" - - def setUp(self) -> None: - self.api = AdminApi() - - def tearDown(self) -> None: - pass - - def test_add_organization_member(self) -> None: - """Test case for add_organization_member - - """ - pass - - def test_create_account(self) -> None: - """Test case for create_account - - """ - pass - - def test_create_frontend(self) -> None: - """Test case for create_frontend - - """ - pass - - def test_create_identity(self) -> None: - """Test case for create_identity - - """ - pass - - def test_create_organization(self) -> None: - """Test case for create_organization - - """ - pass - - def test_delete_frontend(self) -> None: - """Test case for delete_frontend - - """ - pass - - def test_delete_organization(self) -> None: - """Test case for delete_organization - - """ - pass - - def test_grants(self) -> None: - """Test case for grants - - """ - pass - - def test_invite_token_generate(self) -> None: - """Test case for invite_token_generate - - """ - pass - - def test_list_frontends(self) -> None: - """Test case for list_frontends - - """ - pass - - def test_list_organization_members(self) -> None: - """Test case for list_organization_members - - """ - pass - - def test_list_organizations(self) -> None: - """Test case for list_organizations - - """ - pass - - def test_remove_organization_member(self) -> None: - """Test case for remove_organization_member - - """ - pass - - def test_update_frontend(self) -> None: - """Test case for update_frontend - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_auth_user.py b/sdk/python/sdk/zrok/test/test_auth_user.py deleted file mode 100644 index e5d70b26..00000000 --- a/sdk/python/sdk/zrok/test/test_auth_user.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.auth_user import AuthUser - -class TestAuthUser(unittest.TestCase): - """AuthUser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AuthUser: - """Test AuthUser - include_optional 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 `AuthUser` - """ - model = AuthUser() - if include_optional: - return AuthUser( - username = '', - password = '' - ) - else: - return AuthUser( - ) - """ - - def testAuthUser(self): - """Test AuthUser""" - # 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/sdk/python/sdk/zrok/test/test_change_password_request.py b/sdk/python/sdk/zrok/test/test_change_password_request.py deleted file mode 100644 index 592e8be1..00000000 --- a/sdk/python/sdk/zrok/test/test_change_password_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.change_password_request import ChangePasswordRequest - -class TestChangePasswordRequest(unittest.TestCase): - """ChangePasswordRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ChangePasswordRequest: - """Test ChangePasswordRequest - include_optional 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 `ChangePasswordRequest` - """ - model = ChangePasswordRequest() - if include_optional: - return ChangePasswordRequest( - email = '', - old_password = '', - new_password = '' - ) - else: - return ChangePasswordRequest( - ) - """ - - def testChangePasswordRequest(self): - """Test ChangePasswordRequest""" - # 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/sdk/python/sdk/zrok/test/test_client_version_check_request.py b/sdk/python/sdk/zrok/test/test_client_version_check_request.py deleted file mode 100644 index 169017d6..00000000 --- a/sdk/python/sdk/zrok/test/test_client_version_check_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest - -class TestClientVersionCheckRequest(unittest.TestCase): - """ClientVersionCheckRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClientVersionCheckRequest: - """Test ClientVersionCheckRequest - include_optional 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 `ClientVersionCheckRequest` - """ - model = ClientVersionCheckRequest() - if include_optional: - return ClientVersionCheckRequest( - client_version = '' - ) - else: - return ClientVersionCheckRequest( - ) - """ - - def testClientVersionCheckRequest(self): - """Test ClientVersionCheckRequest""" - # 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/sdk/python/sdk/zrok/test/test_configuration.py b/sdk/python/sdk/zrok/test/test_configuration.py deleted file mode 100644 index bf80210e..00000000 --- a/sdk/python/sdk/zrok/test/test_configuration.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.configuration import Configuration - -class TestConfiguration(unittest.TestCase): - """Configuration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Configuration: - """Test Configuration - include_optional 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 `Configuration` - """ - model = Configuration() - if include_optional: - return Configuration( - version = '', - tou_link = '', - invites_open = True, - requires_invite_token = True, - invite_token_contact = '' - ) - else: - return Configuration( - ) - """ - - def testConfiguration(self): - """Test Configuration""" - # 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/sdk/python/sdk/zrok/test/test_create_frontend201_response.py b/sdk/python/sdk/zrok/test/test_create_frontend201_response.py deleted file mode 100644 index 3f983a1a..00000000 --- a/sdk/python/sdk/zrok/test/test_create_frontend201_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_frontend201_response import CreateFrontend201Response - -class TestCreateFrontend201Response(unittest.TestCase): - """CreateFrontend201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateFrontend201Response: - """Test CreateFrontend201Response - include_optional 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 `CreateFrontend201Response` - """ - model = CreateFrontend201Response() - if include_optional: - return CreateFrontend201Response( - frontend_token = '' - ) - else: - return CreateFrontend201Response( - ) - """ - - def testCreateFrontend201Response(self): - """Test CreateFrontend201Response""" - # 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/sdk/python/sdk/zrok/test/test_create_frontend_request.py b/sdk/python/sdk/zrok/test/test_create_frontend_request.py deleted file mode 100644 index 8fc35754..00000000 --- a/sdk/python/sdk/zrok/test/test_create_frontend_request.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_frontend_request import CreateFrontendRequest - -class TestCreateFrontendRequest(unittest.TestCase): - """CreateFrontendRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateFrontendRequest: - """Test CreateFrontendRequest - include_optional 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 `CreateFrontendRequest` - """ - model = CreateFrontendRequest() - if include_optional: - return CreateFrontendRequest( - z_id = '', - url_template = '', - public_name = '', - permission_mode = 'open' - ) - else: - return CreateFrontendRequest( - ) - """ - - def testCreateFrontendRequest(self): - """Test CreateFrontendRequest""" - # 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/sdk/python/sdk/zrok/test/test_create_identity201_response.py b/sdk/python/sdk/zrok/test/test_create_identity201_response.py deleted file mode 100644 index 2a9c8f2b..00000000 --- a/sdk/python/sdk/zrok/test/test_create_identity201_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_identity201_response import CreateIdentity201Response - -class TestCreateIdentity201Response(unittest.TestCase): - """CreateIdentity201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateIdentity201Response: - """Test CreateIdentity201Response - include_optional 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 `CreateIdentity201Response` - """ - model = CreateIdentity201Response() - if include_optional: - return CreateIdentity201Response( - identity = '', - cfg = '' - ) - else: - return CreateIdentity201Response( - ) - """ - - def testCreateIdentity201Response(self): - """Test CreateIdentity201Response""" - # 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/sdk/python/sdk/zrok/test/test_create_identity_request.py b/sdk/python/sdk/zrok/test/test_create_identity_request.py deleted file mode 100644 index 9bf33031..00000000 --- a/sdk/python/sdk/zrok/test/test_create_identity_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_identity_request import CreateIdentityRequest - -class TestCreateIdentityRequest(unittest.TestCase): - """CreateIdentityRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateIdentityRequest: - """Test CreateIdentityRequest - include_optional 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 `CreateIdentityRequest` - """ - model = CreateIdentityRequest() - if include_optional: - return CreateIdentityRequest( - name = '' - ) - else: - return CreateIdentityRequest( - ) - """ - - def testCreateIdentityRequest(self): - """Test CreateIdentityRequest""" - # 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/sdk/python/sdk/zrok/test/test_create_organization201_response.py b/sdk/python/sdk/zrok/test/test_create_organization201_response.py deleted file mode 100644 index d4dc7c81..00000000 --- a/sdk/python/sdk/zrok/test/test_create_organization201_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_organization201_response import CreateOrganization201Response - -class TestCreateOrganization201Response(unittest.TestCase): - """CreateOrganization201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateOrganization201Response: - """Test CreateOrganization201Response - include_optional 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 `CreateOrganization201Response` - """ - model = CreateOrganization201Response() - if include_optional: - return CreateOrganization201Response( - organization_token = '' - ) - else: - return CreateOrganization201Response( - ) - """ - - def testCreateOrganization201Response(self): - """Test CreateOrganization201Response""" - # 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/sdk/python/sdk/zrok/test/test_create_organization_request.py b/sdk/python/sdk/zrok/test/test_create_organization_request.py deleted file mode 100644 index da880237..00000000 --- a/sdk/python/sdk/zrok/test/test_create_organization_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_organization_request import CreateOrganizationRequest - -class TestCreateOrganizationRequest(unittest.TestCase): - """CreateOrganizationRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateOrganizationRequest: - """Test CreateOrganizationRequest - include_optional 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 `CreateOrganizationRequest` - """ - model = CreateOrganizationRequest() - if include_optional: - return CreateOrganizationRequest( - description = '' - ) - else: - return CreateOrganizationRequest( - ) - """ - - def testCreateOrganizationRequest(self): - """Test CreateOrganizationRequest""" - # 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/sdk/python/sdk/zrok/test/test_disable_request.py b/sdk/python/sdk/zrok/test/test_disable_request.py deleted file mode 100644 index c4837b4b..00000000 --- a/sdk/python/sdk/zrok/test/test_disable_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.disable_request import DisableRequest - -class TestDisableRequest(unittest.TestCase): - """DisableRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DisableRequest: - """Test DisableRequest - include_optional 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 `DisableRequest` - """ - model = DisableRequest() - if include_optional: - return DisableRequest( - identity = '' - ) - else: - return DisableRequest( - ) - """ - - def testDisableRequest(self): - """Test DisableRequest""" - # 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/sdk/python/sdk/zrok/test/test_enable_request.py b/sdk/python/sdk/zrok/test/test_enable_request.py deleted file mode 100644 index 49689df4..00000000 --- a/sdk/python/sdk/zrok/test/test_enable_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.enable_request import EnableRequest - -class TestEnableRequest(unittest.TestCase): - """EnableRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnableRequest: - """Test EnableRequest - include_optional 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 `EnableRequest` - """ - model = EnableRequest() - if include_optional: - return EnableRequest( - description = '', - host = '' - ) - else: - return EnableRequest( - ) - """ - - def testEnableRequest(self): - """Test EnableRequest""" - # 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/sdk/python/sdk/zrok/test/test_environment.py b/sdk/python/sdk/zrok/test/test_environment.py deleted file mode 100644 index d2e28280..00000000 --- a/sdk/python/sdk/zrok/test/test_environment.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.environment import Environment - -class TestEnvironment(unittest.TestCase): - """Environment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Environment: - """Test Environment - include_optional 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 `Environment` - """ - model = Environment() - if include_optional: - return Environment( - description = '', - host = '', - address = '', - z_id = '', - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56 - ) - else: - return Environment( - ) - """ - - def testEnvironment(self): - """Test Environment""" - # 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/sdk/python/sdk/zrok/test/test_environment_and_resources.py b/sdk/python/sdk/zrok/test/test_environment_and_resources.py deleted file mode 100644 index 56cafdac..00000000 --- a/sdk/python/sdk/zrok/test/test_environment_and_resources.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.environment_and_resources import EnvironmentAndResources - -class TestEnvironmentAndResources(unittest.TestCase): - """EnvironmentAndResources unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnvironmentAndResources: - """Test EnvironmentAndResources - include_optional 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 `EnvironmentAndResources` - """ - model = EnvironmentAndResources() - if include_optional: - return EnvironmentAndResources( - environment = zrok_api.models.environment.environment( - description = '', - host = '', - address = '', - z_id = '', - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56, ), - frontends = [ - zrok_api.models.frontend.frontend( - id = 56, - frontend_token = '', - share_token = '', - backend_mode = '', - bind_address = '', - description = '', - z_id = '', - created_at = 56, - updated_at = 56, ) - ], - shares = [ - zrok_api.models.share.share( - share_token = '', - z_id = '', - share_mode = '', - backend_mode = '', - frontend_selection = '', - frontend_endpoint = '', - backend_proxy_endpoint = '', - reserved = True, - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56, ) - ] - ) - else: - return EnvironmentAndResources( - ) - """ - - def testEnvironmentAndResources(self): - """Test EnvironmentAndResources""" - # 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/sdk/python/sdk/zrok/test/test_environment_api.py b/sdk/python/sdk/zrok/test/test_environment_api.py deleted file mode 100644 index 83aeacd8..00000000 --- a/sdk/python/sdk/zrok/test/test_environment_api.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.environment_api import EnvironmentApi - - -class TestEnvironmentApi(unittest.TestCase): - """EnvironmentApi unit test stubs""" - - def setUp(self) -> None: - self.api = EnvironmentApi() - - def tearDown(self) -> None: - pass - - def test_disable(self) -> None: - """Test case for disable - - """ - pass - - def test_enable(self) -> None: - """Test case for enable - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend.py b/sdk/python/sdk/zrok/test/test_frontend.py deleted file mode 100644 index eba715d9..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.frontend import Frontend - -class TestFrontend(unittest.TestCase): - """Frontend unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Frontend: - """Test Frontend - include_optional 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 `Frontend` - """ - model = Frontend() - if include_optional: - return Frontend( - id = 56, - frontend_token = '', - share_token = '', - backend_mode = '', - bind_address = '', - description = '', - z_id = '', - created_at = 56, - updated_at = 56 - ) - else: - return Frontend( - ) - """ - - def testFrontend(self): - """Test Frontend""" - # 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/sdk/python/sdk/zrok/test/test_get_sparklines200_response.py b/sdk/python/sdk/zrok/test/test_get_sparklines200_response.py deleted file mode 100644 index 8367cc34..00000000 --- a/sdk/python/sdk/zrok/test/test_get_sparklines200_response.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.get_sparklines200_response import GetSparklines200Response - -class TestGetSparklines200Response(unittest.TestCase): - """GetSparklines200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetSparklines200Response: - """Test GetSparklines200Response - include_optional 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 `GetSparklines200Response` - """ - model = GetSparklines200Response() - if include_optional: - return GetSparklines200Response( - sparklines = [ - zrok_api.models.metrics.metrics( - scope = '', - id = '', - period = 1.337, - samples = [ - zrok_api.models.metrics_sample.metricsSample( - rx = 1.337, - tx = 1.337, - timestamp = 1.337, ) - ], ) - ] - ) - else: - return GetSparklines200Response( - ) - """ - - def testGetSparklines200Response(self): - """Test GetSparklines200Response""" - # 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/sdk/python/sdk/zrok/test/test_get_sparklines_request.py b/sdk/python/sdk/zrok/test/test_get_sparklines_request.py deleted file mode 100644 index cd46979b..00000000 --- a/sdk/python/sdk/zrok/test/test_get_sparklines_request.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.get_sparklines_request import GetSparklinesRequest - -class TestGetSparklinesRequest(unittest.TestCase): - """GetSparklinesRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetSparklinesRequest: - """Test GetSparklinesRequest - include_optional 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 `GetSparklinesRequest` - """ - model = GetSparklinesRequest() - if include_optional: - return GetSparklinesRequest( - account = True, - environments = [ - '' - ], - shares = [ - '' - ] - ) - else: - return GetSparklinesRequest( - ) - """ - - def testGetSparklinesRequest(self): - """Test GetSparklinesRequest""" - # 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/sdk/python/sdk/zrok/test/test_invite_request.py b/sdk/python/sdk/zrok/test/test_invite_request.py deleted file mode 100644 index a181ad3b..00000000 --- a/sdk/python/sdk/zrok/test/test_invite_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.invite_request import InviteRequest - -class TestInviteRequest(unittest.TestCase): - """InviteRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InviteRequest: - """Test InviteRequest - include_optional 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 `InviteRequest` - """ - model = InviteRequest() - if include_optional: - return InviteRequest( - email = '', - invite_token = '' - ) - else: - return InviteRequest( - ) - """ - - def testInviteRequest(self): - """Test InviteRequest""" - # 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/sdk/python/sdk/zrok/test/test_invite_token_generate_request.py b/sdk/python/sdk/zrok/test/test_invite_token_generate_request.py deleted file mode 100644 index 1a8c2c10..00000000 --- a/sdk/python/sdk/zrok/test/test_invite_token_generate_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest - -class TestInviteTokenGenerateRequest(unittest.TestCase): - """InviteTokenGenerateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InviteTokenGenerateRequest: - """Test InviteTokenGenerateRequest - include_optional 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 `InviteTokenGenerateRequest` - """ - model = InviteTokenGenerateRequest() - if include_optional: - return InviteTokenGenerateRequest( - invite_tokens = [ - '' - ] - ) - else: - return InviteTokenGenerateRequest( - ) - """ - - def testInviteTokenGenerateRequest(self): - """Test InviteTokenGenerateRequest""" - # 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/sdk/python/sdk/zrok/test/test_list_frontends200_response_inner.py b/sdk/python/sdk/zrok/test/test_list_frontends200_response_inner.py deleted file mode 100644 index 2e21b24d..00000000 --- a/sdk/python/sdk/zrok/test/test_list_frontends200_response_inner.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner - -class TestListFrontends200ResponseInner(unittest.TestCase): - """ListFrontends200ResponseInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListFrontends200ResponseInner: - """Test ListFrontends200ResponseInner - include_optional 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 `ListFrontends200ResponseInner` - """ - model = ListFrontends200ResponseInner() - if include_optional: - return ListFrontends200ResponseInner( - frontend_token = '', - z_id = '', - url_template = '', - public_name = '', - created_at = 56, - updated_at = 56 - ) - else: - return ListFrontends200ResponseInner( - ) - """ - - def testListFrontends200ResponseInner(self): - """Test ListFrontends200ResponseInner""" - # 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/sdk/python/sdk/zrok/test/test_list_memberships200_response.py b/sdk/python/sdk/zrok/test/test_list_memberships200_response.py deleted file mode 100644 index d23ac2dd..00000000 --- a/sdk/python/sdk/zrok/test/test_list_memberships200_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_memberships200_response import ListMemberships200Response - -class TestListMemberships200Response(unittest.TestCase): - """ListMemberships200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListMemberships200Response: - """Test ListMemberships200Response - include_optional 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 `ListMemberships200Response` - """ - model = ListMemberships200Response() - if include_optional: - return ListMemberships200Response( - memberships = [ - zrok_api.models.list_memberships_200_response_memberships_inner.listMemberships_200_response_memberships_inner( - organization_token = '', - description = '', - admin = True, ) - ] - ) - else: - return ListMemberships200Response( - ) - """ - - def testListMemberships200Response(self): - """Test ListMemberships200Response""" - # 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/sdk/python/sdk/zrok/test/test_list_memberships200_response_memberships_inner.py b/sdk/python/sdk/zrok/test/test_list_memberships200_response_memberships_inner.py deleted file mode 100644 index 2f7cf7ff..00000000 --- a/sdk/python/sdk/zrok/test/test_list_memberships200_response_memberships_inner.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner - -class TestListMemberships200ResponseMembershipsInner(unittest.TestCase): - """ListMemberships200ResponseMembershipsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListMemberships200ResponseMembershipsInner: - """Test ListMemberships200ResponseMembershipsInner - include_optional 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 `ListMemberships200ResponseMembershipsInner` - """ - model = ListMemberships200ResponseMembershipsInner() - if include_optional: - return ListMemberships200ResponseMembershipsInner( - organization_token = '', - description = '', - admin = True - ) - else: - return ListMemberships200ResponseMembershipsInner( - ) - """ - - def testListMemberships200ResponseMembershipsInner(self): - """Test ListMemberships200ResponseMembershipsInner""" - # 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/sdk/python/sdk/zrok/test/test_list_organization_members200_response.py b/sdk/python/sdk/zrok/test/test_list_organization_members200_response.py deleted file mode 100644 index 8020c6c7..00000000 --- a/sdk/python/sdk/zrok/test/test_list_organization_members200_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response - -class TestListOrganizationMembers200Response(unittest.TestCase): - """ListOrganizationMembers200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizationMembers200Response: - """Test ListOrganizationMembers200Response - include_optional 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 `ListOrganizationMembers200Response` - """ - model = ListOrganizationMembers200Response() - if include_optional: - return ListOrganizationMembers200Response( - members = [ - zrok_api.models.list_organization_members_200_response_members_inner.listOrganizationMembers_200_response_members_inner( - email = '', - admin = True, ) - ] - ) - else: - return ListOrganizationMembers200Response( - ) - """ - - def testListOrganizationMembers200Response(self): - """Test ListOrganizationMembers200Response""" - # 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/sdk/python/sdk/zrok/test/test_list_organization_members200_response_members_inner.py b/sdk/python/sdk/zrok/test/test_list_organization_members200_response_members_inner.py deleted file mode 100644 index 28cea33f..00000000 --- a/sdk/python/sdk/zrok/test/test_list_organization_members200_response_members_inner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner - -class TestListOrganizationMembers200ResponseMembersInner(unittest.TestCase): - """ListOrganizationMembers200ResponseMembersInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizationMembers200ResponseMembersInner: - """Test ListOrganizationMembers200ResponseMembersInner - include_optional 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 `ListOrganizationMembers200ResponseMembersInner` - """ - model = ListOrganizationMembers200ResponseMembersInner() - if include_optional: - return ListOrganizationMembers200ResponseMembersInner( - email = '', - admin = True - ) - else: - return ListOrganizationMembers200ResponseMembersInner( - ) - """ - - def testListOrganizationMembers200ResponseMembersInner(self): - """Test ListOrganizationMembers200ResponseMembersInner""" - # 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/sdk/python/sdk/zrok/test/test_list_organizations200_response.py b/sdk/python/sdk/zrok/test/test_list_organizations200_response.py deleted file mode 100644 index 7133529e..00000000 --- a/sdk/python/sdk/zrok/test/test_list_organizations200_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organizations200_response import ListOrganizations200Response - -class TestListOrganizations200Response(unittest.TestCase): - """ListOrganizations200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizations200Response: - """Test ListOrganizations200Response - include_optional 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 `ListOrganizations200Response` - """ - model = ListOrganizations200Response() - if include_optional: - return ListOrganizations200Response( - organizations = [ - zrok_api.models.list_organizations_200_response_organizations_inner.listOrganizations_200_response_organizations_inner( - organization_token = '', - description = '', ) - ] - ) - else: - return ListOrganizations200Response( - ) - """ - - def testListOrganizations200Response(self): - """Test ListOrganizations200Response""" - # 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/sdk/python/sdk/zrok/test/test_list_organizations200_response_organizations_inner.py b/sdk/python/sdk/zrok/test/test_list_organizations200_response_organizations_inner.py deleted file mode 100644 index 6d857ae1..00000000 --- a/sdk/python/sdk/zrok/test/test_list_organizations200_response_organizations_inner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner - -class TestListOrganizations200ResponseOrganizationsInner(unittest.TestCase): - """ListOrganizations200ResponseOrganizationsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizations200ResponseOrganizationsInner: - """Test ListOrganizations200ResponseOrganizationsInner - include_optional 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 `ListOrganizations200ResponseOrganizationsInner` - """ - model = ListOrganizations200ResponseOrganizationsInner() - if include_optional: - return ListOrganizations200ResponseOrganizationsInner( - organization_token = '', - description = '' - ) - else: - return ListOrganizations200ResponseOrganizationsInner( - ) - """ - - def testListOrganizations200ResponseOrganizationsInner(self): - """Test ListOrganizations200ResponseOrganizationsInner""" - # 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/sdk/python/sdk/zrok/test/test_login_request.py b/sdk/python/sdk/zrok/test/test_login_request.py deleted file mode 100644 index 1a4c2642..00000000 --- a/sdk/python/sdk/zrok/test/test_login_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.login_request import LoginRequest - -class TestLoginRequest(unittest.TestCase): - """LoginRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LoginRequest: - """Test LoginRequest - include_optional 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 `LoginRequest` - """ - model = LoginRequest() - if include_optional: - return LoginRequest( - email = '', - password = '' - ) - else: - return LoginRequest( - ) - """ - - def testLoginRequest(self): - """Test LoginRequest""" - # 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/sdk/python/sdk/zrok/test/test_metadata_api.py b/sdk/python/sdk/zrok/test/test_metadata_api.py deleted file mode 100644 index 2424ae4c..00000000 --- a/sdk/python/sdk/zrok/test/test_metadata_api.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.metadata_api import MetadataApi - - -class TestMetadataApi(unittest.TestCase): - """MetadataApi unit test stubs""" - - def setUp(self) -> None: - self.api = MetadataApi() - - def tearDown(self) -> None: - pass - - def test_client_version_check(self) -> None: - """Test case for client_version_check - - """ - pass - - def test_configuration(self) -> None: - """Test case for configuration - - """ - pass - - def test_get_account_detail(self) -> None: - """Test case for get_account_detail - - """ - pass - - def test_get_account_metrics(self) -> None: - """Test case for get_account_metrics - - """ - pass - - def test_get_environment_detail(self) -> None: - """Test case for get_environment_detail - - """ - pass - - def test_get_environment_metrics(self) -> None: - """Test case for get_environment_metrics - - """ - pass - - def test_get_frontend_detail(self) -> None: - """Test case for get_frontend_detail - - """ - pass - - def test_get_share_detail(self) -> None: - """Test case for get_share_detail - - """ - pass - - def test_get_share_metrics(self) -> None: - """Test case for get_share_metrics - - """ - pass - - def test_get_sparklines(self) -> None: - """Test case for get_sparklines - - """ - pass - - def test_list_memberships(self) -> None: - """Test case for list_memberships - - """ - pass - - def test_list_org_members(self) -> None: - """Test case for list_org_members - - """ - pass - - def test_org_account_overview(self) -> None: - """Test case for org_account_overview - - """ - pass - - def test_overview(self) -> None: - """Test case for overview - - """ - pass - - def test_version(self) -> None: - """Test case for version - - """ - pass - - def test_version_inventory(self) -> None: - """Test case for version_inventory - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metrics.py b/sdk/python/sdk/zrok/test/test_metrics.py deleted file mode 100644 index 04179009..00000000 --- a/sdk/python/sdk/zrok/test/test_metrics.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.metrics import Metrics - -class TestMetrics(unittest.TestCase): - """Metrics unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Metrics: - """Test Metrics - include_optional 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 `Metrics` - """ - model = Metrics() - if include_optional: - return Metrics( - scope = '', - id = '', - period = 1.337, - samples = [ - zrok_api.models.metrics_sample.metricsSample( - rx = 1.337, - tx = 1.337, - timestamp = 1.337, ) - ] - ) - else: - return Metrics( - ) - """ - - def testMetrics(self): - """Test Metrics""" - # 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/sdk/python/sdk/zrok/test/test_metrics_sample.py b/sdk/python/sdk/zrok/test/test_metrics_sample.py deleted file mode 100644 index 0b58e38d..00000000 --- a/sdk/python/sdk/zrok/test/test_metrics_sample.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.metrics_sample import MetricsSample - -class TestMetricsSample(unittest.TestCase): - """MetricsSample unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MetricsSample: - """Test MetricsSample - include_optional 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 `MetricsSample` - """ - model = MetricsSample() - if include_optional: - return MetricsSample( - rx = 1.337, - tx = 1.337, - timestamp = 1.337 - ) - else: - return MetricsSample( - ) - """ - - def testMetricsSample(self): - """Test MetricsSample""" - # 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/sdk/python/sdk/zrok/test/test_overview.py b/sdk/python/sdk/zrok/test/test_overview.py deleted file mode 100644 index 804007cd..00000000 --- a/sdk/python/sdk/zrok/test/test_overview.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.overview import Overview - -class TestOverview(unittest.TestCase): - """Overview unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Overview: - """Test Overview - include_optional 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 `Overview` - """ - model = Overview() - if include_optional: - return Overview( - account_limited = True, - environments = [ - zrok_api.models.environment_and_resources.environmentAndResources( - environment = zrok_api.models.environment.environment( - description = '', - host = '', - address = '', - z_id = '', - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56, ), - frontends = [ - zrok_api.models.frontend.frontend( - id = 56, - frontend_token = '', - share_token = '', - backend_mode = '', - bind_address = '', - description = '', - z_id = '', - created_at = 56, - updated_at = 56, ) - ], - shares = [ - zrok_api.models.share.share( - share_token = '', - z_id = '', - share_mode = '', - backend_mode = '', - frontend_selection = '', - frontend_endpoint = '', - backend_proxy_endpoint = '', - reserved = True, - limited = True, - created_at = 56, - updated_at = 56, ) - ], ) - ] - ) - else: - return Overview( - ) - """ - - def testOverview(self): - """Test Overview""" - # 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/sdk/python/sdk/zrok/test/test_principal.py b/sdk/python/sdk/zrok/test/test_principal.py deleted file mode 100644 index f92c159c..00000000 --- a/sdk/python/sdk/zrok/test/test_principal.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.principal import Principal - -class TestPrincipal(unittest.TestCase): - """Principal unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Principal: - """Test Principal - include_optional 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 `Principal` - """ - model = Principal() - if include_optional: - return Principal( - id = 56, - email = '', - token = '', - limitless = True, - admin = True - ) - else: - return Principal( - ) - """ - - def testPrincipal(self): - """Test Principal""" - # 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/sdk/python/sdk/zrok/test/test_regenerate_account_token200_response.py b/sdk/python/sdk/zrok/test/test_regenerate_account_token200_response.py deleted file mode 100644 index a94c4678..00000000 --- a/sdk/python/sdk/zrok/test/test_regenerate_account_token200_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response - -class TestRegenerateAccountToken200Response(unittest.TestCase): - """RegenerateAccountToken200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RegenerateAccountToken200Response: - """Test RegenerateAccountToken200Response - include_optional 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 `RegenerateAccountToken200Response` - """ - model = RegenerateAccountToken200Response() - if include_optional: - return RegenerateAccountToken200Response( - account_token = '' - ) - else: - return RegenerateAccountToken200Response( - ) - """ - - def testRegenerateAccountToken200Response(self): - """Test RegenerateAccountToken200Response""" - # 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/sdk/python/sdk/zrok/test/test_regenerate_account_token_request.py b/sdk/python/sdk/zrok/test/test_regenerate_account_token_request.py deleted file mode 100644 index b6e0b4bd..00000000 --- a/sdk/python/sdk/zrok/test/test_regenerate_account_token_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest - -class TestRegenerateAccountTokenRequest(unittest.TestCase): - """RegenerateAccountTokenRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RegenerateAccountTokenRequest: - """Test RegenerateAccountTokenRequest - include_optional 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 `RegenerateAccountTokenRequest` - """ - model = RegenerateAccountTokenRequest() - if include_optional: - return RegenerateAccountTokenRequest( - email_address = '' - ) - else: - return RegenerateAccountTokenRequest( - ) - """ - - def testRegenerateAccountTokenRequest(self): - """Test RegenerateAccountTokenRequest""" - # 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/sdk/python/sdk/zrok/test/test_register_request.py b/sdk/python/sdk/zrok/test/test_register_request.py deleted file mode 100644 index e026b200..00000000 --- a/sdk/python/sdk/zrok/test/test_register_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.register_request import RegisterRequest - -class TestRegisterRequest(unittest.TestCase): - """RegisterRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RegisterRequest: - """Test RegisterRequest - include_optional 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 `RegisterRequest` - """ - model = RegisterRequest() - if include_optional: - return RegisterRequest( - register_token = '', - password = '' - ) - else: - return RegisterRequest( - ) - """ - - def testRegisterRequest(self): - """Test RegisterRequest""" - # 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/sdk/python/sdk/zrok/test/test_remove_organization_member_request.py b/sdk/python/sdk/zrok/test/test_remove_organization_member_request.py deleted file mode 100644 index abf89606..00000000 --- a/sdk/python/sdk/zrok/test/test_remove_organization_member_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest - -class TestRemoveOrganizationMemberRequest(unittest.TestCase): - """RemoveOrganizationMemberRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RemoveOrganizationMemberRequest: - """Test RemoveOrganizationMemberRequest - include_optional 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 `RemoveOrganizationMemberRequest` - """ - model = RemoveOrganizationMemberRequest() - if include_optional: - return RemoveOrganizationMemberRequest( - organization_token = '', - email = '' - ) - else: - return RemoveOrganizationMemberRequest( - ) - """ - - def testRemoveOrganizationMemberRequest(self): - """Test RemoveOrganizationMemberRequest""" - # 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/sdk/python/sdk/zrok/test/test_reset_password_request.py b/sdk/python/sdk/zrok/test/test_reset_password_request.py deleted file mode 100644 index 2c047502..00000000 --- a/sdk/python/sdk/zrok/test/test_reset_password_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.reset_password_request import ResetPasswordRequest - -class TestResetPasswordRequest(unittest.TestCase): - """ResetPasswordRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ResetPasswordRequest: - """Test ResetPasswordRequest - include_optional 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 `ResetPasswordRequest` - """ - model = ResetPasswordRequest() - if include_optional: - return ResetPasswordRequest( - reset_token = '', - password = '' - ) - else: - return ResetPasswordRequest( - ) - """ - - def testResetPasswordRequest(self): - """Test ResetPasswordRequest""" - # 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/sdk/python/sdk/zrok/test/test_share.py b/sdk/python/sdk/zrok/test/test_share.py deleted file mode 100644 index ed498dc0..00000000 --- a/sdk/python/sdk/zrok/test/test_share.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.share import Share - -class TestShare(unittest.TestCase): - """Share unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Share: - """Test Share - include_optional 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 `Share` - """ - model = Share() - if include_optional: - return Share( - share_token = '', - z_id = '', - share_mode = '', - backend_mode = '', - frontend_selection = '', - frontend_endpoint = '', - backend_proxy_endpoint = '', - reserved = True, - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56 - ) - else: - return Share( - ) - """ - - def testShare(self): - """Test Share""" - # 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/sdk/python/sdk/zrok/test/test_share_api.py b/sdk/python/sdk/zrok/test/test_share_api.py deleted file mode 100644 index a22ef8bf..00000000 --- a/sdk/python/sdk/zrok/test/test_share_api.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.share_api import ShareApi - - -class TestShareApi(unittest.TestCase): - """ShareApi unit test stubs""" - - def setUp(self) -> None: - self.api = ShareApi() - - def tearDown(self) -> None: - pass - - def test_access(self) -> None: - """Test case for access - - """ - pass - - def test_share(self) -> None: - """Test case for share - - """ - pass - - def test_unaccess(self) -> None: - """Test case for unaccess - - """ - pass - - def test_unshare(self) -> None: - """Test case for unshare - - """ - pass - - def test_update_access(self) -> None: - """Test case for update_access - - """ - pass - - def test_update_share(self) -> None: - """Test case for update_share - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_request.py b/sdk/python/sdk/zrok/test/test_share_request.py deleted file mode 100644 index c543ae26..00000000 --- a/sdk/python/sdk/zrok/test/test_share_request.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.share_request import ShareRequest - -class TestShareRequest(unittest.TestCase): - """ShareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareRequest: - """Test ShareRequest - include_optional 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 `ShareRequest` - """ - model = ShareRequest() - if include_optional: - return ShareRequest( - env_zid = '', - share_mode = 'public', - frontend_selection = [ - '' - ], - backend_mode = 'proxy', - backend_proxy_endpoint = '', - auth_scheme = '', - auth_users = [ - zrok_api.models.auth_user.authUser( - username = '', - password = '', ) - ], - oauth_provider = 'github', - oauth_email_domains = [ - '' - ], - oauth_authorization_check_interval = '', - reserved = True, - permission_mode = 'open', - access_grants = [ - '' - ], - unique_name = '' - ) - else: - return ShareRequest( - ) - """ - - def testShareRequest(self): - """Test ShareRequest""" - # 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/sdk/python/sdk/zrok/test/test_share_response.py b/sdk/python/sdk/zrok/test/test_share_response.py deleted file mode 100644 index 46bb5af5..00000000 --- a/sdk/python/sdk/zrok/test/test_share_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.share_response import ShareResponse - -class TestShareResponse(unittest.TestCase): - """ShareResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareResponse: - """Test ShareResponse - include_optional 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 `ShareResponse` - """ - model = ShareResponse() - if include_optional: - return ShareResponse( - frontend_proxy_endpoints = [ - '' - ], - share_token = '' - ) - else: - return ShareResponse( - ) - """ - - def testShareResponse(self): - """Test ShareResponse""" - # 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/sdk/python/sdk/zrok/test/test_spark_data_sample.py b/sdk/python/sdk/zrok/test/test_spark_data_sample.py deleted file mode 100644 index 421d5dcd..00000000 --- a/sdk/python/sdk/zrok/test/test_spark_data_sample.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.spark_data_sample import SparkDataSample - -class TestSparkDataSample(unittest.TestCase): - """SparkDataSample unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SparkDataSample: - """Test SparkDataSample - include_optional 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 `SparkDataSample` - """ - model = SparkDataSample() - if include_optional: - return SparkDataSample( - rx = 1.337, - tx = 1.337 - ) - else: - return SparkDataSample( - ) - """ - - def testSparkDataSample(self): - """Test SparkDataSample""" - # 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/sdk/python/sdk/zrok/test/test_unaccess_request.py b/sdk/python/sdk/zrok/test/test_unaccess_request.py deleted file mode 100644 index ade50dff..00000000 --- a/sdk/python/sdk/zrok/test/test_unaccess_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.unaccess_request import UnaccessRequest - -class TestUnaccessRequest(unittest.TestCase): - """UnaccessRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnaccessRequest: - """Test UnaccessRequest - include_optional 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 `UnaccessRequest` - """ - model = UnaccessRequest() - if include_optional: - return UnaccessRequest( - frontend_token = '', - env_zid = '', - share_token = '' - ) - else: - return UnaccessRequest( - ) - """ - - def testUnaccessRequest(self): - """Test UnaccessRequest""" - # 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/sdk/python/sdk/zrok/test/test_unshare_request.py b/sdk/python/sdk/zrok/test/test_unshare_request.py deleted file mode 100644 index f0eccf47..00000000 --- a/sdk/python/sdk/zrok/test/test_unshare_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.unshare_request import UnshareRequest - -class TestUnshareRequest(unittest.TestCase): - """UnshareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnshareRequest: - """Test UnshareRequest - include_optional 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 `UnshareRequest` - """ - model = UnshareRequest() - if include_optional: - return UnshareRequest( - env_zid = '', - share_token = '', - reserved = True - ) - else: - return UnshareRequest( - ) - """ - - def testUnshareRequest(self): - """Test UnshareRequest""" - # 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/sdk/python/sdk/zrok/test/test_update_access_request.py b/sdk/python/sdk/zrok/test/test_update_access_request.py deleted file mode 100644 index 02c028bf..00000000 --- a/sdk/python/sdk/zrok/test/test_update_access_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.update_access_request import UpdateAccessRequest - -class TestUpdateAccessRequest(unittest.TestCase): - """UpdateAccessRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateAccessRequest: - """Test UpdateAccessRequest - include_optional 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 `UpdateAccessRequest` - """ - model = UpdateAccessRequest() - if include_optional: - return UpdateAccessRequest( - frontend_token = '', - bind_address = '', - description = '' - ) - else: - return UpdateAccessRequest( - ) - """ - - def testUpdateAccessRequest(self): - """Test UpdateAccessRequest""" - # 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/sdk/python/sdk/zrok/test/test_update_frontend_request.py b/sdk/python/sdk/zrok/test/test_update_frontend_request.py deleted file mode 100644 index 9546bbac..00000000 --- a/sdk/python/sdk/zrok/test/test_update_frontend_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.update_frontend_request import UpdateFrontendRequest - -class TestUpdateFrontendRequest(unittest.TestCase): - """UpdateFrontendRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateFrontendRequest: - """Test UpdateFrontendRequest - include_optional 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 `UpdateFrontendRequest` - """ - model = UpdateFrontendRequest() - if include_optional: - return UpdateFrontendRequest( - frontend_token = '', - public_name = '', - url_template = '' - ) - else: - return UpdateFrontendRequest( - ) - """ - - def testUpdateFrontendRequest(self): - """Test UpdateFrontendRequest""" - # 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/sdk/python/sdk/zrok/test/test_update_share_request.py b/sdk/python/sdk/zrok/test/test_update_share_request.py deleted file mode 100644 index 1d8df185..00000000 --- a/sdk/python/sdk/zrok/test/test_update_share_request.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.update_share_request import UpdateShareRequest - -class TestUpdateShareRequest(unittest.TestCase): - """UpdateShareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateShareRequest: - """Test UpdateShareRequest - include_optional 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 `UpdateShareRequest` - """ - model = UpdateShareRequest() - if include_optional: - return UpdateShareRequest( - share_token = '', - backend_proxy_endpoint = '', - add_access_grants = [ - '' - ], - remove_access_grants = [ - '' - ] - ) - else: - return UpdateShareRequest( - ) - """ - - def testUpdateShareRequest(self): - """Test UpdateShareRequest""" - # 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/sdk/python/sdk/zrok/test/test_verify200_response.py b/sdk/python/sdk/zrok/test/test_verify200_response.py deleted file mode 100644 index bf257b65..00000000 --- a/sdk/python/sdk/zrok/test/test_verify200_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.verify200_response import Verify200Response - -class TestVerify200Response(unittest.TestCase): - """Verify200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Verify200Response: - """Test Verify200Response - include_optional 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 `Verify200Response` - """ - model = Verify200Response() - if include_optional: - return Verify200Response( - email = '' - ) - else: - return Verify200Response( - ) - """ - - def testVerify200Response(self): - """Test Verify200Response""" - # 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/sdk/python/sdk/zrok/test/test_verify_request.py b/sdk/python/sdk/zrok/test/test_verify_request.py deleted file mode 100644 index c6f45d94..00000000 --- a/sdk/python/sdk/zrok/test/test_verify_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.verify_request import VerifyRequest - -class TestVerifyRequest(unittest.TestCase): - """VerifyRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VerifyRequest: - """Test VerifyRequest - include_optional 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 `VerifyRequest` - """ - model = VerifyRequest() - if include_optional: - return VerifyRequest( - register_token = '' - ) - else: - return VerifyRequest( - ) - """ - - def testVerifyRequest(self): - """Test VerifyRequest""" - # 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/sdk/python/sdk/zrok/test/test_version_inventory200_response.py b/sdk/python/sdk/zrok/test/test_version_inventory200_response.py deleted file mode 100644 index 7343fd1f..00000000 --- a/sdk/python/sdk/zrok/test/test_version_inventory200_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.version_inventory200_response import VersionInventory200Response - -class TestVersionInventory200Response(unittest.TestCase): - """VersionInventory200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VersionInventory200Response: - """Test VersionInventory200Response - include_optional 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 `VersionInventory200Response` - """ - model = VersionInventory200Response() - if include_optional: - return VersionInventory200Response( - controller_version = '' - ) - else: - return VersionInventory200Response( - ) - """ - - def testVersionInventory200Response(self): - """Test VersionInventory200Response""" - # 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/sdk/python/sdk/zrok/zrok/api_client_wrapper.py b/sdk/python/sdk/zrok/zrok/api_client_wrapper.py deleted file mode 100644 index 801608cc..00000000 --- a/sdk/python/sdk/zrok/zrok/api_client_wrapper.py +++ /dev/null @@ -1,50 +0,0 @@ -""" -Custom API client wrapper for zrok_api that handles zrok-specific content types. -""" - -import json -import re -from typing import Dict, Optional, Any, List, Tuple, Union - -from zrok_api.api_client import ApiClient -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponse -from zrok_api.exceptions import ApiException - -class ZrokApiClient(ApiClient): - """ - Custom API client that extends the generated ApiClient to handle zrok-specific content types. - """ - - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): - """ - Overrides the default deserialize method to handle zrok-specific content types. - """ - # Handle application/zrok.v1+json as if it were application/json - if content_type and content_type.startswith("application/zrok.v1+json"): - if response_text == "": - data = "" - else: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif content_type is None: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif content_type.startswith("application/json"): - if response_text == "": - data = "" - else: - data = json.loads(response_text) - elif content_type.startswith("text/plain"): - data = response_text - else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) - - return self._ApiClient__deserialize(data, response_type) # Access private method using name mangling diff --git a/sdk/python/sdk/zrok/zrok_api/__init__.py b/sdk/python/sdk/zrok/zrok_api/__init__.py deleted file mode 100644 index bf54fba9..00000000 --- a/sdk/python/sdk/zrok/zrok_api/__init__.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "1.0.0" - -# import apis into sdk package -from zrok_api.api.account_api import AccountApi -from zrok_api.api.admin_api import AdminApi -from zrok_api.api.environment_api import EnvironmentApi -from zrok_api.api.metadata_api import MetadataApi -from zrok_api.api.share_api import ShareApi - -# import ApiClient -from zrok_api.api_response import ApiResponse -from zrok_api.api_client import ApiClient -from zrok_api.configuration import Configuration -from zrok_api.exceptions import OpenApiException -from zrok_api.exceptions import ApiTypeError -from zrok_api.exceptions import ApiValueError -from zrok_api.exceptions import ApiKeyError -from zrok_api.exceptions import ApiAttributeError -from zrok_api.exceptions import ApiException - -# import models into sdk package -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.models.configuration import Configuration -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.models.disable_request import DisableRequest -from zrok_api.models.enable_request import EnableRequest -from zrok_api.models.environment import Environment -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.frontend import Frontend -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.models.invite_request import InviteRequest -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.metrics import Metrics -from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.overview import Overview -from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.models.register_request import RegisterRequest -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.models.share import Share -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.models.update_share_request import UpdateShareRequest -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest -from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/sdk/zrok/zrok_api/api/__init__.py b/sdk/python/sdk/zrok/zrok_api/api/__init__.py deleted file mode 100644 index 714f0a37..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# flake8: noqa - -# import apis into api package -from zrok_api.api.account_api import AccountApi -from zrok_api.api.admin_api import AdminApi -from zrok_api.api.environment_api import EnvironmentApi -from zrok_api.api.metadata_api import MetadataApi -from zrok_api.api.share_api import ShareApi - diff --git a/sdk/python/sdk/zrok/zrok_api/api/account_api.py b/sdk/python/sdk/zrok/zrok_api/api/account_api.py deleted file mode 100644 index d6a93a82..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/account_api.py +++ /dev/null @@ -1,2261 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 StrictStr -from typing import Optional -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.models.invite_request import InviteRequest -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.models.register_request import RegisterRequest -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class AccountApi: - """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 change_password( - self, - body: Optional[ChangePasswordRequest] = 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, - ) -> None: - """change_password - - - :param body: - :type body: ChangePasswordRequest - :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._change_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '422': "str", - '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 change_password_with_http_info( - self, - body: Optional[ChangePasswordRequest] = 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[None]: - """change_password - - - :param body: - :type body: ChangePasswordRequest - :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._change_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '422': "str", - '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 change_password_without_preload_content( - self, - body: Optional[ChangePasswordRequest] = 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: - """change_password - - - :param body: - :type body: ChangePasswordRequest - :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._change_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '422': "str", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _change_password_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/changePassword', - 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 invite( - self, - body: Optional[InviteRequest] = 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, - ) -> None: - """invite - - - :param body: - :type body: InviteRequest - :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._invite_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': "str", - '401': None, - '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 invite_with_http_info( - self, - body: Optional[InviteRequest] = 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[None]: - """invite - - - :param body: - :type body: InviteRequest - :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._invite_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': "str", - '401': None, - '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 invite_without_preload_content( - self, - body: Optional[InviteRequest] = 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: - """invite - - - :param body: - :type body: InviteRequest - :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._invite_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': "str", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _invite_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/invite', - 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 login( - self, - body: Optional[LoginRequest] = 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, - ) -> str: - """login - - - :param body: - :type body: LoginRequest - :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._login_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': 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 login_with_http_info( - self, - body: Optional[LoginRequest] = 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[str]: - """login - - - :param body: - :type body: LoginRequest - :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._login_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': 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 login_without_preload_content( - self, - body: Optional[LoginRequest] = 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: - """login - - - :param body: - :type body: LoginRequest - :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._login_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _login_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/login', - 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 regenerate_account_token( - self, - body: Optional[RegenerateAccountTokenRequest] = 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, - ) -> RegenerateAccountToken200Response: - """regenerate_account_token - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._regenerate_account_token_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '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 regenerate_account_token_with_http_info( - self, - body: Optional[RegenerateAccountTokenRequest] = 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[RegenerateAccountToken200Response]: - """regenerate_account_token - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._regenerate_account_token_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '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 regenerate_account_token_without_preload_content( - self, - body: Optional[RegenerateAccountTokenRequest] = 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: - """regenerate_account_token - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._regenerate_account_token_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _regenerate_account_token_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/regenerateAccountToken', - 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 register( - self, - body: Optional[RegisterRequest] = 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, - ) -> RegenerateAccountToken200Response: - """register - - - :param body: - :type body: RegisterRequest - :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._register_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '422': "str", - '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 register_with_http_info( - self, - body: Optional[RegisterRequest] = 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[RegenerateAccountToken200Response]: - """register - - - :param body: - :type body: RegisterRequest - :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._register_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '422': "str", - '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 register_without_preload_content( - self, - body: Optional[RegisterRequest] = 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: - """register - - - :param body: - :type body: RegisterRequest - :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._register_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '422': "str", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _register_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/register', - 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 reset_password( - self, - body: Optional[ResetPasswordRequest] = 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, - ) -> None: - """reset_password - - - :param body: - :type body: ResetPasswordRequest - :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._reset_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '404': None, - '422': "str", - '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 reset_password_with_http_info( - self, - body: Optional[ResetPasswordRequest] = 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[None]: - """reset_password - - - :param body: - :type body: ResetPasswordRequest - :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._reset_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '404': None, - '422': "str", - '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 reset_password_without_preload_content( - self, - body: Optional[ResetPasswordRequest] = 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: - """reset_password - - - :param body: - :type body: ResetPasswordRequest - :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._reset_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '404': None, - '422': "str", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _reset_password_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/resetPassword', - 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 reset_password_request( - self, - body: Optional[RegenerateAccountTokenRequest] = 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, - ) -> None: - """reset_password_request - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._reset_password_request_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '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 reset_password_request_with_http_info( - self, - body: Optional[RegenerateAccountTokenRequest] = 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[None]: - """reset_password_request - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._reset_password_request_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '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 reset_password_request_without_preload_content( - self, - body: Optional[RegenerateAccountTokenRequest] = 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: - """reset_password_request - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._reset_password_request_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _reset_password_request_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/resetPasswordRequest', - 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 verify( - self, - body: Optional[VerifyRequest] = 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, - ) -> Verify200Response: - """verify - - - :param body: - :type body: VerifyRequest - :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._verify_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Verify200Response", - '404': None, - '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 verify_with_http_info( - self, - body: Optional[VerifyRequest] = 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[Verify200Response]: - """verify - - - :param body: - :type body: VerifyRequest - :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._verify_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Verify200Response", - '404': None, - '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 verify_without_preload_content( - self, - body: Optional[VerifyRequest] = 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: - """verify - - - :param body: - :type body: VerifyRequest - :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._verify_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Verify200Response", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _verify_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/verify', - 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/sdk/python/sdk/zrok/zrok_api/api/admin_api.py b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py deleted file mode 100644 index 6e0952fe..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py +++ /dev/null @@ -1,3855 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import List, Optional -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.models.verify200_response import Verify200Response - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class AdminApi: - """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_organization_member( - self, - body: Optional[AddOrganizationMemberRequest] = 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, - ) -> None: - """add_organization_member - - - :param body: - :type body: AddOrganizationMemberRequest - :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_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '401': None, - '404': None, - '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_organization_member_with_http_info( - self, - body: Optional[AddOrganizationMemberRequest] = 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[None]: - """add_organization_member - - - :param body: - :type body: AddOrganizationMemberRequest - :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_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '401': None, - '404': None, - '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_organization_member_without_preload_content( - self, - body: Optional[AddOrganizationMemberRequest] = 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: - """add_organization_member - - - :param body: - :type body: AddOrganizationMemberRequest - :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_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _add_organization_member_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization/add', - 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_account( - self, - body: Optional[LoginRequest] = 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, - ) -> RegenerateAccountToken200Response: - """create_account - - - :param body: - :type body: LoginRequest - :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_account_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "RegenerateAccountToken200Response", - '401': None, - '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_account_with_http_info( - self, - body: Optional[LoginRequest] = 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[RegenerateAccountToken200Response]: - """create_account - - - :param body: - :type body: LoginRequest - :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_account_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "RegenerateAccountToken200Response", - '401': None, - '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_account_without_preload_content( - self, - body: Optional[LoginRequest] = 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: - """create_account - - - :param body: - :type body: LoginRequest - :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_account_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "RegenerateAccountToken200Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_account_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/account', - 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_frontend( - self, - body: Optional[CreateFrontendRequest] = 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, - ) -> CreateFrontend201Response: - """create_frontend - - - :param body: - :type body: CreateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateFrontend201Response", - '400': None, - '401': None, - '404': None, - '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_frontend_with_http_info( - self, - body: Optional[CreateFrontendRequest] = 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[CreateFrontend201Response]: - """create_frontend - - - :param body: - :type body: CreateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateFrontend201Response", - '400': None, - '401': None, - '404': None, - '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_frontend_without_preload_content( - self, - body: Optional[CreateFrontendRequest] = 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: - """create_frontend - - - :param body: - :type body: CreateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateFrontend201Response", - '400': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_frontend_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/frontend', - 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_identity( - self, - body: Optional[CreateIdentityRequest] = 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, - ) -> CreateIdentity201Response: - """create_identity - - - :param body: - :type body: CreateIdentityRequest - :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_identity_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '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_identity_with_http_info( - self, - body: Optional[CreateIdentityRequest] = 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[CreateIdentity201Response]: - """create_identity - - - :param body: - :type body: CreateIdentityRequest - :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_identity_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '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_identity_without_preload_content( - self, - body: Optional[CreateIdentityRequest] = 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: - """create_identity - - - :param body: - :type body: CreateIdentityRequest - :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_identity_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_identity_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/identity', - 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_organization( - self, - body: Optional[CreateOrganizationRequest] = 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, - ) -> CreateOrganization201Response: - """create_organization - - - :param body: - :type body: CreateOrganizationRequest - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateOrganization201Response", - '401': None, - '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_organization_with_http_info( - self, - body: Optional[CreateOrganizationRequest] = 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[CreateOrganization201Response]: - """create_organization - - - :param body: - :type body: CreateOrganizationRequest - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateOrganization201Response", - '401': None, - '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_organization_without_preload_content( - self, - body: Optional[CreateOrganizationRequest] = 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: - """create_organization - - - :param body: - :type body: CreateOrganizationRequest - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateOrganization201Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_organization_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization', - 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_frontend( - self, - body: Optional[CreateFrontend201Response] = 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, - ) -> None: - """delete_frontend - - - :param body: - :type body: CreateFrontend201Response - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_with_http_info( - self, - body: Optional[CreateFrontend201Response] = 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[None]: - """delete_frontend - - - :param body: - :type body: CreateFrontend201Response - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_without_preload_content( - self, - body: Optional[CreateFrontend201Response] = 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: - """delete_frontend - - - :param body: - :type body: CreateFrontend201Response - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_frontend_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/frontend', - 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_organization( - self, - body: Optional[CreateOrganization201Response] = 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, - ) -> None: - """delete_organization - - - :param body: - :type body: CreateOrganization201Response - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_organization_with_http_info( - self, - body: Optional[CreateOrganization201Response] = 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[None]: - """delete_organization - - - :param body: - :type body: CreateOrganization201Response - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_organization_without_preload_content( - self, - body: Optional[CreateOrganization201Response] = 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: - """delete_organization - - - :param body: - :type body: CreateOrganization201Response - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_organization_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/organization', - 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 grants( - self, - body: Optional[Verify200Response] = 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, - ) -> None: - """grants - - - :param body: - :type body: Verify200Response - :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._grants_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 grants_with_http_info( - self, - body: Optional[Verify200Response] = 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[None]: - """grants - - - :param body: - :type body: Verify200Response - :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._grants_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 grants_without_preload_content( - self, - body: Optional[Verify200Response] = 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: - """grants - - - :param body: - :type body: Verify200Response - :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._grants_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _grants_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/grants', - 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 invite_token_generate( - self, - body: Optional[InviteTokenGenerateRequest] = 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, - ) -> None: - """invite_token_generate - - - :param body: - :type body: InviteTokenGenerateRequest - :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._invite_token_generate_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '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 invite_token_generate_with_http_info( - self, - body: Optional[InviteTokenGenerateRequest] = 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[None]: - """invite_token_generate - - - :param body: - :type body: InviteTokenGenerateRequest - :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._invite_token_generate_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '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 invite_token_generate_without_preload_content( - self, - body: Optional[InviteTokenGenerateRequest] = 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: - """invite_token_generate - - - :param body: - :type body: InviteTokenGenerateRequest - :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._invite_token_generate_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _invite_token_generate_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/invite/token/generate', - 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_frontends( - 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, - ) -> List[ListFrontends200ResponseInner]: - """list_frontends - - - :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_frontends_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFrontends200ResponseInner]", - '401': None, - '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_frontends_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[List[ListFrontends200ResponseInner]]: - """list_frontends - - - :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_frontends_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFrontends200ResponseInner]", - '401': None, - '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_frontends_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: - """list_frontends - - - :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_frontends_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFrontends200ResponseInner]", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_frontends_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/frontends', - 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_organization_members( - self, - body: Optional[CreateOrganization201Response] = 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, - ) -> ListOrganizationMembers200Response: - """list_organization_members - - - :param body: - :type body: CreateOrganization201Response - :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_organization_members_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '401': None, - '404': None, - '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_organization_members_with_http_info( - self, - body: Optional[CreateOrganization201Response] = 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[ListOrganizationMembers200Response]: - """list_organization_members - - - :param body: - :type body: CreateOrganization201Response - :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_organization_members_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '401': None, - '404': None, - '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_organization_members_without_preload_content( - self, - body: Optional[CreateOrganization201Response] = 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_organization_members - - - :param body: - :type body: CreateOrganization201Response - :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_organization_members_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_organization_members_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization/list', - 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_organizations( - 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, - ) -> ListOrganizations200Response: - """list_organizations - - - :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_organizations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizations200Response", - '401': None, - '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_organizations_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[ListOrganizations200Response]: - """list_organizations - - - :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_organizations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizations200Response", - '401': None, - '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_organizations_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: - """list_organizations - - - :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_organizations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizations200Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_organizations_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/organizations', - 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 remove_organization_member( - self, - body: Optional[RemoveOrganizationMemberRequest] = 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, - ) -> None: - """remove_organization_member - - - :param body: - :type body: RemoveOrganizationMemberRequest - :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._remove_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 remove_organization_member_with_http_info( - self, - body: Optional[RemoveOrganizationMemberRequest] = 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[None]: - """remove_organization_member - - - :param body: - :type body: RemoveOrganizationMemberRequest - :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._remove_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 remove_organization_member_without_preload_content( - self, - body: Optional[RemoveOrganizationMemberRequest] = 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: - """remove_organization_member - - - :param body: - :type body: RemoveOrganizationMemberRequest - :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._remove_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _remove_organization_member_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization/remove', - 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_frontend( - self, - body: Optional[UpdateFrontendRequest] = 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, - ) -> None: - """update_frontend - - - :param body: - :type body: UpdateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_with_http_info( - self, - body: Optional[UpdateFrontendRequest] = 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[None]: - """update_frontend - - - :param body: - :type body: UpdateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_without_preload_content( - self, - body: Optional[UpdateFrontendRequest] = 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: - """update_frontend - - - :param body: - :type body: UpdateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_frontend_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/frontend', - 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/sdk/python/sdk/zrok/zrok_api/api/environment_api.py b/sdk/python/sdk/zrok/zrok_api/api/environment_api.py deleted file mode 100644 index 4495d736..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py +++ /dev/null @@ -1,589 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.disable_request import DisableRequest -from zrok_api.models.enable_request import EnableRequest - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class EnvironmentApi: - """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 disable( - self, - body: Optional[DisableRequest] = 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, - ) -> None: - """disable - - - :param body: - :type body: DisableRequest - :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._disable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '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 disable_with_http_info( - self, - body: Optional[DisableRequest] = 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[None]: - """disable - - - :param body: - :type body: DisableRequest - :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._disable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '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 disable_without_preload_content( - self, - body: Optional[DisableRequest] = 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: - """disable - - - :param body: - :type body: DisableRequest - :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._disable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _disable_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/disable', - 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 enable( - self, - body: Optional[EnableRequest] = 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, - ) -> CreateIdentity201Response: - """enable - - - :param body: - :type body: EnableRequest - :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._enable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '404': None, - '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 enable_with_http_info( - self, - body: Optional[EnableRequest] = 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[CreateIdentity201Response]: - """enable - - - :param body: - :type body: EnableRequest - :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._enable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '404': None, - '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 enable_without_preload_content( - self, - body: Optional[EnableRequest] = 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: - """enable - - - :param body: - :type body: EnableRequest - :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._enable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _enable_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/enable', - 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/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py deleted file mode 100644 index ae780e05..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py +++ /dev/null @@ -1,4242 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import List, Optional -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.models.configuration import Configuration -from zrok_api.models.environment import Environment -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.frontend import Frontend -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.metrics import Metrics -from zrok_api.models.overview import Overview -from zrok_api.models.share import Share -from zrok_api.models.version_inventory200_response import VersionInventory200Response - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class MetadataApi: - """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 client_version_check( - self, - body: Optional[ClientVersionCheckRequest] = 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, - ) -> None: - """client_version_check - - - :param body: - :type body: ClientVersionCheckRequest - :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._client_version_check_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - 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 client_version_check_with_http_info( - self, - body: Optional[ClientVersionCheckRequest] = 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[None]: - """client_version_check - - - :param body: - :type body: ClientVersionCheckRequest - :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._client_version_check_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - 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 client_version_check_without_preload_content( - self, - body: Optional[ClientVersionCheckRequest] = 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: - """client_version_check - - - :param body: - :type body: ClientVersionCheckRequest - :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._client_version_check_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _client_version_check_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/clientVersionCheck', - 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 configuration( - 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, - ) -> Configuration: - """configuration - - - :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._configuration_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Configuration", - } - 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 configuration_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[Configuration]: - """configuration - - - :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._configuration_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Configuration", - } - 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 configuration_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: - """configuration - - - :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._configuration_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Configuration", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _configuration_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/configuration', - 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 get_account_detail( - 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, - ) -> List[Environment]: - """get_account_detail - - - :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_account_detail_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Environment]", - '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_account_detail_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[List[Environment]]: - """get_account_detail - - - :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_account_detail_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Environment]", - '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_account_detail_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_account_detail - - - :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_account_detail_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Environment]", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_account_detail_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/account', - 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 get_account_metrics( - self, - 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, - ) -> Metrics: - """get_account_metrics - - - :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._get_account_metrics_serialize( - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '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_account_metrics_with_http_info( - self, - 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[Metrics]: - """get_account_metrics - - - :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._get_account_metrics_serialize( - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '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_account_metrics_without_preload_content( - self, - 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: - """get_account_metrics - - - :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._get_account_metrics_serialize( - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_account_metrics_serialize( - self, - 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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/metrics/account', - 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 get_environment_detail( - self, - env_zid: StrictStr, - _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, - ) -> EnvironmentAndResources: - """get_environment_detail - - - :param env_zid: (required) - :type env_zid: 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._get_environment_detail_serialize( - env_zid=env_zid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentAndResources", - '401': None, - '404': None, - '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_environment_detail_with_http_info( - self, - env_zid: StrictStr, - _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[EnvironmentAndResources]: - """get_environment_detail - - - :param env_zid: (required) - :type env_zid: 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._get_environment_detail_serialize( - env_zid=env_zid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentAndResources", - '401': None, - '404': None, - '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_environment_detail_without_preload_content( - self, - env_zid: StrictStr, - _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_environment_detail - - - :param env_zid: (required) - :type env_zid: 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._get_environment_detail_serialize( - env_zid=env_zid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentAndResources", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_environment_detail_serialize( - self, - env_zid, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env_zid is not None: - _path_params['envZId'] = env_zid - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/environment/{envZId}', - 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 get_environment_metrics( - self, - env_id: StrictStr, - 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, - ) -> Metrics: - """get_environment_metrics - - - :param env_id: (required) - :type env_id: str - :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._get_environment_metrics_serialize( - env_id=env_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': "Metrics", - '400': None, - '401': None, - '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_environment_metrics_with_http_info( - self, - env_id: StrictStr, - 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[Metrics]: - """get_environment_metrics - - - :param env_id: (required) - :type env_id: str - :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._get_environment_metrics_serialize( - env_id=env_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': "Metrics", - '400': None, - '401': None, - '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_environment_metrics_without_preload_content( - self, - env_id: StrictStr, - 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: - """get_environment_metrics - - - :param env_id: (required) - :type env_id: str - :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._get_environment_metrics_serialize( - env_id=env_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': "Metrics", - '400': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_environment_metrics_serialize( - self, - env_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env_id is not None: - _path_params['envId'] = env_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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/metrics/environment/{envId}', - 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 get_frontend_detail( - self, - frontend_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, - ) -> Frontend: - """get_frontend_detail - - - :param frontend_id: (required) - :type frontend_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._get_frontend_detail_serialize( - frontend_id=frontend_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Frontend", - '401': None, - '404': None, - '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_frontend_detail_with_http_info( - self, - frontend_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[Frontend]: - """get_frontend_detail - - - :param frontend_id: (required) - :type frontend_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._get_frontend_detail_serialize( - frontend_id=frontend_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Frontend", - '401': None, - '404': None, - '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_frontend_detail_without_preload_content( - self, - frontend_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: - """get_frontend_detail - - - :param frontend_id: (required) - :type frontend_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._get_frontend_detail_serialize( - frontend_id=frontend_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Frontend", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_frontend_detail_serialize( - self, - frontend_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if frontend_id is not None: - _path_params['frontendId'] = frontend_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/frontend/{frontendId}', - 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 get_share_detail( - self, - share_token: StrictStr, - _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, - ) -> Share: - """get_share_detail - - - :param share_token: (required) - :type share_token: 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._get_share_detail_serialize( - share_token=share_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Share", - '401': None, - '404': None, - '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_share_detail_with_http_info( - self, - share_token: StrictStr, - _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[Share]: - """get_share_detail - - - :param share_token: (required) - :type share_token: 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._get_share_detail_serialize( - share_token=share_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Share", - '401': None, - '404': None, - '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_share_detail_without_preload_content( - self, - share_token: StrictStr, - _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_share_detail - - - :param share_token: (required) - :type share_token: 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._get_share_detail_serialize( - share_token=share_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Share", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_share_detail_serialize( - self, - share_token, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if share_token is not None: - _path_params['shareToken'] = share_token - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/share/{shareToken}', - 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 get_share_metrics( - self, - share_token: StrictStr, - 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, - ) -> Metrics: - """get_share_metrics - - - :param share_token: (required) - :type share_token: str - :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._get_share_metrics_serialize( - share_token=share_token, - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '401': None, - '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_share_metrics_with_http_info( - self, - share_token: StrictStr, - 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[Metrics]: - """get_share_metrics - - - :param share_token: (required) - :type share_token: str - :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._get_share_metrics_serialize( - share_token=share_token, - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '401': None, - '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_share_metrics_without_preload_content( - self, - share_token: StrictStr, - 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: - """get_share_metrics - - - :param share_token: (required) - :type share_token: str - :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._get_share_metrics_serialize( - share_token=share_token, - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_share_metrics_serialize( - self, - share_token, - 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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if share_token is not None: - _path_params['shareToken'] = share_token - # 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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/metrics/share/{shareToken}', - 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 get_sparklines( - self, - body: Optional[GetSparklinesRequest] = 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, - ) -> GetSparklines200Response: - """get_sparklines - - - :param body: - :type body: GetSparklinesRequest - :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_sparklines_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSparklines200Response", - '401': None, - '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_sparklines_with_http_info( - self, - body: Optional[GetSparklinesRequest] = 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[GetSparklines200Response]: - """get_sparklines - - - :param body: - :type body: GetSparklinesRequest - :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_sparklines_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSparklines200Response", - '401': None, - '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_sparklines_without_preload_content( - self, - body: Optional[GetSparklinesRequest] = 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: - """get_sparklines - - - :param body: - :type body: GetSparklinesRequest - :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_sparklines_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSparklines200Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_sparklines_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/sparklines', - 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_memberships( - 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, - ) -> ListMemberships200Response: - """list_memberships - - - :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_memberships_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMemberships200Response", - '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_memberships_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[ListMemberships200Response]: - """list_memberships - - - :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_memberships_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMemberships200Response", - '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_memberships_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: - """list_memberships - - - :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_memberships_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMemberships200Response", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_memberships_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/memberships', - 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_org_members( - self, - organization_token: StrictStr, - _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, - ) -> ListOrganizationMembers200Response: - """list_org_members - - - :param organization_token: (required) - :type organization_token: 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._list_org_members_serialize( - organization_token=organization_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '404': None, - '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_org_members_with_http_info( - self, - organization_token: StrictStr, - _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[ListOrganizationMembers200Response]: - """list_org_members - - - :param organization_token: (required) - :type organization_token: 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._list_org_members_serialize( - organization_token=organization_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '404': None, - '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_org_members_without_preload_content( - self, - organization_token: StrictStr, - _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_org_members - - - :param organization_token: (required) - :type organization_token: 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._list_org_members_serialize( - organization_token=organization_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_org_members_serialize( - self, - organization_token, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if organization_token is not None: - _path_params['organizationToken'] = organization_token - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/members/{organizationToken}', - 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 org_account_overview( - self, - organization_token: StrictStr, - account_email: StrictStr, - _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, - ) -> Overview: - """org_account_overview - - - :param organization_token: (required) - :type organization_token: str - :param account_email: (required) - :type account_email: 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._org_account_overview_serialize( - organization_token=organization_token, - account_email=account_email, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '404': None, - '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 org_account_overview_with_http_info( - self, - organization_token: StrictStr, - account_email: StrictStr, - _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[Overview]: - """org_account_overview - - - :param organization_token: (required) - :type organization_token: str - :param account_email: (required) - :type account_email: 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._org_account_overview_serialize( - organization_token=organization_token, - account_email=account_email, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '404': None, - '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 org_account_overview_without_preload_content( - self, - organization_token: StrictStr, - account_email: StrictStr, - _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: - """org_account_overview - - - :param organization_token: (required) - :type organization_token: str - :param account_email: (required) - :type account_email: 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._org_account_overview_serialize( - organization_token=organization_token, - account_email=account_email, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _org_account_overview_serialize( - self, - organization_token, - account_email, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if organization_token is not None: - _path_params['organizationToken'] = organization_token - if account_email is not None: - _path_params['accountEmail'] = account_email - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/overview/{organizationToken}/{accountEmail}', - 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 overview( - 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, - ) -> Overview: - """overview - - - :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._overview_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '500': "str", - } - 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 overview_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[Overview]: - """overview - - - :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._overview_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '500': "str", - } - 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 overview_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: - """overview - - - :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._overview_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _overview_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/overview', - 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 version( - 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, - ) -> str: - """version - - - :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._version_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - 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 version_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[str]: - """version - - - :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._version_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - 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 version_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: - """version - - - :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._version_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _version_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/version', - 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 version_inventory( - 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, - ) -> VersionInventory200Response: - """version_inventory - - - :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._version_inventory_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionInventory200Response", - } - 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 version_inventory_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[VersionInventory200Response]: - """version_inventory - - - :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._version_inventory_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionInventory200Response", - } - 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 version_inventory_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: - """version_inventory - - - :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._version_inventory_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionInventory200Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _version_inventory_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/versions', - 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/sdk/python/sdk/zrok/zrok_api/api/share_api.py b/sdk/python/sdk/zrok/zrok_api/api/share_api.py deleted file mode 100644 index 626035ee..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/share_api.py +++ /dev/null @@ -1,1712 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.models.update_share_request import UpdateShareRequest - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class ShareApi: - """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 access( - self, - body: Optional[AccessRequest] = 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, - ) -> Access201Response: - """access - - - :param body: - :type body: AccessRequest - :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._access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "Access201Response", - '401': None, - '404': None, - '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 access_with_http_info( - self, - body: Optional[AccessRequest] = 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[Access201Response]: - """access - - - :param body: - :type body: AccessRequest - :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._access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "Access201Response", - '401': None, - '404': None, - '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 access_without_preload_content( - self, - body: Optional[AccessRequest] = 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: - """access - - - :param body: - :type body: AccessRequest - :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._access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "Access201Response", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _access_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/access', - 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 share( - self, - body: Optional[ShareRequest] = 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, - ) -> ShareResponse: - """share - - - :param body: - :type body: ShareRequest - :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._share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareResponse", - '401': None, - '404': None, - '409': None, - '422': None, - '500': "str", - } - 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 share_with_http_info( - self, - body: Optional[ShareRequest] = 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[ShareResponse]: - """share - - - :param body: - :type body: ShareRequest - :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._share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareResponse", - '401': None, - '404': None, - '409': None, - '422': None, - '500': "str", - } - 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 share_without_preload_content( - self, - body: Optional[ShareRequest] = 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: - """share - - - :param body: - :type body: ShareRequest - :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._share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareResponse", - '401': None, - '404': None, - '409': None, - '422': None, - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _share_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/share', - 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 unaccess( - self, - body: Optional[UnaccessRequest] = 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, - ) -> None: - """unaccess - - - :param body: - :type body: UnaccessRequest - :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._unaccess_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 unaccess_with_http_info( - self, - body: Optional[UnaccessRequest] = 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[None]: - """unaccess - - - :param body: - :type body: UnaccessRequest - :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._unaccess_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 unaccess_without_preload_content( - self, - body: Optional[UnaccessRequest] = 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: - """unaccess - - - :param body: - :type body: UnaccessRequest - :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._unaccess_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _unaccess_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/unaccess', - 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 unshare( - self, - body: Optional[UnshareRequest] = 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, - ) -> None: - """unshare - - - :param body: - :type body: UnshareRequest - :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._unshare_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': "str", - } - 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 unshare_with_http_info( - self, - body: Optional[UnshareRequest] = 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[None]: - """unshare - - - :param body: - :type body: UnshareRequest - :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._unshare_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': "str", - } - 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 unshare_without_preload_content( - self, - body: Optional[UnshareRequest] = 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: - """unshare - - - :param body: - :type body: UnshareRequest - :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._unshare_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _unshare_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/unshare', - 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_access( - self, - body: Optional[UpdateAccessRequest] = 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, - ) -> None: - """update_access - - - :param body: - :type body: UpdateAccessRequest - :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_access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_access_with_http_info( - self, - body: Optional[UpdateAccessRequest] = 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[None]: - """update_access - - - :param body: - :type body: UpdateAccessRequest - :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_access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_access_without_preload_content( - self, - body: Optional[UpdateAccessRequest] = 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: - """update_access - - - :param body: - :type body: UpdateAccessRequest - :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_access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_access_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/access', - 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_share( - self, - body: Optional[UpdateShareRequest] = 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, - ) -> None: - """update_share - - - :param body: - :type body: UpdateShareRequest - :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_share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '404': None, - '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_share_with_http_info( - self, - body: Optional[UpdateShareRequest] = 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[None]: - """update_share - - - :param body: - :type body: UpdateShareRequest - :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_share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '404': None, - '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_share_without_preload_content( - self, - body: Optional[UpdateShareRequest] = 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: - """update_share - - - :param body: - :type body: UpdateShareRequest - :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_share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_share_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/share', - 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/sdk/python/sdk/zrok/zrok_api/api_client.py b/sdk/python/sdk/zrok/zrok_api/api_client.py deleted file mode 100644 index 7b417812..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api_client.py +++ /dev/null @@ -1,797 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import datetime -from dateutil.parser import parse -from enum import Enum -import decimal -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union -from pydantic import SecretStr - -from zrok_api.configuration import Configuration -from zrok_api.api_response import ApiResponse, T as ApiResponseT -import zrok_api.models -from zrok_api import rest -from zrok_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - -RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> RequestSerialized: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - if files: - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None or self.configuration.ignore_operation_servers: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - raise e - - return response_data - - def response_deserialize( - self, - response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None - ) -> ApiResponse[ApiResponseT]: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - msg = "RESTResponse.read() must be called before passing it to response_deserialize()" - assert response_data.data is not None, msg - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - # deserialize response data - response_text = None - return_data = None - try: - if response_type == "bytearray": - return_data = response_data.data - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - elif response_type is not None: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type, content_type) - finally: - if not 200 <= response_data.status <= 299: - raise ApiException.from_response( - http_resp=response_data, - body=response_text, - data=return_data, - ) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is SecretStr, return obj.get_secret_value() - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is decimal.Decimal return string representation. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, Enum): - return obj.value - elif isinstance(obj, SecretStr): - return obj.get_secret_value() - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - elif isinstance(obj, decimal.Decimal): - return str(obj) - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): - obj_dict = obj.to_dict() - else: - obj_dict = obj.__dict__ - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - :param content_type: content type of response. - - :return: deserialized object. - """ - - # fetch data from response object - if content_type is None: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): - if response_text == "": - data = "" - else: - data = json.loads(response_text) - elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): - data = response_text - else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) - assert m is not None, "Malformed List type definition" - sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) - assert m is not None, "Malformed Dict type definition" - sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(zrok_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - elif klass == decimal.Decimal: - return decimal.Decimal(data) - elif issubclass(klass, Enum): - return self.__deserialize_enum(data, klass) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, quote(str(value))) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(map(str, item)) for item in new_params]) - - def files_parameters( - self, - files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], - ): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - for k, v in files.items(): - if isinstance(v, str): - with open(v, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - elif isinstance(v, bytes): - filename = k - filedata = v - elif isinstance(v, tuple): - filename, filedata = v - elif isinstance(v, list): - for file_param in v: - params.extend(self.files_parameters({k: file_param})) - continue - else: - raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) - assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __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. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/sdk/python/sdk/zrok/zrok_api/api_response.py b/sdk/python/sdk/zrok/zrok_api/api_response.py deleted file mode 100644 index 9bc7c11f..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Optional, Generic, Mapping, TypeVar -from pydantic import Field, StrictInt, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/sdk/python/sdk/zrok/zrok_api/configuration.py b/sdk/python/sdk/zrok/zrok_api/configuration.py deleted file mode 100644 index d504babc..00000000 --- a/sdk/python/sdk/zrok/zrok_api/configuration.py +++ /dev/null @@ -1,602 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import http.client as httplib -import logging -from logging import FileHandler -import multiprocessing -import sys -from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from typing_extensions import NotRequired, Self - -import urllib3 - - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -ServerVariablesT = Dict[str, str] - -GenericAuthSetting = TypedDict( - "GenericAuthSetting", - { - "type": str, - "in": str, - "key": str, - "value": str, - }, -) - - -OAuth2AuthSetting = TypedDict( - "OAuth2AuthSetting", - { - "type": Literal["oauth2"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -APIKeyAuthSetting = TypedDict( - "APIKeyAuthSetting", - { - "type": Literal["api_key"], - "in": str, - "key": str, - "value": Optional[str], - }, -) - - -BasicAuthSetting = TypedDict( - "BasicAuthSetting", - { - "type": Literal["basic"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": Optional[str], - }, -) - - -BearerFormatAuthSetting = TypedDict( - "BearerFormatAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "format": Literal["JWT"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -BearerAuthSetting = TypedDict( - "BearerAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -HTTPSignatureAuthSetting = TypedDict( - "HTTPSignatureAuthSetting", - { - "type": Literal["http-signature"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": None, - }, -) - - -AuthSettings = TypedDict( - "AuthSettings", - { - "key": APIKeyAuthSetting, - }, - total=False, -) - - -class HostSettingVariable(TypedDict): - description: str - default_value: str - enum_values: List[str] - - -class HostSetting(TypedDict): - url: str - description: str - variables: NotRequired[Dict[str, HostSettingVariable]] - - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: Number of retries for API requests. - :param ca_cert_data: verify the peer using concatenated CA certificate data - in PEM (str) or DER (bytes) format. - - :Example: - - API Key Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - cookieAuth: # name for the security scheme - type: apiKey - in: cookie - name: JSESSIONID # cookie name - - You can programmatically set the cookie: - -conf = zrok_api.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} -) - - The following cookie will be added to the HTTP request: - Cookie: JSESSIONID abc123 - """ - - _default: ClassVar[Optional[Self]] = None - - def __init__( - self, - host: Optional[str]=None, - api_key: Optional[Dict[str, str]]=None, - api_key_prefix: Optional[Dict[str, str]]=None, - username: Optional[str]=None, - password: Optional[str]=None, - access_token: Optional[str]=None, - server_index: Optional[int]=None, - server_variables: Optional[ServerVariablesT]=None, - server_operation_index: Optional[Dict[int, int]]=None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, - ignore_operation_servers: bool=False, - ssl_ca_cert: Optional[str]=None, - retries: Optional[int] = None, - ca_cert_data: Optional[Union[str, bytes]] = None, - *, - debug: Optional[bool] = None, - ) -> None: - """Constructor - """ - self._base_path = "/api/v1" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.ignore_operation_servers = ignore_operation_servers - """Ignore operation servers - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("zrok_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler: Optional[FileHandler] = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - if debug is not None: - self.debug = debug - else: - self.__debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.ca_cert_data = ca_cert_data - """Set this to verify the peer using PEM (str) or DER (bytes) - certificate data. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy: Optional[str] = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = retries - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name: str, value: Any) -> None: - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default: Optional[Self]) -> None: - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls) -> Self: - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls) -> Self: - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = cls() - return cls._default - - @property - def logger_file(self) -> Optional[str]: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value: Optional[str]) -> None: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self) -> bool: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value: bool) -> None: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self) -> str: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value: str) -> None: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - return None - - def get_basic_auth_token(self) -> Optional[str]: - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self)-> AuthSettings: - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth: AuthSettings = {} - if 'key' in self.api_key: - auth['key'] = { - 'type': 'api_key', - 'in': 'header', - 'key': 'x-token', - 'value': self.get_api_key_with_prefix( - 'key', - ), - } - return auth - - def to_debug_report(self) -> str: - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self) -> List[HostSetting]: - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "/api/v1", - 'description': "No description provided", - } - ] - - def get_host_from_settings( - self, - index: Optional[int], - variables: Optional[ServerVariablesT]=None, - servers: Optional[List[HostSetting]]=None, - ) -> str: - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self) -> str: - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value: str) -> None: - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/sdk/python/sdk/zrok/zrok_api/exceptions.py b/sdk/python/sdk/zrok/zrok_api/exceptions.py deleted file mode 100644 index 1b37d862..00000000 --- a/sdk/python/sdk/zrok/zrok_api/exceptions.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -from typing import Any, Optional -from typing_extensions import Self - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__( - self, - status=None, - reason=None, - http_resp=None, - *, - body: Optional[str] = None, - data: Optional[Any] = None, - ) -> None: - self.status = status - self.reason = reason - self.body = body - self.data = data - self.headers = None - - if http_resp: - if self.status is None: - self.status = http_resp.status - if self.reason is None: - self.reason = http_resp.reason - if self.body is None: - try: - self.body = http_resp.data.decode('utf-8') - except Exception: - pass - self.headers = http_resp.getheaders() - - @classmethod - def from_response( - cls, - *, - http_resp, - body: Optional[str], - data: Optional[Any], - ) -> Self: - if http_resp.status == 400: - raise BadRequestException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 401: - raise UnauthorizedException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 403: - raise ForbiddenException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 404: - raise NotFoundException(http_resp=http_resp, body=body, data=data) - - # Added new conditions for 409 and 422 - if http_resp.status == 409: - raise ConflictException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 422: - raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) - - if 500 <= http_resp.status <= 599: - raise ServiceException(http_resp=http_resp, body=body, data=data) - raise ApiException(http_resp=http_resp, body=body, data=data) - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.data or self.body: - error_message += "HTTP response body: {0}\n".format(self.data or self.body) - - return error_message - - -class BadRequestException(ApiException): - pass - - -class NotFoundException(ApiException): - pass - - -class UnauthorizedException(ApiException): - pass - - -class ForbiddenException(ApiException): - pass - - -class ServiceException(ApiException): - pass - - -class ConflictException(ApiException): - """Exception for HTTP 409 Conflict.""" - pass - - -class UnprocessableEntityException(ApiException): - """Exception for HTTP 422 Unprocessable Entity.""" - pass - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/sdk/python/sdk/zrok/zrok_api/models/__init__.py b/sdk/python/sdk/zrok/zrok_api/models/__init__.py deleted file mode 100644 index c4f5e3c4..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/__init__.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.models.configuration import Configuration -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.models.disable_request import DisableRequest -from zrok_api.models.enable_request import EnableRequest -from zrok_api.models.environment import Environment -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.frontend import Frontend -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.models.invite_request import InviteRequest -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.metrics import Metrics -from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.overview import Overview -from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.models.register_request import RegisterRequest -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.models.share import Share -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.models.update_share_request import UpdateShareRequest -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest -from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/sdk/zrok/zrok_api/models/access201_response.py b/sdk/python/sdk/zrok/zrok_api/models/access201_response.py deleted file mode 100644 index 6058082c..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/access201_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class Access201Response(BaseModel): - """ - Access201Response - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - __properties: ClassVar[List[str]] = ["frontendToken", "backendMode"] - - 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 Access201Response 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 Access201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "backendMode": obj.get("backendMode") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_request.py b/sdk/python/sdk/zrok/zrok_api/models/access_request.py deleted file mode 100644 index 18eb9837..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/access_request.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class AccessRequest(BaseModel): - """ - AccessRequest - """ # noqa: E501 - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["envZId", "shareToken", "bindAddress", "description"] - - 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 AccessRequest 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 AccessRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "envZId": obj.get("envZId"), - "shareToken": obj.get("shareToken"), - "bindAddress": obj.get("bindAddress"), - "description": obj.get("description") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/add_organization_member_request.py b/sdk/python/sdk/zrok/zrok_api/models/add_organization_member_request.py deleted file mode 100644 index d6db9e38..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/add_organization_member_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class AddOrganizationMemberRequest(BaseModel): - """ - AddOrganizationMemberRequest - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - email: Optional[StrictStr] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["organizationToken", "email", "admin"] - - 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 AddOrganizationMemberRequest 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 AddOrganizationMemberRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "email": obj.get("email"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py b/sdk/python/sdk/zrok/zrok_api/models/auth_user.py deleted file mode 100644 index b8e1718d..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 AuthUser(BaseModel): - """ - AuthUser - """ # noqa: E501 - username: Optional[StrictStr] = None - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["username", "password"] - - 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 AuthUser 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 AuthUser from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "username": obj.get("username"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py b/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py deleted file mode 100644 index dcbdafb3..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/change_password_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ChangePasswordRequest(BaseModel): - """ - ChangePasswordRequest - """ # noqa: E501 - email: Optional[StrictStr] = None - old_password: Optional[StrictStr] = Field(default=None, alias="oldPassword") - new_password: Optional[StrictStr] = Field(default=None, alias="newPassword") - __properties: ClassVar[List[str]] = ["email", "oldPassword", "newPassword"] - - 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 ChangePasswordRequest 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 ChangePasswordRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "oldPassword": obj.get("oldPassword"), - "newPassword": obj.get("newPassword") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/client_version_check_request.py b/sdk/python/sdk/zrok/zrok_api/models/client_version_check_request.py deleted file mode 100644 index 813e57ac..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/client_version_check_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ClientVersionCheckRequest(BaseModel): - """ - ClientVersionCheckRequest - """ # noqa: E501 - client_version: Optional[StrictStr] = Field(default=None, alias="clientVersion") - __properties: ClassVar[List[str]] = ["clientVersion"] - - 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 ClientVersionCheckRequest 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 ClientVersionCheckRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "clientVersion": obj.get("clientVersion") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/configuration.py b/sdk/python/sdk/zrok/zrok_api/models/configuration.py deleted file mode 100644 index ed5ece38..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/configuration.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class Configuration(BaseModel): - """ - Configuration - """ # noqa: E501 - version: Optional[StrictStr] = None - tou_link: Optional[StrictStr] = Field(default=None, alias="touLink") - invites_open: Optional[StrictBool] = Field(default=None, alias="invitesOpen") - requires_invite_token: Optional[StrictBool] = Field(default=None, alias="requiresInviteToken") - invite_token_contact: Optional[StrictStr] = Field(default=None, alias="inviteTokenContact") - __properties: ClassVar[List[str]] = ["version", "touLink", "invitesOpen", "requiresInviteToken", "inviteTokenContact"] - - 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 Configuration 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 Configuration from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "version": obj.get("version"), - "touLink": obj.get("touLink"), - "invitesOpen": obj.get("invitesOpen"), - "requiresInviteToken": obj.get("requiresInviteToken"), - "inviteTokenContact": obj.get("inviteTokenContact") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_frontend201_response.py b/sdk/python/sdk/zrok/zrok_api/models/create_frontend201_response.py deleted file mode 100644 index 61fc364c..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/create_frontend201_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CreateFrontend201Response(BaseModel): - """ - CreateFrontend201Response - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - __properties: ClassVar[List[str]] = ["frontendToken"] - - 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 CreateFrontend201Response 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 CreateFrontend201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py b/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py deleted file mode 100644 index 5f7072e8..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/create_frontend_request.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CreateFrontendRequest(BaseModel): - """ - CreateFrontendRequest - """ # noqa: E501 - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - url_template: Optional[StrictStr] = None - public_name: Optional[StrictStr] = None - permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") - __properties: ClassVar[List[str]] = ["zId", "url_template", "public_name", "permissionMode"] - - @field_validator('permission_mode') - def permission_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['open', 'closed']): - raise ValueError("must be one of enum values ('open', 'closed')") - return value - - 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 CreateFrontendRequest 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 CreateFrontendRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "zId": obj.get("zId"), - "url_template": obj.get("url_template"), - "public_name": obj.get("public_name"), - "permissionMode": obj.get("permissionMode") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_identity201_response.py b/sdk/python/sdk/zrok/zrok_api/models/create_identity201_response.py deleted file mode 100644 index f2811bbf..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/create_identity201_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 CreateIdentity201Response(BaseModel): - """ - CreateIdentity201Response - """ # noqa: E501 - identity: Optional[StrictStr] = None - cfg: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["identity", "cfg"] - - 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 CreateIdentity201Response 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 CreateIdentity201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "identity": obj.get("identity"), - "cfg": obj.get("cfg") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_identity_request.py b/sdk/python/sdk/zrok/zrok_api/models/create_identity_request.py deleted file mode 100644 index 9f21d0a8..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/create_identity_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 CreateIdentityRequest(BaseModel): - """ - CreateIdentityRequest - """ # noqa: E501 - name: Optional[StrictStr] = None - __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 CreateIdentityRequest 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 CreateIdentityRequest 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/sdk/python/sdk/zrok/zrok_api/models/create_organization201_response.py b/sdk/python/sdk/zrok/zrok_api/models/create_organization201_response.py deleted file mode 100644 index 431bf57a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/create_organization201_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CreateOrganization201Response(BaseModel): - """ - CreateOrganization201Response - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - __properties: ClassVar[List[str]] = ["organizationToken"] - - 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 CreateOrganization201Response 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 CreateOrganization201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/create_organization_request.py b/sdk/python/sdk/zrok/zrok_api/models/create_organization_request.py deleted file mode 100644 index de5d6572..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/create_organization_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 CreateOrganizationRequest(BaseModel): - """ - CreateOrganizationRequest - """ # noqa: E501 - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["description"] - - 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 CreateOrganizationRequest 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 CreateOrganizationRequest 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") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/disable_request.py b/sdk/python/sdk/zrok/zrok_api/models/disable_request.py deleted file mode 100644 index a6c30a01..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/disable_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 DisableRequest(BaseModel): - """ - DisableRequest - """ # noqa: E501 - identity: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["identity"] - - 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 DisableRequest 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 DisableRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "identity": obj.get("identity") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/enable_request.py b/sdk/python/sdk/zrok/zrok_api/models/enable_request.py deleted file mode 100644 index ad54886c..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/enable_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 EnableRequest(BaseModel): - """ - EnableRequest - """ # noqa: E501 - description: Optional[StrictStr] = None - host: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["description", "host"] - - 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 EnableRequest 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 EnableRequest 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"), - "host": obj.get("host") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment.py b/sdk/python/sdk/zrok/zrok_api/models/environment.py deleted file mode 100644 index 063ff59e..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/environment.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.spark_data_sample import SparkDataSample -from typing import Optional, Set -from typing_extensions import Self - -class Environment(BaseModel): - """ - Environment - """ # noqa: E501 - description: Optional[StrictStr] = None - host: Optional[StrictStr] = None - address: Optional[StrictStr] = None - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - activity: Optional[List[SparkDataSample]] = None - limited: Optional[StrictBool] = None - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["description", "host", "address", "zId", "activity", "limited", "createdAt", "updatedAt"] - - 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 Environment 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 activity (list) - _items = [] - if self.activity: - for _item_activity in self.activity: - if _item_activity: - _items.append(_item_activity.to_dict()) - _dict['activity'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Environment 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"), - "host": obj.get("host"), - "address": obj.get("address"), - "zId": obj.get("zId"), - "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, - "limited": obj.get("limited"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py b/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py deleted file mode 100644 index 65e4f257..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.environment import Environment -from zrok_api.models.frontend import Frontend -from zrok_api.models.share import Share -from typing import Optional, Set -from typing_extensions import Self - -class EnvironmentAndResources(BaseModel): - """ - EnvironmentAndResources - """ # noqa: E501 - environment: Optional[Environment] = None - frontends: Optional[List[Frontend]] = None - shares: Optional[List[Share]] = None - __properties: ClassVar[List[str]] = ["environment", "frontends", "shares"] - - 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 EnvironmentAndResources 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 frontends (list) - _items = [] - if self.frontends: - for _item_frontends in self.frontends: - if _item_frontends: - _items.append(_item_frontends.to_dict()) - _dict['frontends'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shares (list) - _items = [] - if self.shares: - for _item_shares in self.shares: - if _item_shares: - _items.append(_item_shares.to_dict()) - _dict['shares'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EnvironmentAndResources from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "environment": Environment.from_dict(obj["environment"]) if obj.get("environment") is not None else None, - "frontends": [Frontend.from_dict(_item) for _item in obj["frontends"]] if obj.get("frontends") is not None else None, - "shares": [Share.from_dict(_item) for _item in obj["shares"]] if obj.get("shares") is not None else None - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend.py b/sdk/python/sdk/zrok/zrok_api/models/frontend.py deleted file mode 100644 index ae3c4c5d..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class Frontend(BaseModel): - """ - Frontend - """ # noqa: E501 - id: Optional[StrictInt] = None - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") - description: Optional[StrictStr] = None - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "frontendToken", "shareToken", "backendMode", "bindAddress", "description", "zId", "createdAt", "updatedAt"] - - 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 Frontend 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 Frontend 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"), - "frontendToken": obj.get("frontendToken"), - "shareToken": obj.get("shareToken"), - "backendMode": obj.get("backendMode"), - "bindAddress": obj.get("bindAddress"), - "description": obj.get("description"), - "zId": obj.get("zId"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py deleted file mode 100644 index 177b0efa..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/get_sparklines200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics import Metrics -from typing import Optional, Set -from typing_extensions import Self - -class GetSparklines200Response(BaseModel): - """ - GetSparklines200Response - """ # noqa: E501 - sparklines: Optional[List[Metrics]] = None - __properties: ClassVar[List[str]] = ["sparklines"] - - 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 GetSparklines200Response 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 sparklines (list) - _items = [] - if self.sparklines: - for _item_sparklines in self.sparklines: - if _item_sparklines: - _items.append(_item_sparklines.to_dict()) - _dict['sparklines'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetSparklines200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "sparklines": [Metrics.from_dict(_item) for _item in obj["sparklines"]] if obj.get("sparklines") is not None else None - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/get_sparklines_request.py b/sdk/python/sdk/zrok/zrok_api/models/get_sparklines_request.py deleted file mode 100644 index d9bef43d..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/get_sparklines_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 GetSparklinesRequest(BaseModel): - """ - GetSparklinesRequest - """ # noqa: E501 - account: Optional[StrictBool] = None - environments: Optional[List[StrictStr]] = None - shares: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["account", "environments", "shares"] - - 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 GetSparklinesRequest 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 GetSparklinesRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "account": obj.get("account"), - "environments": obj.get("environments"), - "shares": obj.get("shares") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_request.py b/sdk/python/sdk/zrok/zrok_api/models/invite_request.py deleted file mode 100644 index 1c5bcc76..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/invite_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class InviteRequest(BaseModel): - """ - InviteRequest - """ # noqa: E501 - email: Optional[StrictStr] = None - invite_token: Optional[StrictStr] = Field(default=None, alias="inviteToken") - __properties: ClassVar[List[str]] = ["email", "inviteToken"] - - 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 InviteRequest 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 InviteRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "inviteToken": obj.get("inviteToken") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py b/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py deleted file mode 100644 index dd876de6..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/invite_token_generate_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class InviteTokenGenerateRequest(BaseModel): - """ - InviteTokenGenerateRequest - """ # noqa: E501 - invite_tokens: Optional[List[StrictStr]] = Field(default=None, alias="inviteTokens") - __properties: ClassVar[List[str]] = ["inviteTokens"] - - 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 InviteTokenGenerateRequest 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 InviteTokenGenerateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "inviteTokens": obj.get("inviteTokens") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_frontends200_response_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_frontends200_response_inner.py deleted file mode 100644 index ff9d1bb4..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/list_frontends200_response_inner.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ListFrontends200ResponseInner(BaseModel): - """ - ListFrontends200ResponseInner - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") - public_name: Optional[StrictStr] = Field(default=None, alias="publicName") - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["frontendToken", "zId", "urlTemplate", "publicName", "createdAt", "updatedAt"] - - 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 ListFrontends200ResponseInner 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 ListFrontends200ResponseInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "zId": obj.get("zId"), - "urlTemplate": obj.get("urlTemplate"), - "publicName": obj.get("publicName"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py deleted file mode 100644 index f3db8fa7..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner -from typing import Optional, Set -from typing_extensions import Self - -class ListMemberships200Response(BaseModel): - """ - ListMemberships200Response - """ # noqa: E501 - memberships: Optional[List[ListMemberships200ResponseMembershipsInner]] = None - __properties: ClassVar[List[str]] = ["memberships"] - - 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 ListMemberships200Response 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 memberships (list) - _items = [] - if self.memberships: - for _item_memberships in self.memberships: - if _item_memberships: - _items.append(_item_memberships.to_dict()) - _dict['memberships'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListMemberships200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "memberships": [ListMemberships200ResponseMembershipsInner.from_dict(_item) for _item in obj["memberships"]] if obj.get("memberships") is not None else None - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response_memberships_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response_memberships_inner.py deleted file mode 100644 index e39b07b8..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/list_memberships200_response_memberships_inner.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class ListMemberships200ResponseMembershipsInner(BaseModel): - """ - ListMemberships200ResponseMembershipsInner - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - description: Optional[StrictStr] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["organizationToken", "description", "admin"] - - 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 ListMemberships200ResponseMembershipsInner 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 ListMemberships200ResponseMembershipsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "description": obj.get("description"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py deleted file mode 100644 index 6058124c..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner -from typing import Optional, Set -from typing_extensions import Self - -class ListOrganizationMembers200Response(BaseModel): - """ - ListOrganizationMembers200Response - """ # noqa: E501 - members: Optional[List[ListOrganizationMembers200ResponseMembersInner]] = None - __properties: ClassVar[List[str]] = ["members"] - - 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 ListOrganizationMembers200Response 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 members (list) - _items = [] - if self.members: - for _item_members in self.members: - if _item_members: - _items.append(_item_members.to_dict()) - _dict['members'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListOrganizationMembers200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "members": [ListOrganizationMembers200ResponseMembersInner.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response_members_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response_members_inner.py deleted file mode 100644 index 0266e878..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/list_organization_members200_response_members_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 ListOrganizationMembers200ResponseMembersInner(BaseModel): - """ - ListOrganizationMembers200ResponseMembersInner - """ # noqa: E501 - email: Optional[StrictStr] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["email", "admin"] - - 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 ListOrganizationMembers200ResponseMembersInner 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 ListOrganizationMembers200ResponseMembersInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py deleted file mode 100644 index 03fe63da..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner -from typing import Optional, Set -from typing_extensions import Self - -class ListOrganizations200Response(BaseModel): - """ - ListOrganizations200Response - """ # noqa: E501 - organizations: Optional[List[ListOrganizations200ResponseOrganizationsInner]] = None - __properties: ClassVar[List[str]] = ["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 ListOrganizations200Response 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_organizations in self.organizations: - if _item_organizations: - _items.append(_item_organizations.to_dict()) - _dict['organizations'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListOrganizations200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizations": [ListOrganizations200ResponseOrganizationsInner.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response_organizations_inner.py b/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response_organizations_inner.py deleted file mode 100644 index 463e142a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/list_organizations200_response_organizations_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ListOrganizations200ResponseOrganizationsInner(BaseModel): - """ - ListOrganizations200ResponseOrganizationsInner - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["organizationToken", "description"] - - 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 ListOrganizations200ResponseOrganizationsInner 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 ListOrganizations200ResponseOrganizationsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "description": obj.get("description") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/login_request.py b/sdk/python/sdk/zrok/zrok_api/models/login_request.py deleted file mode 100644 index 6ef640ea..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/login_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 LoginRequest(BaseModel): - """ - LoginRequest - """ # noqa: E501 - email: Optional[StrictStr] = None - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["email", "password"] - - 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 LoginRequest 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 LoginRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics.py b/sdk/python/sdk/zrok/zrok_api/models/metrics.py deleted file mode 100644 index 40db696c..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/metrics.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics_sample import MetricsSample -from typing import Optional, Set -from typing_extensions import Self - -class Metrics(BaseModel): - """ - Metrics - """ # noqa: E501 - scope: Optional[StrictStr] = None - id: Optional[StrictStr] = None - period: Optional[Union[StrictFloat, StrictInt]] = None - samples: Optional[List[MetricsSample]] = None - __properties: ClassVar[List[str]] = ["scope", "id", "period", "samples"] - - 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 Metrics 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 samples (list) - _items = [] - if self.samples: - for _item_samples in self.samples: - if _item_samples: - _items.append(_item_samples.to_dict()) - _dict['samples'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Metrics from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "scope": obj.get("scope"), - "id": obj.get("id"), - "period": obj.get("period"), - "samples": [MetricsSample.from_dict(_item) for _item in obj["samples"]] if obj.get("samples") is not None else None - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py b/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py deleted file mode 100644 index 678d0c1e..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self - -class MetricsSample(BaseModel): - """ - MetricsSample - """ # noqa: E501 - rx: Optional[Union[StrictFloat, StrictInt]] = None - tx: Optional[Union[StrictFloat, StrictInt]] = None - timestamp: Optional[Union[StrictFloat, StrictInt]] = None - __properties: ClassVar[List[str]] = ["rx", "tx", "timestamp"] - - 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 MetricsSample 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 MetricsSample from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "rx": obj.get("rx"), - "tx": obj.get("tx"), - "timestamp": obj.get("timestamp") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/overview.py b/sdk/python/sdk/zrok/zrok_api/models/overview.py deleted file mode 100644 index 2feb65cc..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/overview.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from typing import Optional, Set -from typing_extensions import Self - -class Overview(BaseModel): - """ - Overview - """ # noqa: E501 - account_limited: Optional[StrictBool] = Field(default=None, alias="accountLimited") - environments: Optional[List[EnvironmentAndResources]] = None - __properties: ClassVar[List[str]] = ["accountLimited", "environments"] - - 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 Overview 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 environments (list) - _items = [] - if self.environments: - for _item_environments in self.environments: - if _item_environments: - _items.append(_item_environments.to_dict()) - _dict['environments'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Overview from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "accountLimited": obj.get("accountLimited"), - "environments": [EnvironmentAndResources.from_dict(_item) for _item in obj["environments"]] if obj.get("environments") is not None else None - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/principal.py b/sdk/python/sdk/zrok/zrok_api/models/principal.py deleted file mode 100644 index 6ff9f756..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/principal.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 Principal(BaseModel): - """ - Principal - """ # noqa: E501 - id: Optional[StrictInt] = None - email: Optional[StrictStr] = None - token: Optional[StrictStr] = None - limitless: Optional[StrictBool] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["id", "email", "token", "limitless", "admin"] - - 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 Principal 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 Principal 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"), - "email": obj.get("email"), - "token": obj.get("token"), - "limitless": obj.get("limitless"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token200_response.py b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token200_response.py deleted file mode 100644 index ccaf7ff4..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token200_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RegenerateAccountToken200Response(BaseModel): - """ - RegenerateAccountToken200Response - """ # noqa: E501 - account_token: Optional[StrictStr] = Field(default=None, alias="accountToken") - __properties: ClassVar[List[str]] = ["accountToken"] - - 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 RegenerateAccountToken200Response 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 RegenerateAccountToken200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "accountToken": obj.get("accountToken") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_request.py b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_request.py deleted file mode 100644 index 32f2029f..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RegenerateAccountTokenRequest(BaseModel): - """ - RegenerateAccountTokenRequest - """ # noqa: E501 - email_address: Optional[StrictStr] = Field(default=None, alias="emailAddress") - __properties: ClassVar[List[str]] = ["emailAddress"] - - 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 RegenerateAccountTokenRequest 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 RegenerateAccountTokenRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "emailAddress": obj.get("emailAddress") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/register_request.py b/sdk/python/sdk/zrok/zrok_api/models/register_request.py deleted file mode 100644 index f2bf90bd..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/register_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RegisterRequest(BaseModel): - """ - RegisterRequest - """ # noqa: E501 - register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["registerToken", "password"] - - 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 RegisterRequest 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 RegisterRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "registerToken": obj.get("registerToken"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/remove_organization_member_request.py b/sdk/python/sdk/zrok/zrok_api/models/remove_organization_member_request.py deleted file mode 100644 index 28b6bd25..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/remove_organization_member_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RemoveOrganizationMemberRequest(BaseModel): - """ - RemoveOrganizationMemberRequest - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - email: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["organizationToken", "email"] - - 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 RemoveOrganizationMemberRequest 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 RemoveOrganizationMemberRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "email": obj.get("email") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py deleted file mode 100644 index a81c4bd3..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ResetPasswordRequest(BaseModel): - """ - ResetPasswordRequest - """ # noqa: E501 - reset_token: Optional[StrictStr] = Field(default=None, alias="resetToken") - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["resetToken", "password"] - - 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 ResetPasswordRequest 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 ResetPasswordRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "resetToken": obj.get("resetToken"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/share.py b/sdk/python/sdk/zrok/zrok_api/models/share.py deleted file mode 100644 index aaf72fb8..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/share.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.spark_data_sample import SparkDataSample -from typing import Optional, Set -from typing_extensions import Self - -class Share(BaseModel): - """ - Share - """ # noqa: E501 - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - frontend_selection: Optional[StrictStr] = Field(default=None, alias="frontendSelection") - frontend_endpoint: Optional[StrictStr] = Field(default=None, alias="frontendEndpoint") - backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") - reserved: Optional[StrictBool] = None - activity: Optional[List[SparkDataSample]] = None - limited: Optional[StrictBool] = None - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["shareToken", "zId", "shareMode", "backendMode", "frontendSelection", "frontendEndpoint", "backendProxyEndpoint", "reserved", "activity", "limited", "createdAt", "updatedAt"] - - 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 Share 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 activity (list) - _items = [] - if self.activity: - for _item_activity in self.activity: - if _item_activity: - _items.append(_item_activity.to_dict()) - _dict['activity'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Share from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "shareToken": obj.get("shareToken"), - "zId": obj.get("zId"), - "shareMode": obj.get("shareMode"), - "backendMode": obj.get("backendMode"), - "frontendSelection": obj.get("frontendSelection"), - "frontendEndpoint": obj.get("frontendEndpoint"), - "backendProxyEndpoint": obj.get("backendProxyEndpoint"), - "reserved": obj.get("reserved"), - "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, - "limited": obj.get("limited"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_request.py b/sdk/python/sdk/zrok/zrok_api/models/share_request.py deleted file mode 100644 index 7ea8d828..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/share_request.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.auth_user import AuthUser -from typing import Optional, Set -from typing_extensions import Self - -class ShareRequest(BaseModel): - """ - ShareRequest - """ # noqa: E501 - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") - frontend_selection: Optional[List[StrictStr]] = Field(default=None, alias="frontendSelection") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") - auth_scheme: Optional[StrictStr] = Field(default=None, alias="authScheme") - auth_users: Optional[List[AuthUser]] = Field(default=None, alias="authUsers") - oauth_provider: Optional[StrictStr] = Field(default=None, alias="oauthProvider") - oauth_email_domains: Optional[List[StrictStr]] = Field(default=None, alias="oauthEmailDomains") - oauth_authorization_check_interval: Optional[StrictStr] = Field(default=None, alias="oauthAuthorizationCheckInterval") - reserved: Optional[StrictBool] = None - permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") - access_grants: Optional[List[StrictStr]] = Field(default=None, alias="accessGrants") - unique_name: Optional[StrictStr] = Field(default=None, alias="uniqueName") - __properties: ClassVar[List[str]] = ["envZId", "shareMode", "frontendSelection", "backendMode", "backendProxyEndpoint", "authScheme", "authUsers", "oauthProvider", "oauthEmailDomains", "oauthAuthorizationCheckInterval", "reserved", "permissionMode", "accessGrants", "uniqueName"] - - @field_validator('share_mode') - def share_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['public', 'private']): - raise ValueError("must be one of enum values ('public', 'private')") - return value - - @field_validator('backend_mode') - def backend_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn']): - raise ValueError("must be one of enum values ('proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn')") - return value - - @field_validator('oauth_provider') - def oauth_provider_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['github', 'google']): - raise ValueError("must be one of enum values ('github', 'google')") - return value - - @field_validator('permission_mode') - def permission_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['open', 'closed']): - raise ValueError("must be one of enum values ('open', 'closed')") - return value - - 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 ShareRequest 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 auth_users (list) - _items = [] - if self.auth_users: - for _item_auth_users in self.auth_users: - if _item_auth_users: - _items.append(_item_auth_users.to_dict()) - _dict['authUsers'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ShareRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "envZId": obj.get("envZId"), - "shareMode": obj.get("shareMode"), - "frontendSelection": obj.get("frontendSelection"), - "backendMode": obj.get("backendMode"), - "backendProxyEndpoint": obj.get("backendProxyEndpoint"), - "authScheme": obj.get("authScheme"), - "authUsers": [AuthUser.from_dict(_item) for _item in obj["authUsers"]] if obj.get("authUsers") is not None else None, - "oauthProvider": obj.get("oauthProvider"), - "oauthEmailDomains": obj.get("oauthEmailDomains"), - "oauthAuthorizationCheckInterval": obj.get("oauthAuthorizationCheckInterval"), - "reserved": obj.get("reserved"), - "permissionMode": obj.get("permissionMode"), - "accessGrants": obj.get("accessGrants"), - "uniqueName": obj.get("uniqueName") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_response.py b/sdk/python/sdk/zrok/zrok_api/models/share_response.py deleted file mode 100644 index 8fa25d60..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/share_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ShareResponse(BaseModel): - """ - ShareResponse - """ # noqa: E501 - frontend_proxy_endpoints: Optional[List[StrictStr]] = Field(default=None, alias="frontendProxyEndpoints") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - __properties: ClassVar[List[str]] = ["frontendProxyEndpoints", "shareToken"] - - 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 ShareResponse 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 ShareResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendProxyEndpoints": obj.get("frontendProxyEndpoints"), - "shareToken": obj.get("shareToken") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py b/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py deleted file mode 100644 index 23c4ef51..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self - -class SparkDataSample(BaseModel): - """ - SparkDataSample - """ # noqa: E501 - rx: Optional[Union[StrictFloat, StrictInt]] = None - tx: Optional[Union[StrictFloat, StrictInt]] = None - __properties: ClassVar[List[str]] = ["rx", "tx"] - - 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 SparkDataSample 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 SparkDataSample from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "rx": obj.get("rx"), - "tx": obj.get("tx") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py b/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py deleted file mode 100644 index 19a3f5df..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/unaccess_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UnaccessRequest(BaseModel): - """ - UnaccessRequest - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - __properties: ClassVar[List[str]] = ["frontendToken", "envZId", "shareToken"] - - 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 UnaccessRequest 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 UnaccessRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "envZId": obj.get("envZId"), - "shareToken": obj.get("shareToken") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py b/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py deleted file mode 100644 index 3ff557e1..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/unshare_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class UnshareRequest(BaseModel): - """ - UnshareRequest - """ # noqa: E501 - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - reserved: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["envZId", "shareToken", "reserved"] - - 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 UnshareRequest 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 UnshareRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "envZId": obj.get("envZId"), - "shareToken": obj.get("shareToken"), - "reserved": obj.get("reserved") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_access_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_access_request.py deleted file mode 100644 index a27f9623..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/update_access_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UpdateAccessRequest(BaseModel): - """ - UpdateAccessRequest - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["frontendToken", "bindAddress", "description"] - - 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 UpdateAccessRequest 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 UpdateAccessRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "bindAddress": obj.get("bindAddress"), - "description": obj.get("description") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py deleted file mode 100644 index 52916296..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/update_frontend_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UpdateFrontendRequest(BaseModel): - """ - UpdateFrontendRequest - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - public_name: Optional[StrictStr] = Field(default=None, alias="publicName") - url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") - __properties: ClassVar[List[str]] = ["frontendToken", "publicName", "urlTemplate"] - - 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 UpdateFrontendRequest 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 UpdateFrontendRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "publicName": obj.get("publicName"), - "urlTemplate": obj.get("urlTemplate") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py b/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py deleted file mode 100644 index 9e3de749..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/update_share_request.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UpdateShareRequest(BaseModel): - """ - UpdateShareRequest - """ # noqa: E501 - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") - add_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="addAccessGrants") - remove_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="removeAccessGrants") - __properties: ClassVar[List[str]] = ["shareToken", "backendProxyEndpoint", "addAccessGrants", "removeAccessGrants"] - - 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 UpdateShareRequest 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 UpdateShareRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "shareToken": obj.get("shareToken"), - "backendProxyEndpoint": obj.get("backendProxyEndpoint"), - "addAccessGrants": obj.get("addAccessGrants"), - "removeAccessGrants": obj.get("removeAccessGrants") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify200_response.py b/sdk/python/sdk/zrok/zrok_api/models/verify200_response.py deleted file mode 100644 index 4709d646..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/verify200_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 Verify200Response(BaseModel): - """ - Verify200Response - """ # noqa: E501 - email: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["email"] - - 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 Verify200Response 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 Verify200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify_request.py b/sdk/python/sdk/zrok/zrok_api/models/verify_request.py deleted file mode 100644 index 76def799..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/verify_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class VerifyRequest(BaseModel): - """ - VerifyRequest - """ # noqa: E501 - register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") - __properties: ClassVar[List[str]] = ["registerToken"] - - 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 VerifyRequest 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 VerifyRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "registerToken": obj.get("registerToken") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/models/version_inventory200_response.py b/sdk/python/sdk/zrok/zrok_api/models/version_inventory200_response.py deleted file mode 100644 index 8cbf4288..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/version_inventory200_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class VersionInventory200Response(BaseModel): - """ - VersionInventory200Response - """ # noqa: E501 - controller_version: Optional[StrictStr] = Field(default=None, alias="controllerVersion") - __properties: ClassVar[List[str]] = ["controllerVersion"] - - 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 VersionInventory200Response 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 VersionInventory200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "controllerVersion": obj.get("controllerVersion") - }) - return _obj - - diff --git a/sdk/python/sdk/zrok/zrok_api/py.typed b/sdk/python/sdk/zrok/zrok_api/py.typed deleted file mode 100644 index e69de29b..00000000 diff --git a/sdk/python/sdk/zrok/zrok_api/rest.py b/sdk/python/sdk/zrok/zrok_api/rest.py deleted file mode 100644 index f09faee7..00000000 --- a/sdk/python/sdk/zrok/zrok_api/rest.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from zrok_api.exceptions import ApiException, ApiValueError - -SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} -RESTResponseType = urllib3.HTTPResponse - - -def is_socks_proxy_url(url): - if url is None: - return False - split_section = url.split("://") - if len(split_section) < 2: - return False - else: - return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES - - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - pool_args = { - "cert_reqs": cert_reqs, - "ca_certs": configuration.ssl_ca_cert, - "cert_file": configuration.cert_file, - "key_file": configuration.key_file, - "ca_cert_data": configuration.ca_cert_data, - } - if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options - - if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize - - # https pool manager - self.pool_manager: urllib3.PoolManager - - if configuration.proxy: - if is_socks_proxy_url(configuration.proxy): - from urllib3.contrib.socks import SOCKSProxyManager - pool_args["proxy_url"] = configuration.proxy - pool_args["headers"] = configuration.proxy_headers - self.pool_manager = SOCKSProxyManager(**pool_args) - else: - pool_args["proxy_url"] = configuration.proxy - pool_args["proxy_headers"] = configuration.proxy_headers - self.pool_manager = urllib3.ProxyManager(**pool_args) - else: - self.pool_manager = urllib3.PoolManager(**pool_args) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than JSON when `body` argument is - # provided in serialized form. - elif isinstance(body, str) or isinstance(body, bytes): - r = self.pool_manager.request( - method, - url, - body=body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): - request_body = "true" if body else "false" - r = self.pool_manager.request( - method, - url, - body=request_body, - preload_content=False, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) From b75c5b98f65299fe1d5e62e31bc55bee761fc0ec Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 14:52:09 -0500 Subject: [PATCH 24/56] ignore py module artifacts --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 3ea76101..7d9738fa 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,6 @@ yarn-error.log* .obsidian sdk/nodejs/sdk/dist + +# py module artifacts +*.egg-info/ \ No newline at end of file From dba96972b1e4d37394a464eb5d6783c4db0e90e8 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 15:19:47 -0500 Subject: [PATCH 25/56] tidy module setup --- sdk/python/sdk/zrok/setup.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/python/sdk/zrok/setup.cfg b/sdk/python/sdk/zrok/setup.cfg index 2194d4d2..0ac10e83 100644 --- a/sdk/python/sdk/zrok/setup.cfg +++ b/sdk/python/sdk/zrok/setup.cfg @@ -13,9 +13,9 @@ project_urls = Discussion = https://openziti.discourse.group/ [options] -package_dir = - = . -packages = find: +package_dir = # this is a dict definition meaning there's no special mapping, and + "" = . # continues on this line to specify finding packages in the current directory +packages = find: # include all packages found [options.packages.find] where = . From 26d1f34f4e01c7d4fc9dc62428e2ebf41fbce79e Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 15:19:55 -0500 Subject: [PATCH 26/56] announce changes --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bed9e75..00191a68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ CHANGE: Deprecated the `passwords` configuration stanza. The zrok controller and CHANGE: The protocol for determining valid client versions has been changed. Previously a zrok client would do a `GET` against the `/api/v1/version` endpoint and do a local version string comparison (as a normal precondition to any API call) to see if the controller version matched. The protocol has been amended so that any out-of-date client using the old protocol will receive a version string indicating that they need to uprade their client. New clients will do a `POST` against the `/api/v1/clientVersionCheck` endpoint, posting their client version, and the server will check for compatibility. Does not change the security posture in any significant way, but gives more flexibility on the server side for managing client compatibility. Provides a better, cleared out-of-date error message for old clients when accessing `v1.0.0`+ (https://github.com/openziti/zrok/issues/859) +CHANGE: The Python SDK is now generated by `openapi-generator` and requires a newer `urllib3` version 2.1.0. The published Python module, `zrok`, inherits the dependencies of the generated packages. + ## v0.4.49 FIX: Release artifacts now include a reproducible source archive. The archive's download URL is now used by the Homebrew formula when building from source instead of the archive generated on-demand by GitHub (https://github.com/openziti/zrok/issues/858). From fd2b1f12b273d75e45f589ddfb561c5ee9c3472f Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 15:54:00 -0500 Subject: [PATCH 27/56] organize py module --- .gitignore | 3 ++- bin/generate_rest.sh | 13 +++++++------ sdk/python/sdk/zrok/.swagger-codegen/VERSION | 1 - sdk/python/{sdk/zrok => src}/.gitattributes | 0 .../{sdk/zrok => src}/.openapi-generator-ignore | 0 .../{sdk/zrok => src}/.openapi-generator/FILES | 0 .../{sdk/zrok => src}/.openapi-generator/VERSION | 0 sdk/python/{sdk/zrok => src}/__init__.py | 0 sdk/python/{sdk/zrok => src}/setup.cfg | 14 ++++++++------ sdk/python/{sdk/zrok => src}/setup.py | 6 ++++-- sdk/python/{sdk/zrok => src}/versioneer.py | 0 sdk/python/{sdk/zrok => src}/zrok/__init__.py | 0 sdk/python/{sdk/zrok => src}/zrok/_version.py | 0 sdk/python/{sdk/zrok => src}/zrok/access.py | 0 sdk/python/{sdk/zrok => src}/zrok/decor.py | 0 sdk/python/{sdk/zrok => src}/zrok/dialer.py | 0 .../{sdk/zrok => src}/zrok/environment/__init__.py | 0 .../{sdk/zrok => src}/zrok/environment/dirs.py | 0 .../{sdk/zrok => src}/zrok/environment/root.py | 0 sdk/python/{sdk/zrok => src}/zrok/listener.py | 0 sdk/python/{sdk/zrok => src}/zrok/model.py | 0 sdk/python/{sdk/zrok => src}/zrok/overview.py | 0 sdk/python/{sdk/zrok => src}/zrok/proxy.py | 0 sdk/python/{sdk/zrok => src}/zrok/share.py | 0 24 files changed, 21 insertions(+), 16 deletions(-) delete mode 100644 sdk/python/sdk/zrok/.swagger-codegen/VERSION rename sdk/python/{sdk/zrok => src}/.gitattributes (100%) rename sdk/python/{sdk/zrok => src}/.openapi-generator-ignore (100%) rename sdk/python/{sdk/zrok => src}/.openapi-generator/FILES (100%) rename sdk/python/{sdk/zrok => src}/.openapi-generator/VERSION (100%) rename sdk/python/{sdk/zrok => src}/__init__.py (100%) rename sdk/python/{sdk/zrok => src}/setup.cfg (66%) rename sdk/python/{sdk/zrok => src}/setup.py (88%) rename sdk/python/{sdk/zrok => src}/versioneer.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/__init__.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/_version.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/access.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/decor.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/dialer.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/environment/__init__.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/environment/dirs.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/environment/root.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/listener.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/model.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/overview.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/proxy.py (100%) rename sdk/python/{sdk/zrok => src}/zrok/share.py (100%) diff --git a/.gitignore b/.gitignore index 7d9738fa..1caa2695 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,5 @@ yarn-error.log* sdk/nodejs/sdk/dist # py module artifacts -*.egg-info/ \ No newline at end of file +*.egg-info/ +__pycache__/ \ No newline at end of file diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index 10e07755..97a87070 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -59,14 +59,15 @@ openapi-generator-cli generate -i specs/zrok.yml -o sdk/nodejs/sdk/src/api -g ty echo "...generating python sdk client" # Delete tracked Python files while IFS= read -r file; do - if [ -f "sdk/python/sdk/zrok/$file" ]; then - echo "Removing existing file: sdk/python/sdk/zrok/$file" - rm -f "sdk/python/sdk/zrok/$file" + if [ -f "sdk/python/src/$file" ]; then + echo "Removing existing file: sdk/python/src/$file" + rm -f "sdk/python/src/$file" fi -done < sdk/python/sdk/zrok/.openapi-generator/FILES +done < sdk/python/src/.openapi-generator/FILES # Delete the tracking file -rm -f sdk/python/sdk/zrok/.openapi-generator/FILES +rm -f sdk/python/src/.openapi-generator/FILES # Generate and track new files -openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/sdk/zrok --package-name zrok_api --additional-properties projectName=zrok -g python +openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/src/zrok -g python \ + --package-name zrok_api --additional-properties projectName=zrok git checkout rest_server_zrok/configure_zrok.go diff --git a/sdk/python/sdk/zrok/.swagger-codegen/VERSION b/sdk/python/sdk/zrok/.swagger-codegen/VERSION deleted file mode 100644 index b262b4de..00000000 --- a/sdk/python/sdk/zrok/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.51 \ No newline at end of file diff --git a/sdk/python/sdk/zrok/.gitattributes b/sdk/python/src/.gitattributes similarity index 100% rename from sdk/python/sdk/zrok/.gitattributes rename to sdk/python/src/.gitattributes diff --git a/sdk/python/sdk/zrok/.openapi-generator-ignore b/sdk/python/src/.openapi-generator-ignore similarity index 100% rename from sdk/python/sdk/zrok/.openapi-generator-ignore rename to sdk/python/src/.openapi-generator-ignore diff --git a/sdk/python/sdk/zrok/.openapi-generator/FILES b/sdk/python/src/.openapi-generator/FILES similarity index 100% rename from sdk/python/sdk/zrok/.openapi-generator/FILES rename to sdk/python/src/.openapi-generator/FILES diff --git a/sdk/python/sdk/zrok/.openapi-generator/VERSION b/sdk/python/src/.openapi-generator/VERSION similarity index 100% rename from sdk/python/sdk/zrok/.openapi-generator/VERSION rename to sdk/python/src/.openapi-generator/VERSION diff --git a/sdk/python/sdk/zrok/__init__.py b/sdk/python/src/__init__.py similarity index 100% rename from sdk/python/sdk/zrok/__init__.py rename to sdk/python/src/__init__.py diff --git a/sdk/python/sdk/zrok/setup.cfg b/sdk/python/src/setup.cfg similarity index 66% rename from sdk/python/sdk/zrok/setup.cfg rename to sdk/python/src/setup.cfg index 0ac10e83..a23d00c4 100644 --- a/sdk/python/sdk/zrok/setup.cfg +++ b/sdk/python/src/setup.cfg @@ -1,8 +1,8 @@ [metadata] -name = openziti -author = OpenZiti Developers +name = zrok +author = NetFoundry author_email = developers@openziti.org -description = Ziti Python SDK +description = zrok Python SDK long_description = file: README.md long_description_content_type = text/markdown url = https://github.com/openziti/zrok @@ -13,11 +13,13 @@ project_urls = Discussion = https://openziti.discourse.group/ [options] -package_dir = # this is a dict definition meaning there's no special mapping, and - "" = . # continues on this line to specify finding packages in the current directory -packages = find: # include all packages found +# Find packages in the current directory with no special mapping +package_dir = + = . +packages = find: [options.packages.find] +# exclude none where = . [flake8] diff --git a/sdk/python/sdk/zrok/setup.py b/sdk/python/src/setup.py similarity index 88% rename from sdk/python/sdk/zrok/setup.py rename to sdk/python/src/setup.py index b0804965..10542ecc 100644 --- a/sdk/python/sdk/zrok/setup.py +++ b/sdk/python/src/setup.py @@ -7,13 +7,14 @@ import re NAME = os.getenv('ZROK_PY_NAME', "zrok") VERSION = "1.0.0" -# Define your package overrides here - these take precedence over the generated requirements.txt OVERRIDES = { # Override specific packages with version constraints different from the generated requirements.txt "openziti": "openziti >= 1.0.0", - "urllib3": "urllib3 >= 2.1.0", # urllib3 2.1.0 introduced breaking changes that are implemented by openapi-generator 7.12.0 + # urllib3 2.1.0 introduced breaking changes that are implemented by openapi-generator 7.12.0 + "urllib3": "urllib3 >= 2.1.0", } + # Parse the generated requirements.txt def parse_requirements(filename): requirements = [] @@ -37,6 +38,7 @@ def parse_requirements(filename): return requirements + # Combine requirements from requirements.txt and overrides requirements_file = Path(__file__).parent / "requirements.txt" REQUIRES = parse_requirements(requirements_file) + list(OVERRIDES.values()) diff --git a/sdk/python/sdk/zrok/versioneer.py b/sdk/python/src/versioneer.py similarity index 100% rename from sdk/python/sdk/zrok/versioneer.py rename to sdk/python/src/versioneer.py diff --git a/sdk/python/sdk/zrok/zrok/__init__.py b/sdk/python/src/zrok/__init__.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/__init__.py rename to sdk/python/src/zrok/__init__.py diff --git a/sdk/python/sdk/zrok/zrok/_version.py b/sdk/python/src/zrok/_version.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/_version.py rename to sdk/python/src/zrok/_version.py diff --git a/sdk/python/sdk/zrok/zrok/access.py b/sdk/python/src/zrok/access.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/access.py rename to sdk/python/src/zrok/access.py diff --git a/sdk/python/sdk/zrok/zrok/decor.py b/sdk/python/src/zrok/decor.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/decor.py rename to sdk/python/src/zrok/decor.py diff --git a/sdk/python/sdk/zrok/zrok/dialer.py b/sdk/python/src/zrok/dialer.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/dialer.py rename to sdk/python/src/zrok/dialer.py diff --git a/sdk/python/sdk/zrok/zrok/environment/__init__.py b/sdk/python/src/zrok/environment/__init__.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/environment/__init__.py rename to sdk/python/src/zrok/environment/__init__.py diff --git a/sdk/python/sdk/zrok/zrok/environment/dirs.py b/sdk/python/src/zrok/environment/dirs.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/environment/dirs.py rename to sdk/python/src/zrok/environment/dirs.py diff --git a/sdk/python/sdk/zrok/zrok/environment/root.py b/sdk/python/src/zrok/environment/root.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/environment/root.py rename to sdk/python/src/zrok/environment/root.py diff --git a/sdk/python/sdk/zrok/zrok/listener.py b/sdk/python/src/zrok/listener.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/listener.py rename to sdk/python/src/zrok/listener.py diff --git a/sdk/python/sdk/zrok/zrok/model.py b/sdk/python/src/zrok/model.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/model.py rename to sdk/python/src/zrok/model.py diff --git a/sdk/python/sdk/zrok/zrok/overview.py b/sdk/python/src/zrok/overview.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/overview.py rename to sdk/python/src/zrok/overview.py diff --git a/sdk/python/sdk/zrok/zrok/proxy.py b/sdk/python/src/zrok/proxy.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/proxy.py rename to sdk/python/src/zrok/proxy.py diff --git a/sdk/python/sdk/zrok/zrok/share.py b/sdk/python/src/zrok/share.py similarity index 100% rename from sdk/python/sdk/zrok/zrok/share.py rename to sdk/python/src/zrok/share.py From de93526d3ff5d6fd92f4ba1a687e524e4ac7f7ac Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 16:04:24 -0500 Subject: [PATCH 28/56] lint bash --- bin/generate_rest.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index 97a87070..36e0d501 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -22,7 +22,7 @@ command -v realpath 2>&1 || { exit 1 } -scriptPath=$(realpath $0) +scriptPath=$(realpath "$0") scriptDir=$(dirname "$scriptPath") zrokDir=$(realpath "$scriptDir/..") @@ -35,7 +35,12 @@ for GEN in \ ./rest_model_zrok/ \ ./rest_server_zrok/ do - [[ -d $GEN ]] && rm -rf "$GEN" + if [[ -d $GEN ]] + then + rm -rf "$GEN" + else + echo "WARN: not deleting $GEN because it does not exist" >&2 + fi done echo "...generating zrok server" @@ -58,14 +63,16 @@ openapi-generator-cli generate -i specs/zrok.yml -o sdk/nodejs/sdk/src/api -g ty echo "...generating python sdk client" # Delete tracked Python files -while IFS= read -r file; do - if [ -f "sdk/python/src/$file" ]; then - echo "Removing existing file: sdk/python/src/$file" - rm -f "sdk/python/src/$file" +PYMOD=sdk/python/src +while IFS= read -r FILE +do + if [[ -e "${PYMOD}/${FILE}" ]] + then + rm -f "${PYMOD}/${FILE}" fi -done < sdk/python/src/.openapi-generator/FILES +done < ${PYMOD}/.openapi-generator/FILES # Delete the tracking file -rm -f sdk/python/src/.openapi-generator/FILES +rm -f "${PYMOD}/.openapi-generator/FILES" # Generate and track new files openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/src/zrok -g python \ --package-name zrok_api --additional-properties projectName=zrok From f23a6f1a1a92717ba70abc0387c733242c751840 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 16:07:37 -0500 Subject: [PATCH 29/56] fix path to module --- bin/generate_rest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index 36e0d501..6ed27f08 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -74,7 +74,7 @@ done < ${PYMOD}/.openapi-generator/FILES # Delete the tracking file rm -f "${PYMOD}/.openapi-generator/FILES" # Generate and track new files -openapi-generator-cli generate -i specs/zrok.yml -o sdk/python/src/zrok -g python \ +openapi-generator-cli generate -i specs/zrok.yml -o "${PYMOD}" -g python \ --package-name zrok_api --additional-properties projectName=zrok git checkout rest_server_zrok/configure_zrok.go From ee87e1929fc1f0a6652d5e21bfe76073e0983ea7 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 16:20:00 -0500 Subject: [PATCH 30/56] normalize generate script --- bin/generate_rest.sh | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index 6ed27f08..6f7690d2 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -30,16 +30,16 @@ zrokDir=$(realpath "$scriptDir/..") zrokSpec=$(realpath "$zrokDir/specs/zrok.yml") echo "...clean generate zrok server/client" -for GEN in \ +for genDir in \ ./rest_client_zrok/ \ ./rest_model_zrok/ \ ./rest_server_zrok/ do - if [[ -d $GEN ]] + if [[ -d $genDir ]] then - rm -rf "$GEN" + rm -rf "$genDir" else - echo "WARN: not deleting $GEN because it does not exist" >&2 + echo "WARN: not deleting $genDir because it does not exist" >&2 fi done @@ -51,7 +51,7 @@ swagger generate client -P rest_model_zrok.Principal -f "$zrokSpec" -c rest_clie echo "...generating api console ts client" rm -rf ui/src/api -openapi-generator-cli generate -i specs/zrok.yml -o ui/src/api -g typescript-fetch +openapi-generator-cli generate -i "$zrokSpec" -o ui/src/api -g typescript-fetch echo "...generating agent console ts client" rm -rf agent/agentUi/src/api @@ -59,22 +59,21 @@ openapi-generator-cli generate -i agent/agentGrpc/agent.swagger.json -o agent/ag echo "...generating nodejs sdk ts client" rm -rf sdk/nodejs/sdk/src/api -openapi-generator-cli generate -i specs/zrok.yml -o sdk/nodejs/sdk/src/api -g typescript-fetch +openapi-generator-cli generate -i "$zrokSpec" -o sdk/nodejs/sdk/src/api -g typescript-fetch echo "...generating python sdk client" -# Delete tracked Python files -PYMOD=sdk/python/src -while IFS= read -r FILE +pyMod="sdk/python/src" +while IFS= read -r genFile do - if [[ -e "${PYMOD}/${FILE}" ]] + if [[ -e "$pyMod/$genFile" ]] then - rm -f "${PYMOD}/${FILE}" + rm -f "$pyMod/$genFile" fi -done < ${PYMOD}/.openapi-generator/FILES +done < "$pyMod/.openapi-generator/FILES" # Delete the tracking file -rm -f "${PYMOD}/.openapi-generator/FILES" +rm -f "$pyMod/.openapi-generator/FILES" # Generate and track new files -openapi-generator-cli generate -i specs/zrok.yml -o "${PYMOD}" -g python \ +openapi-generator-cli generate -i "$zrokSpec" -o "$pyMod" -g python \ --package-name zrok_api --additional-properties projectName=zrok git checkout rest_server_zrok/configure_zrok.go From 2f43e92bbb9dabad6496bc954a9232ddf8e4eea9 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 16:38:16 -0500 Subject: [PATCH 31/56] tidy --- .gitignore | 2 +- sdk/python/examples/http-server/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1caa2695..a8764d5b 100644 --- a/.gitignore +++ b/.gitignore @@ -40,4 +40,4 @@ sdk/nodejs/sdk/dist # py module artifacts *.egg-info/ -__pycache__/ \ No newline at end of file +__pycache__/ diff --git a/sdk/python/examples/http-server/requirements.txt b/sdk/python/examples/http-server/requirements.txt index 0c7f5853..e4a200c6 100644 --- a/sdk/python/examples/http-server/requirements.txt +++ b/sdk/python/examples/http-server/requirements.txt @@ -1,3 +1,3 @@ zrok flask -waitress \ No newline at end of file +waitress From 798f658178f703d0d43a4482dc48725ddb28cdb5 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 18:02:44 -0500 Subject: [PATCH 32/56] simply generator wrapper script --- bin/generate_rest.sh | 42 +++++++------------ sdk/python/examples/pastebin/requirements.txt | 2 +- 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index 6f7690d2..4c0b3aaf 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -2,22 +2,22 @@ set -euo pipefail -command -v swagger >/dev/null 2>&1 || { +command -v swagger &>/dev/null || { echo >&2 "command 'swagger' not installed. see: https://github.com/go-swagger/go-swagger for installation" exit 1 } -command -v swagger-codegen 2>&1 || { +command -v swagger-codegen &>/dev/null || { echo >&2 "command 'swagger-codegen' not installed. see: https://github.com/swagger-api/swagger-codegen for installation" exit 1 } -command -v openapi-generator-cli 2>&1 || { +command -v openapi-generator-cli &>/dev/null || { echo >&2 "command 'openapi-generator-cli' not installed. see: https://www.npmjs.com/package/@openapitools/openapi-generator-cli for installation" exit 1 } -command -v realpath 2>&1 || { +command -v realpath &>/dev/null || { echo >&2 "command 'realpath' not installed. see: https://www.npmjs.com/package/realpath for installation" exit 1 } @@ -26,22 +26,17 @@ scriptPath=$(realpath "$0") scriptDir=$(dirname "$scriptPath") zrokDir=$(realpath "$scriptDir/..") - zrokSpec=$(realpath "$zrokDir/specs/zrok.yml") +# anti-oops in case user runs this script from somewhere else +if [[ "$(realpath "$zrokDir")" != "$(realpath "$(pwd)")" ]] +then + echo "ERROR: must be run from zrok root" >&2 + exit 1 +fi + echo "...clean generate zrok server/client" -for genDir in \ - ./rest_client_zrok/ \ - ./rest_model_zrok/ \ - ./rest_server_zrok/ -do - if [[ -d $genDir ]] - then - rm -rf "$genDir" - else - echo "WARN: not deleting $genDir because it does not exist" >&2 - fi -done +rm -rf ./rest_* echo "...generating zrok server" swagger generate server -P rest_model_zrok.Principal -f "$zrokSpec" -s rest_server_zrok -t "$zrokDir" -m "rest_model_zrok" --exclude-main @@ -62,17 +57,8 @@ rm -rf sdk/nodejs/sdk/src/api openapi-generator-cli generate -i "$zrokSpec" -o sdk/nodejs/sdk/src/api -g typescript-fetch echo "...generating python sdk client" -pyMod="sdk/python/src" -while IFS= read -r genFile -do - if [[ -e "$pyMod/$genFile" ]] - then - rm -f "$pyMod/$genFile" - fi -done < "$pyMod/.openapi-generator/FILES" -# Delete the tracking file -rm -f "$pyMod/.openapi-generator/FILES" -# Generate and track new files +pyMod="./sdk/python/src" +rm -rf "$pyMod"/{zrok_api,docs,test,.gitignore,README.md,requirements.txt} openapi-generator-cli generate -i "$zrokSpec" -o "$pyMod" -g python \ --package-name zrok_api --additional-properties projectName=zrok diff --git a/sdk/python/examples/pastebin/requirements.txt b/sdk/python/examples/pastebin/requirements.txt index 94597b74..3c94d273 100644 --- a/sdk/python/examples/pastebin/requirements.txt +++ b/sdk/python/examples/pastebin/requirements.txt @@ -1,2 +1,2 @@ zrok -requests \ No newline at end of file +requests From 260b4d81fb38071000ebeddc1f7a5be8ed80af85 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 18:39:02 -0500 Subject: [PATCH 33/56] run pytest on the pr build workflow --- .github/workflows/ci-build.yml | 37 ++++++++++++++++++++++++ .gitignore | 1 + sdk/python/src/.openapi-generator-ignore | 1 - sdk/python/src/.openapi-generator/FILES | 1 + sdk/python/src/__init__.py | 1 - sdk/python/src/requirements.txt | 4 +++ sdk/python/src/test-requirements.txt | 6 ++++ 7 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 sdk/python/src/requirements.txt create mode 100644 sdk/python/src/test-requirements.txt diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 07970c54..1bbe0061 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -88,6 +88,43 @@ jobs: path: ${{ steps.solve_go_bin.outputs.go_bin }}/zrok if-no-files-found: error + pytest: + + runs-on: ubuntu-24.04 + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + shell: bash + working-directory: sdk/python/src/ + run: | + + set -o pipefail + set -o xtrace + + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r test-requirements.txt + + - name: Test with pytest + shell: bash + working-directory: sdk/python/src/ + run: | + + set -o pipefail + set -o xtrace + + pytest --cov=zrok_api + # build a release candidate container image for branches named "main" or like "v*" rc-container-build: needs: ubuntu-build diff --git a/.gitignore b/.gitignore index a8764d5b..8f53b79d 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ sdk/nodejs/sdk/dist # py module artifacts *.egg-info/ __pycache__/ +.coverage diff --git a/sdk/python/src/.openapi-generator-ignore b/sdk/python/src/.openapi-generator-ignore index 0038904a..db707341 100644 --- a/sdk/python/src/.openapi-generator-ignore +++ b/sdk/python/src/.openapi-generator-ignore @@ -8,7 +8,6 @@ git_push.sh pyproject.toml .github/workflows/python.yml tox.ini -test-requirements.txt # ## custom files that must not be overwritten diff --git a/sdk/python/src/.openapi-generator/FILES b/sdk/python/src/.openapi-generator/FILES index 6d1e98d7..5294bfba 100644 --- a/sdk/python/src/.openapi-generator/FILES +++ b/sdk/python/src/.openapi-generator/FILES @@ -57,6 +57,7 @@ docs/Verify200Response.md docs/VerifyRequest.md docs/VersionInventory200Response.md requirements.txt +test-requirements.txt test/__init__.py test/test_access201_response.py test/test_access_request.py diff --git a/sdk/python/src/__init__.py b/sdk/python/src/__init__.py index e6b36ad8..e69de29b 100644 --- a/sdk/python/src/__init__.py +++ b/sdk/python/src/__init__.py @@ -1 +0,0 @@ -from . import environment # noqa diff --git a/sdk/python/src/requirements.txt b/sdk/python/src/requirements.txt new file mode 100644 index 00000000..67f7f68d --- /dev/null +++ b/sdk/python/src/requirements.txt @@ -0,0 +1,4 @@ +urllib3 >= 1.25.3, < 3.0.0 +python_dateutil >= 2.8.2 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/sdk/python/src/test-requirements.txt b/sdk/python/src/test-requirements.txt new file mode 100644 index 00000000..e98555c1 --- /dev/null +++ b/sdk/python/src/test-requirements.txt @@ -0,0 +1,6 @@ +pytest >= 7.2.1 +pytest-cov >= 2.8.1 +tox >= 3.9.0 +flake8 >= 4.0.0 +types-python-dateutil >= 2.8.19.14 +mypy >= 1.5 From caadc5b65ffbf57233e2bc71d8acf023d3571819 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 18:45:33 -0500 Subject: [PATCH 34/56] fix pytest targets --- .github/workflows/ci-build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 1bbe0061..8c030fab 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -17,7 +17,7 @@ concurrency: jobs: ubuntu-build: name: Build Linux AMD64 CLI - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -93,7 +93,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 @@ -112,6 +112,7 @@ jobs: set -o xtrace python -m pip install --upgrade pip + pip install -e "$PWD" pip install -r requirements.txt pip install -r test-requirements.txt @@ -130,7 +131,7 @@ jobs: needs: ubuntu-build if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v') name: Build Release Candidate Container Image - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Set a container image tag from the branch name id: slug From ce4491723f28005f842892cac0f830c1fb8c259a Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 18:49:46 -0500 Subject: [PATCH 35/56] let pytest be more verbose --- .github/workflows/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 8c030fab..098d79a9 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -124,7 +124,7 @@ jobs: set -o pipefail set -o xtrace - pytest --cov=zrok_api + pytest --cov=zrok_api --verbose # build a release candidate container image for branches named "main" or like "v*" rc-container-build: From 97d76d45cd07cf39bddf40973fd9b2b5165995a8 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 18:50:33 -0500 Subject: [PATCH 36/56] temporarily commit the generated py client --- sdk/python/src/.gitignore | 66 + sdk/python/src/README.md | 215 + sdk/python/src/docs/Access201Response.md | 30 + sdk/python/src/docs/AccessRequest.md | 32 + sdk/python/src/docs/AccountApi.md | 557 +++ .../src/docs/AddOrganizationMemberRequest.md | 31 + sdk/python/src/docs/AdminApi.md | 1079 +++++ sdk/python/src/docs/AuthUser.md | 30 + sdk/python/src/docs/ChangePasswordRequest.md | 31 + .../src/docs/ClientVersionCheckRequest.md | 29 + sdk/python/src/docs/Configuration.md | 33 + .../src/docs/CreateFrontend201Response.md | 29 + sdk/python/src/docs/CreateFrontendRequest.md | 32 + .../src/docs/CreateIdentity201Response.md | 30 + sdk/python/src/docs/CreateIdentityRequest.md | 29 + .../src/docs/CreateOrganization201Response.md | 29 + .../src/docs/CreateOrganizationRequest.md | 29 + sdk/python/src/docs/DisableRequest.md | 29 + sdk/python/src/docs/EnableRequest.md | 30 + sdk/python/src/docs/Environment.md | 36 + .../src/docs/EnvironmentAndResources.md | 31 + sdk/python/src/docs/EnvironmentApi.md | 162 + sdk/python/src/docs/Frontend.md | 37 + .../src/docs/GetSparklines200Response.md | 29 + sdk/python/src/docs/GetSparklinesRequest.md | 31 + sdk/python/src/docs/InviteRequest.md | 30 + .../src/docs/InviteTokenGenerateRequest.md | 29 + .../src/docs/ListFrontends200ResponseInner.md | 34 + .../src/docs/ListMemberships200Response.md | 29 + ...tMemberships200ResponseMembershipsInner.md | 31 + .../ListOrganizationMembers200Response.md | 29 + ...anizationMembers200ResponseMembersInner.md | 30 + .../src/docs/ListOrganizations200Response.md | 29 + ...anizations200ResponseOrganizationsInner.md | 30 + sdk/python/src/docs/LoginRequest.md | 30 + sdk/python/src/docs/MetadataApi.md | 1171 +++++ sdk/python/src/docs/Metrics.md | 32 + sdk/python/src/docs/MetricsSample.md | 31 + sdk/python/src/docs/Overview.md | 30 + sdk/python/src/docs/Principal.md | 33 + .../docs/RegenerateAccountToken200Response.md | 29 + .../src/docs/RegenerateAccountTokenRequest.md | 29 + sdk/python/src/docs/RegisterRequest.md | 30 + .../docs/RemoveOrganizationMemberRequest.md | 30 + sdk/python/src/docs/ResetPasswordRequest.md | 30 + sdk/python/src/docs/Share.md | 40 + sdk/python/src/docs/ShareApi.md | 473 ++ sdk/python/src/docs/ShareRequest.md | 42 + sdk/python/src/docs/ShareResponse.md | 30 + sdk/python/src/docs/SparkDataSample.md | 30 + sdk/python/src/docs/UnaccessRequest.md | 31 + sdk/python/src/docs/UnshareRequest.md | 31 + sdk/python/src/docs/UpdateAccessRequest.md | 31 + sdk/python/src/docs/UpdateFrontendRequest.md | 31 + sdk/python/src/docs/UpdateShareRequest.md | 32 + sdk/python/src/docs/Verify200Response.md | 29 + sdk/python/src/docs/VerifyRequest.md | 29 + .../src/docs/VersionInventory200Response.md | 29 + sdk/python/src/test/__init__.py | 0 .../src/test/test_access201_response.py | 52 + sdk/python/src/test/test_access_request.py | 54 + sdk/python/src/test/test_account_api.py | 79 + .../test_add_organization_member_request.py | 53 + sdk/python/src/test/test_admin_api.py | 115 + sdk/python/src/test/test_auth_user.py | 52 + .../src/test/test_change_password_request.py | 53 + .../test/test_client_version_check_request.py | 51 + sdk/python/src/test/test_configuration.py | 55 + .../test/test_create_frontend201_response.py | 51 + .../src/test/test_create_frontend_request.py | 54 + .../test/test_create_identity201_response.py | 52 + .../src/test/test_create_identity_request.py | 51 + .../test_create_organization201_response.py | 51 + .../test/test_create_organization_request.py | 51 + sdk/python/src/test/test_disable_request.py | 51 + sdk/python/src/test/test_enable_request.py | 52 + sdk/python/src/test/test_environment.py | 62 + .../test/test_environment_and_resources.py | 94 + sdk/python/src/test/test_environment_api.py | 43 + sdk/python/src/test/test_frontend.py | 59 + .../test/test_get_sparklines200_response.py | 62 + .../src/test/test_get_sparklines_request.py | 57 + sdk/python/src/test/test_invite_request.py | 52 + .../test_invite_token_generate_request.py | 53 + .../test_list_frontends200_response_inner.py | 56 + .../test/test_list_memberships200_response.py | 56 + ...mberships200_response_memberships_inner.py | 53 + ...t_list_organization_members200_response.py | 55 + ...ation_members200_response_members_inner.py | 52 + .../test_list_organizations200_response.py | 55 + ...zations200_response_organizations_inner.py | 52 + sdk/python/src/test/test_login_request.py | 52 + sdk/python/src/test/test_metadata_api.py | 127 + sdk/python/src/test/test_metrics.py | 59 + sdk/python/src/test/test_metrics_sample.py | 53 + sdk/python/src/test/test_overview.py | 93 + sdk/python/src/test/test_principal.py | 55 + ...st_regenerate_account_token200_response.py | 51 + .../test_regenerate_account_token_request.py | 51 + sdk/python/src/test/test_register_request.py | 52 + ...test_remove_organization_member_request.py | 52 + .../src/test/test_reset_password_request.py | 52 + sdk/python/src/test/test_share.py | 66 + sdk/python/src/test/test_share_api.py | 67 + sdk/python/src/test/test_share_request.py | 74 + sdk/python/src/test/test_share_response.py | 54 + sdk/python/src/test/test_spark_data_sample.py | 52 + sdk/python/src/test/test_unaccess_request.py | 53 + sdk/python/src/test/test_unshare_request.py | 53 + .../src/test/test_update_access_request.py | 53 + .../src/test/test_update_frontend_request.py | 53 + .../src/test/test_update_share_request.py | 58 + .../src/test/test_verify200_response.py | 51 + sdk/python/src/test/test_verify_request.py | 51 + .../test_version_inventory200_response.py | 51 + sdk/python/src/zrok_api/__init__.py | 88 + sdk/python/src/zrok_api/api/__init__.py | 9 + sdk/python/src/zrok_api/api/account_api.py | 2261 +++++++++ sdk/python/src/zrok_api/api/admin_api.py | 3855 +++++++++++++++ .../src/zrok_api/api/environment_api.py | 589 +++ sdk/python/src/zrok_api/api/metadata_api.py | 4242 +++++++++++++++++ sdk/python/src/zrok_api/api/share_api.py | 1712 +++++++ sdk/python/src/zrok_api/api_client.py | 797 ++++ sdk/python/src/zrok_api/api_response.py | 21 + sdk/python/src/zrok_api/configuration.py | 602 +++ sdk/python/src/zrok_api/exceptions.py | 216 + sdk/python/src/zrok_api/models/__init__.py | 67 + .../src/zrok_api/models/access201_response.py | 89 + .../src/zrok_api/models/access_request.py | 93 + .../models/add_organization_member_request.py | 91 + sdk/python/src/zrok_api/models/auth_user.py | 89 + .../models/change_password_request.py | 91 + .../models/client_version_check_request.py | 87 + .../src/zrok_api/models/configuration.py | 95 + .../models/create_frontend201_response.py | 87 + .../models/create_frontend_request.py | 103 + .../models/create_identity201_response.py | 89 + .../models/create_identity_request.py | 87 + .../models/create_organization201_response.py | 87 + .../models/create_organization_request.py | 87 + .../src/zrok_api/models/disable_request.py | 87 + .../src/zrok_api/models/enable_request.py | 89 + sdk/python/src/zrok_api/models/environment.py | 109 + .../models/environment_and_resources.py | 111 + sdk/python/src/zrok_api/models/frontend.py | 103 + .../models/get_sparklines200_response.py | 95 + .../zrok_api/models/get_sparklines_request.py | 91 + .../src/zrok_api/models/invite_request.py | 89 + .../models/invite_token_generate_request.py | 87 + .../list_frontends200_response_inner.py | 97 + .../models/list_memberships200_response.py | 95 + ...mberships200_response_memberships_inner.py | 91 + .../list_organization_members200_response.py | 95 + ...ation_members200_response_members_inner.py | 89 + .../models/list_organizations200_response.py | 95 + ...zations200_response_organizations_inner.py | 89 + .../src/zrok_api/models/login_request.py | 89 + sdk/python/src/zrok_api/models/metrics.py | 101 + .../src/zrok_api/models/metrics_sample.py | 91 + sdk/python/src/zrok_api/models/overview.py | 97 + sdk/python/src/zrok_api/models/principal.py | 95 + .../regenerate_account_token200_response.py | 87 + .../regenerate_account_token_request.py | 87 + .../src/zrok_api/models/register_request.py | 89 + .../remove_organization_member_request.py | 89 + .../zrok_api/models/reset_password_request.py | 89 + sdk/python/src/zrok_api/models/share.py | 117 + .../src/zrok_api/models/share_request.py | 161 + .../src/zrok_api/models/share_response.py | 89 + .../src/zrok_api/models/spark_data_sample.py | 89 + .../src/zrok_api/models/unaccess_request.py | 91 + .../src/zrok_api/models/unshare_request.py | 91 + .../zrok_api/models/update_access_request.py | 91 + .../models/update_frontend_request.py | 91 + .../zrok_api/models/update_share_request.py | 93 + .../src/zrok_api/models/verify200_response.py | 87 + .../src/zrok_api/models/verify_request.py | 87 + .../models/version_inventory200_response.py | 87 + sdk/python/src/zrok_api/py.typed | 0 sdk/python/src/zrok_api/rest.py | 258 + 180 files changed, 28063 insertions(+) create mode 100644 sdk/python/src/.gitignore create mode 100644 sdk/python/src/README.md create mode 100644 sdk/python/src/docs/Access201Response.md create mode 100644 sdk/python/src/docs/AccessRequest.md create mode 100644 sdk/python/src/docs/AccountApi.md create mode 100644 sdk/python/src/docs/AddOrganizationMemberRequest.md create mode 100644 sdk/python/src/docs/AdminApi.md create mode 100644 sdk/python/src/docs/AuthUser.md create mode 100644 sdk/python/src/docs/ChangePasswordRequest.md create mode 100644 sdk/python/src/docs/ClientVersionCheckRequest.md create mode 100644 sdk/python/src/docs/Configuration.md create mode 100644 sdk/python/src/docs/CreateFrontend201Response.md create mode 100644 sdk/python/src/docs/CreateFrontendRequest.md create mode 100644 sdk/python/src/docs/CreateIdentity201Response.md create mode 100644 sdk/python/src/docs/CreateIdentityRequest.md create mode 100644 sdk/python/src/docs/CreateOrganization201Response.md create mode 100644 sdk/python/src/docs/CreateOrganizationRequest.md create mode 100644 sdk/python/src/docs/DisableRequest.md create mode 100644 sdk/python/src/docs/EnableRequest.md create mode 100644 sdk/python/src/docs/Environment.md create mode 100644 sdk/python/src/docs/EnvironmentAndResources.md create mode 100644 sdk/python/src/docs/EnvironmentApi.md create mode 100644 sdk/python/src/docs/Frontend.md create mode 100644 sdk/python/src/docs/GetSparklines200Response.md create mode 100644 sdk/python/src/docs/GetSparklinesRequest.md create mode 100644 sdk/python/src/docs/InviteRequest.md create mode 100644 sdk/python/src/docs/InviteTokenGenerateRequest.md create mode 100644 sdk/python/src/docs/ListFrontends200ResponseInner.md create mode 100644 sdk/python/src/docs/ListMemberships200Response.md create mode 100644 sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md create mode 100644 sdk/python/src/docs/ListOrganizationMembers200Response.md create mode 100644 sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md create mode 100644 sdk/python/src/docs/ListOrganizations200Response.md create mode 100644 sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md create mode 100644 sdk/python/src/docs/LoginRequest.md create mode 100644 sdk/python/src/docs/MetadataApi.md create mode 100644 sdk/python/src/docs/Metrics.md create mode 100644 sdk/python/src/docs/MetricsSample.md create mode 100644 sdk/python/src/docs/Overview.md create mode 100644 sdk/python/src/docs/Principal.md create mode 100644 sdk/python/src/docs/RegenerateAccountToken200Response.md create mode 100644 sdk/python/src/docs/RegenerateAccountTokenRequest.md create mode 100644 sdk/python/src/docs/RegisterRequest.md create mode 100644 sdk/python/src/docs/RemoveOrganizationMemberRequest.md create mode 100644 sdk/python/src/docs/ResetPasswordRequest.md create mode 100644 sdk/python/src/docs/Share.md create mode 100644 sdk/python/src/docs/ShareApi.md create mode 100644 sdk/python/src/docs/ShareRequest.md create mode 100644 sdk/python/src/docs/ShareResponse.md create mode 100644 sdk/python/src/docs/SparkDataSample.md create mode 100644 sdk/python/src/docs/UnaccessRequest.md create mode 100644 sdk/python/src/docs/UnshareRequest.md create mode 100644 sdk/python/src/docs/UpdateAccessRequest.md create mode 100644 sdk/python/src/docs/UpdateFrontendRequest.md create mode 100644 sdk/python/src/docs/UpdateShareRequest.md create mode 100644 sdk/python/src/docs/Verify200Response.md create mode 100644 sdk/python/src/docs/VerifyRequest.md create mode 100644 sdk/python/src/docs/VersionInventory200Response.md create mode 100644 sdk/python/src/test/__init__.py create mode 100644 sdk/python/src/test/test_access201_response.py create mode 100644 sdk/python/src/test/test_access_request.py create mode 100644 sdk/python/src/test/test_account_api.py create mode 100644 sdk/python/src/test/test_add_organization_member_request.py create mode 100644 sdk/python/src/test/test_admin_api.py create mode 100644 sdk/python/src/test/test_auth_user.py create mode 100644 sdk/python/src/test/test_change_password_request.py create mode 100644 sdk/python/src/test/test_client_version_check_request.py create mode 100644 sdk/python/src/test/test_configuration.py create mode 100644 sdk/python/src/test/test_create_frontend201_response.py create mode 100644 sdk/python/src/test/test_create_frontend_request.py create mode 100644 sdk/python/src/test/test_create_identity201_response.py create mode 100644 sdk/python/src/test/test_create_identity_request.py create mode 100644 sdk/python/src/test/test_create_organization201_response.py create mode 100644 sdk/python/src/test/test_create_organization_request.py create mode 100644 sdk/python/src/test/test_disable_request.py create mode 100644 sdk/python/src/test/test_enable_request.py create mode 100644 sdk/python/src/test/test_environment.py create mode 100644 sdk/python/src/test/test_environment_and_resources.py create mode 100644 sdk/python/src/test/test_environment_api.py create mode 100644 sdk/python/src/test/test_frontend.py create mode 100644 sdk/python/src/test/test_get_sparklines200_response.py create mode 100644 sdk/python/src/test/test_get_sparklines_request.py create mode 100644 sdk/python/src/test/test_invite_request.py create mode 100644 sdk/python/src/test/test_invite_token_generate_request.py create mode 100644 sdk/python/src/test/test_list_frontends200_response_inner.py create mode 100644 sdk/python/src/test/test_list_memberships200_response.py create mode 100644 sdk/python/src/test/test_list_memberships200_response_memberships_inner.py create mode 100644 sdk/python/src/test/test_list_organization_members200_response.py create mode 100644 sdk/python/src/test/test_list_organization_members200_response_members_inner.py create mode 100644 sdk/python/src/test/test_list_organizations200_response.py create mode 100644 sdk/python/src/test/test_list_organizations200_response_organizations_inner.py create mode 100644 sdk/python/src/test/test_login_request.py create mode 100644 sdk/python/src/test/test_metadata_api.py create mode 100644 sdk/python/src/test/test_metrics.py create mode 100644 sdk/python/src/test/test_metrics_sample.py create mode 100644 sdk/python/src/test/test_overview.py create mode 100644 sdk/python/src/test/test_principal.py create mode 100644 sdk/python/src/test/test_regenerate_account_token200_response.py create mode 100644 sdk/python/src/test/test_regenerate_account_token_request.py create mode 100644 sdk/python/src/test/test_register_request.py create mode 100644 sdk/python/src/test/test_remove_organization_member_request.py create mode 100644 sdk/python/src/test/test_reset_password_request.py create mode 100644 sdk/python/src/test/test_share.py create mode 100644 sdk/python/src/test/test_share_api.py create mode 100644 sdk/python/src/test/test_share_request.py create mode 100644 sdk/python/src/test/test_share_response.py create mode 100644 sdk/python/src/test/test_spark_data_sample.py create mode 100644 sdk/python/src/test/test_unaccess_request.py create mode 100644 sdk/python/src/test/test_unshare_request.py create mode 100644 sdk/python/src/test/test_update_access_request.py create mode 100644 sdk/python/src/test/test_update_frontend_request.py create mode 100644 sdk/python/src/test/test_update_share_request.py create mode 100644 sdk/python/src/test/test_verify200_response.py create mode 100644 sdk/python/src/test/test_verify_request.py create mode 100644 sdk/python/src/test/test_version_inventory200_response.py create mode 100644 sdk/python/src/zrok_api/__init__.py create mode 100644 sdk/python/src/zrok_api/api/__init__.py create mode 100644 sdk/python/src/zrok_api/api/account_api.py create mode 100644 sdk/python/src/zrok_api/api/admin_api.py create mode 100644 sdk/python/src/zrok_api/api/environment_api.py create mode 100644 sdk/python/src/zrok_api/api/metadata_api.py create mode 100644 sdk/python/src/zrok_api/api/share_api.py create mode 100644 sdk/python/src/zrok_api/api_client.py create mode 100644 sdk/python/src/zrok_api/api_response.py create mode 100644 sdk/python/src/zrok_api/configuration.py create mode 100644 sdk/python/src/zrok_api/exceptions.py create mode 100644 sdk/python/src/zrok_api/models/__init__.py create mode 100644 sdk/python/src/zrok_api/models/access201_response.py create mode 100644 sdk/python/src/zrok_api/models/access_request.py create mode 100644 sdk/python/src/zrok_api/models/add_organization_member_request.py create mode 100644 sdk/python/src/zrok_api/models/auth_user.py create mode 100644 sdk/python/src/zrok_api/models/change_password_request.py create mode 100644 sdk/python/src/zrok_api/models/client_version_check_request.py create mode 100644 sdk/python/src/zrok_api/models/configuration.py create mode 100644 sdk/python/src/zrok_api/models/create_frontend201_response.py create mode 100644 sdk/python/src/zrok_api/models/create_frontend_request.py create mode 100644 sdk/python/src/zrok_api/models/create_identity201_response.py create mode 100644 sdk/python/src/zrok_api/models/create_identity_request.py create mode 100644 sdk/python/src/zrok_api/models/create_organization201_response.py create mode 100644 sdk/python/src/zrok_api/models/create_organization_request.py create mode 100644 sdk/python/src/zrok_api/models/disable_request.py create mode 100644 sdk/python/src/zrok_api/models/enable_request.py create mode 100644 sdk/python/src/zrok_api/models/environment.py create mode 100644 sdk/python/src/zrok_api/models/environment_and_resources.py create mode 100644 sdk/python/src/zrok_api/models/frontend.py create mode 100644 sdk/python/src/zrok_api/models/get_sparklines200_response.py create mode 100644 sdk/python/src/zrok_api/models/get_sparklines_request.py create mode 100644 sdk/python/src/zrok_api/models/invite_request.py create mode 100644 sdk/python/src/zrok_api/models/invite_token_generate_request.py create mode 100644 sdk/python/src/zrok_api/models/list_frontends200_response_inner.py create mode 100644 sdk/python/src/zrok_api/models/list_memberships200_response.py create mode 100644 sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py create mode 100644 sdk/python/src/zrok_api/models/list_organization_members200_response.py create mode 100644 sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py create mode 100644 sdk/python/src/zrok_api/models/list_organizations200_response.py create mode 100644 sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py create mode 100644 sdk/python/src/zrok_api/models/login_request.py create mode 100644 sdk/python/src/zrok_api/models/metrics.py create mode 100644 sdk/python/src/zrok_api/models/metrics_sample.py create mode 100644 sdk/python/src/zrok_api/models/overview.py create mode 100644 sdk/python/src/zrok_api/models/principal.py create mode 100644 sdk/python/src/zrok_api/models/regenerate_account_token200_response.py create mode 100644 sdk/python/src/zrok_api/models/regenerate_account_token_request.py create mode 100644 sdk/python/src/zrok_api/models/register_request.py create mode 100644 sdk/python/src/zrok_api/models/remove_organization_member_request.py create mode 100644 sdk/python/src/zrok_api/models/reset_password_request.py create mode 100644 sdk/python/src/zrok_api/models/share.py create mode 100644 sdk/python/src/zrok_api/models/share_request.py create mode 100644 sdk/python/src/zrok_api/models/share_response.py create mode 100644 sdk/python/src/zrok_api/models/spark_data_sample.py create mode 100644 sdk/python/src/zrok_api/models/unaccess_request.py create mode 100644 sdk/python/src/zrok_api/models/unshare_request.py create mode 100644 sdk/python/src/zrok_api/models/update_access_request.py create mode 100644 sdk/python/src/zrok_api/models/update_frontend_request.py create mode 100644 sdk/python/src/zrok_api/models/update_share_request.py create mode 100644 sdk/python/src/zrok_api/models/verify200_response.py create mode 100644 sdk/python/src/zrok_api/models/verify_request.py create mode 100644 sdk/python/src/zrok_api/models/version_inventory200_response.py create mode 100644 sdk/python/src/zrok_api/py.typed create mode 100644 sdk/python/src/zrok_api/rest.py diff --git a/sdk/python/src/.gitignore b/sdk/python/src/.gitignore new file mode 100644 index 00000000..43995bd4 --- /dev/null +++ b/sdk/python/src/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/sdk/python/src/README.md b/sdk/python/src/README.md new file mode 100644 index 00000000..25ad2fe6 --- /dev/null +++ b/sdk/python/src/README.md @@ -0,0 +1,215 @@ +# zrok +zrok client access + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Package version: 1.0.0 +- Generator version: 7.12.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen + +## Requirements. + +Python 3.8+ + +## Installation & Usage +### pip install + +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 +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import zrok_api +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import zrok_api +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) + + try: + api_instance.change_password(body=body) + except ApiException as e: + print("Exception when calling AccountApi->change_password: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to */api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccountApi* | [**change_password**](docs/AccountApi.md#change_password) | **POST** /changePassword | +*AccountApi* | [**invite**](docs/AccountApi.md#invite) | **POST** /invite | +*AccountApi* | [**login**](docs/AccountApi.md#login) | **POST** /login | +*AccountApi* | [**regenerate_account_token**](docs/AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | +*AccountApi* | [**register**](docs/AccountApi.md#register) | **POST** /register | +*AccountApi* | [**reset_password**](docs/AccountApi.md#reset_password) | **POST** /resetPassword | +*AccountApi* | [**reset_password_request**](docs/AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | +*AccountApi* | [**verify**](docs/AccountApi.md#verify) | **POST** /verify | +*AdminApi* | [**add_organization_member**](docs/AdminApi.md#add_organization_member) | **POST** /organization/add | +*AdminApi* | [**create_account**](docs/AdminApi.md#create_account) | **POST** /account | +*AdminApi* | [**create_frontend**](docs/AdminApi.md#create_frontend) | **POST** /frontend | +*AdminApi* | [**create_identity**](docs/AdminApi.md#create_identity) | **POST** /identity | +*AdminApi* | [**create_organization**](docs/AdminApi.md#create_organization) | **POST** /organization | +*AdminApi* | [**delete_frontend**](docs/AdminApi.md#delete_frontend) | **DELETE** /frontend | +*AdminApi* | [**delete_organization**](docs/AdminApi.md#delete_organization) | **DELETE** /organization | +*AdminApi* | [**grants**](docs/AdminApi.md#grants) | **POST** /grants | +*AdminApi* | [**invite_token_generate**](docs/AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | +*AdminApi* | [**list_frontends**](docs/AdminApi.md#list_frontends) | **GET** /frontends | +*AdminApi* | [**list_organization_members**](docs/AdminApi.md#list_organization_members) | **POST** /organization/list | +*AdminApi* | [**list_organizations**](docs/AdminApi.md#list_organizations) | **GET** /organizations | +*AdminApi* | [**remove_organization_member**](docs/AdminApi.md#remove_organization_member) | **POST** /organization/remove | +*AdminApi* | [**update_frontend**](docs/AdminApi.md#update_frontend) | **PATCH** /frontend | +*EnvironmentApi* | [**disable**](docs/EnvironmentApi.md#disable) | **POST** /disable | +*EnvironmentApi* | [**enable**](docs/EnvironmentApi.md#enable) | **POST** /enable | +*MetadataApi* | [**client_version_check**](docs/MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | +*MetadataApi* | [**configuration**](docs/MetadataApi.md#configuration) | **GET** /configuration | +*MetadataApi* | [**get_account_detail**](docs/MetadataApi.md#get_account_detail) | **GET** /detail/account | +*MetadataApi* | [**get_account_metrics**](docs/MetadataApi.md#get_account_metrics) | **GET** /metrics/account | +*MetadataApi* | [**get_environment_detail**](docs/MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | +*MetadataApi* | [**get_environment_metrics**](docs/MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | +*MetadataApi* | [**get_frontend_detail**](docs/MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | +*MetadataApi* | [**get_share_detail**](docs/MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | +*MetadataApi* | [**get_share_metrics**](docs/MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | +*MetadataApi* | [**get_sparklines**](docs/MetadataApi.md#get_sparklines) | **POST** /sparklines | +*MetadataApi* | [**list_memberships**](docs/MetadataApi.md#list_memberships) | **GET** /memberships | +*MetadataApi* | [**list_org_members**](docs/MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | +*MetadataApi* | [**org_account_overview**](docs/MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | +*MetadataApi* | [**overview**](docs/MetadataApi.md#overview) | **GET** /overview | +*MetadataApi* | [**version**](docs/MetadataApi.md#version) | **GET** /version | +*MetadataApi* | [**version_inventory**](docs/MetadataApi.md#version_inventory) | **GET** /versions | +*ShareApi* | [**access**](docs/ShareApi.md#access) | **POST** /access | +*ShareApi* | [**share**](docs/ShareApi.md#share) | **POST** /share | +*ShareApi* | [**unaccess**](docs/ShareApi.md#unaccess) | **DELETE** /unaccess | +*ShareApi* | [**unshare**](docs/ShareApi.md#unshare) | **DELETE** /unshare | +*ShareApi* | [**update_access**](docs/ShareApi.md#update_access) | **PATCH** /access | +*ShareApi* | [**update_share**](docs/ShareApi.md#update_share) | **PATCH** /share | + + +## Documentation For Models + + - [Access201Response](docs/Access201Response.md) + - [AccessRequest](docs/AccessRequest.md) + - [AddOrganizationMemberRequest](docs/AddOrganizationMemberRequest.md) + - [AuthUser](docs/AuthUser.md) + - [ChangePasswordRequest](docs/ChangePasswordRequest.md) + - [ClientVersionCheckRequest](docs/ClientVersionCheckRequest.md) + - [Configuration](docs/Configuration.md) + - [CreateFrontend201Response](docs/CreateFrontend201Response.md) + - [CreateFrontendRequest](docs/CreateFrontendRequest.md) + - [CreateIdentity201Response](docs/CreateIdentity201Response.md) + - [CreateIdentityRequest](docs/CreateIdentityRequest.md) + - [CreateOrganization201Response](docs/CreateOrganization201Response.md) + - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md) + - [DisableRequest](docs/DisableRequest.md) + - [EnableRequest](docs/EnableRequest.md) + - [Environment](docs/Environment.md) + - [EnvironmentAndResources](docs/EnvironmentAndResources.md) + - [Frontend](docs/Frontend.md) + - [GetSparklines200Response](docs/GetSparklines200Response.md) + - [GetSparklinesRequest](docs/GetSparklinesRequest.md) + - [InviteRequest](docs/InviteRequest.md) + - [InviteTokenGenerateRequest](docs/InviteTokenGenerateRequest.md) + - [ListFrontends200ResponseInner](docs/ListFrontends200ResponseInner.md) + - [ListMemberships200Response](docs/ListMemberships200Response.md) + - [ListMemberships200ResponseMembershipsInner](docs/ListMemberships200ResponseMembershipsInner.md) + - [ListOrganizationMembers200Response](docs/ListOrganizationMembers200Response.md) + - [ListOrganizationMembers200ResponseMembersInner](docs/ListOrganizationMembers200ResponseMembersInner.md) + - [ListOrganizations200Response](docs/ListOrganizations200Response.md) + - [ListOrganizations200ResponseOrganizationsInner](docs/ListOrganizations200ResponseOrganizationsInner.md) + - [LoginRequest](docs/LoginRequest.md) + - [Metrics](docs/Metrics.md) + - [MetricsSample](docs/MetricsSample.md) + - [Overview](docs/Overview.md) + - [Principal](docs/Principal.md) + - [RegenerateAccountToken200Response](docs/RegenerateAccountToken200Response.md) + - [RegenerateAccountTokenRequest](docs/RegenerateAccountTokenRequest.md) + - [RegisterRequest](docs/RegisterRequest.md) + - [RemoveOrganizationMemberRequest](docs/RemoveOrganizationMemberRequest.md) + - [ResetPasswordRequest](docs/ResetPasswordRequest.md) + - [Share](docs/Share.md) + - [ShareRequest](docs/ShareRequest.md) + - [ShareResponse](docs/ShareResponse.md) + - [SparkDataSample](docs/SparkDataSample.md) + - [UnaccessRequest](docs/UnaccessRequest.md) + - [UnshareRequest](docs/UnshareRequest.md) + - [UpdateAccessRequest](docs/UpdateAccessRequest.md) + - [UpdateFrontendRequest](docs/UpdateFrontendRequest.md) + - [UpdateShareRequest](docs/UpdateShareRequest.md) + - [Verify200Response](docs/Verify200Response.md) + - [VerifyRequest](docs/VerifyRequest.md) + - [VersionInventory200Response](docs/VersionInventory200Response.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### key + +- **Type**: API key +- **API key parameter name**: x-token +- **Location**: HTTP header + + +## Author + + + + diff --git a/sdk/python/src/docs/Access201Response.md b/sdk/python/src/docs/Access201Response.md new file mode 100644 index 00000000..bc12a97a --- /dev/null +++ b/sdk/python/src/docs/Access201Response.md @@ -0,0 +1,30 @@ +# Access201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**backend_mode** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.access201_response import Access201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of Access201Response from a JSON string +access201_response_instance = Access201Response.from_json(json) +# print the JSON string representation of the object +print(Access201Response.to_json()) + +# convert the object into a dict +access201_response_dict = access201_response_instance.to_dict() +# create an instance of Access201Response from a dict +access201_response_from_dict = Access201Response.from_dict(access201_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/sdk/python/src/docs/AccessRequest.md b/sdk/python/src/docs/AccessRequest.md new file mode 100644 index 00000000..288b82ae --- /dev/null +++ b/sdk/python/src/docs/AccessRequest.md @@ -0,0 +1,32 @@ +# AccessRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] +**bind_address** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.access_request import AccessRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AccessRequest from a JSON string +access_request_instance = AccessRequest.from_json(json) +# print the JSON string representation of the object +print(AccessRequest.to_json()) + +# convert the object into a dict +access_request_dict = access_request_instance.to_dict() +# create an instance of AccessRequest from a dict +access_request_from_dict = AccessRequest.from_dict(access_request_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/sdk/python/src/docs/AccountApi.md b/sdk/python/src/docs/AccountApi.md new file mode 100644 index 00000000..cb6a3e97 --- /dev/null +++ b/sdk/python/src/docs/AccountApi.md @@ -0,0 +1,557 @@ +# zrok_api.AccountApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**change_password**](AccountApi.md#change_password) | **POST** /changePassword | +[**invite**](AccountApi.md#invite) | **POST** /invite | +[**login**](AccountApi.md#login) | **POST** /login | +[**regenerate_account_token**](AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | +[**register**](AccountApi.md#register) | **POST** /register | +[**reset_password**](AccountApi.md#reset_password) | **POST** /resetPassword | +[**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | +[**verify**](AccountApi.md#verify) | **POST** /verify | + + +# **change_password** +> change_password(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.change_password_request import ChangePasswordRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) + + try: + api_instance.change_password(body=body) + except Exception as e: + print("Exception when calling AccountApi->change_password: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ChangePasswordRequest**](ChangePasswordRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | password changed | - | +**400** | password not changed | - | +**401** | unauthorized | - | +**422** | password validation failure | - | +**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) + +# **invite** +> invite(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.invite_request import InviteRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.InviteRequest() # InviteRequest | (optional) + + try: + api_instance.invite(body=body) + except Exception as e: + print("Exception when calling AccountApi->invite: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**InviteRequest**](InviteRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | invitation created | - | +**400** | invitation not created (already exists) | - | +**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) + +# **login** +> str login(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.login_request import LoginRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.LoginRequest() # LoginRequest | (optional) + + try: + api_response = api_instance.login(body=body) + print("The response of AccountApi->login:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->login: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**LoginRequest**](LoginRequest.md)| | [optional] + +### Return type + +**str** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | login successful | - | +**401** | invalid login | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **regenerate_account_token** +> RegenerateAccountToken200Response regenerate_account_token(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) + + try: + api_response = api_instance.regenerate_account_token(body=body) + print("The response of AccountApi->regenerate_account_token:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] + +### Return type + +[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | regenerate account token | - | +**404** | account 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) + +# **register** +> RegenerateAccountToken200Response register(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.register_request import RegisterRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.RegisterRequest() # RegisterRequest | (optional) + + try: + api_response = api_instance.register(body=body) + print("The response of AccountApi->register:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->register: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**RegisterRequest**](RegisterRequest.md)| | [optional] + +### Return type + +[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | account created | - | +**404** | request not found | - | +**422** | password validation failure | - | +**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) + +# **reset_password** +> reset_password(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.reset_password_request import ResetPasswordRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.ResetPasswordRequest() # ResetPasswordRequest | (optional) + + try: + api_instance.reset_password(body=body) + except Exception as e: + print("Exception when calling AccountApi->reset_password: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ResetPasswordRequest**](ResetPasswordRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | password reset | - | +**404** | request not found | - | +**422** | password validation failure | - | +**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) + +# **reset_password_request** +> reset_password_request(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) + + try: + api_instance.reset_password_request(body=body) + except Exception as e: + print("Exception when calling AccountApi->reset_password_request: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | reset password request created | - | +**400** | reset password request not created | - | +**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) + +# **verify** +> Verify200Response verify(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.VerifyRequest() # VerifyRequest | (optional) + + try: + api_response = api_instance.verify(body=body) + print("The response of AccountApi->verify:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->verify: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**VerifyRequest**](VerifyRequest.md)| | [optional] + +### Return type + +[**Verify200Response**](Verify200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | registration token ready | - | +**404** | registration token 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/sdk/python/src/docs/AddOrganizationMemberRequest.md b/sdk/python/src/docs/AddOrganizationMemberRequest.md new file mode 100644 index 00000000..c866784a --- /dev/null +++ b/sdk/python/src/docs/AddOrganizationMemberRequest.md @@ -0,0 +1,31 @@ +# AddOrganizationMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**email** | **str** | | [optional] +**admin** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AddOrganizationMemberRequest from a JSON string +add_organization_member_request_instance = AddOrganizationMemberRequest.from_json(json) +# print the JSON string representation of the object +print(AddOrganizationMemberRequest.to_json()) + +# convert the object into a dict +add_organization_member_request_dict = add_organization_member_request_instance.to_dict() +# create an instance of AddOrganizationMemberRequest from a dict +add_organization_member_request_from_dict = AddOrganizationMemberRequest.from_dict(add_organization_member_request_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/sdk/python/src/docs/AdminApi.md b/sdk/python/src/docs/AdminApi.md new file mode 100644 index 00000000..7eec6028 --- /dev/null +++ b/sdk/python/src/docs/AdminApi.md @@ -0,0 +1,1079 @@ +# zrok_api.AdminApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_organization_member**](AdminApi.md#add_organization_member) | **POST** /organization/add | +[**create_account**](AdminApi.md#create_account) | **POST** /account | +[**create_frontend**](AdminApi.md#create_frontend) | **POST** /frontend | +[**create_identity**](AdminApi.md#create_identity) | **POST** /identity | +[**create_organization**](AdminApi.md#create_organization) | **POST** /organization | +[**delete_frontend**](AdminApi.md#delete_frontend) | **DELETE** /frontend | +[**delete_organization**](AdminApi.md#delete_organization) | **DELETE** /organization | +[**grants**](AdminApi.md#grants) | **POST** /grants | +[**invite_token_generate**](AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | +[**list_frontends**](AdminApi.md#list_frontends) | **GET** /frontends | +[**list_organization_members**](AdminApi.md#list_organization_members) | **POST** /organization/list | +[**list_organizations**](AdminApi.md#list_organizations) | **GET** /organizations | +[**remove_organization_member**](AdminApi.md#remove_organization_member) | **POST** /organization/remove | +[**update_frontend**](AdminApi.md#update_frontend) | **PATCH** /frontend | + + +# **add_organization_member** +> add_organization_member(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.AddOrganizationMemberRequest() # AddOrganizationMemberRequest | (optional) + + try: + api_instance.add_organization_member(body=body) + except Exception as e: + print("Exception when calling AdminApi->add_organization_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**AddOrganizationMemberRequest**](AddOrganizationMemberRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | member added | - | +**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_account** +> RegenerateAccountToken200Response create_account(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.LoginRequest() # LoginRequest | (optional) + + try: + api_response = api_instance.create_account(body=body) + print("The response of AdminApi->create_account:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_account: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**LoginRequest**](LoginRequest.md)| | [optional] + +### Return type + +[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | created | - | +**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) + +# **create_frontend** +> CreateFrontend201Response create_frontend(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateFrontendRequest() # CreateFrontendRequest | (optional) + + try: + api_response = api_instance.create_frontend(body=body) + print("The response of AdminApi->create_frontend:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_frontend: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateFrontendRequest**](CreateFrontendRequest.md)| | [optional] + +### Return type + +[**CreateFrontend201Response**](CreateFrontend201Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | frontend created | - | +**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_identity** +> CreateIdentity201Response create_identity(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateIdentityRequest() # CreateIdentityRequest | (optional) + + try: + api_response = api_instance.create_identity(body=body) + print("The response of AdminApi->create_identity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_identity: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateIdentityRequest**](CreateIdentityRequest.md)| | [optional] + +### Return type + +[**CreateIdentity201Response**](CreateIdentity201Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | created | - | +**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) + +# **create_organization** +> CreateOrganization201Response create_organization(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateOrganizationRequest() # CreateOrganizationRequest | (optional) + + try: + api_response = api_instance.create_organization(body=body) + print("The response of AdminApi->create_organization:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_organization: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md)| | [optional] + +### Return type + +[**CreateOrganization201Response**](CreateOrganization201Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | organization created | - | +**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) + +# **delete_frontend** +> delete_frontend(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateFrontend201Response() # CreateFrontend201Response | (optional) + + try: + api_instance.delete_frontend(body=body) + except Exception as e: + print("Exception when calling AdminApi->delete_frontend: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateFrontend201Response**](CreateFrontend201Response.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | frontend deleted | - | +**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) + +# **delete_organization** +> delete_organization(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) + + try: + api_instance.delete_organization(body=body) + except Exception as e: + print("Exception when calling AdminApi->delete_organization: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | organization deleted | - | +**401** | unauthorized | - | +**404** | organization 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) + +# **grants** +> grants(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.Verify200Response() # Verify200Response | (optional) + + try: + api_instance.grants(body=body) + except Exception as e: + print("Exception when calling AdminApi->grants: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Verify200Response**](Verify200Response.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) + +# **invite_token_generate** +> invite_token_generate(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.InviteTokenGenerateRequest() # InviteTokenGenerateRequest | (optional) + + try: + api_instance.invite_token_generate(body=body) + except Exception as e: + print("Exception when calling AdminApi->invite_token_generate: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**InviteTokenGenerateRequest**](InviteTokenGenerateRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | invite tokens created | - | +**400** | invite tokens not created | - | +**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) + +# **list_frontends** +> List[ListFrontends200ResponseInner] list_frontends() + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + + try: + api_response = api_instance.list_frontends() + print("The response of AdminApi->list_frontends:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->list_frontends: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[ListFrontends200ResponseInner]**](ListFrontends200ResponseInner.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) + +# **list_organization_members** +> ListOrganizationMembers200Response list_organization_members(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) + + try: + api_response = api_instance.list_organization_members(body=body) + print("The response of AdminApi->list_organization_members:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->list_organization_members: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] + +### Return type + +[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | list organization members | - | +**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_organizations** +> ListOrganizations200Response list_organizations() + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.list_organizations200_response import ListOrganizations200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + + try: + api_response = api_instance.list_organizations() + print("The response of AdminApi->list_organizations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->list_organizations: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ListOrganizations200Response**](ListOrganizations200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) + +# **remove_organization_member** +> remove_organization_member(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.RemoveOrganizationMemberRequest() # RemoveOrganizationMemberRequest | (optional) + + try: + api_instance.remove_organization_member(body=body) + except Exception as e: + print("Exception when calling AdminApi->remove_organization_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**RemoveOrganizationMemberRequest**](RemoveOrganizationMemberRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | member removed | - | +**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_frontend** +> update_frontend(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.update_frontend_request import UpdateFrontendRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.UpdateFrontendRequest() # UpdateFrontendRequest | (optional) + + try: + api_instance.update_frontend(body=body) + except Exception as e: + print("Exception when calling AdminApi->update_frontend: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UpdateFrontendRequest**](UpdateFrontendRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | frontend updated | - | +**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/sdk/python/src/docs/AuthUser.md b/sdk/python/src/docs/AuthUser.md new file mode 100644 index 00000000..99960687 --- /dev/null +++ b/sdk/python/src/docs/AuthUser.md @@ -0,0 +1,30 @@ +# AuthUser + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | [optional] +**password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.auth_user import AuthUser + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthUser from a JSON string +auth_user_instance = AuthUser.from_json(json) +# print the JSON string representation of the object +print(AuthUser.to_json()) + +# convert the object into a dict +auth_user_dict = auth_user_instance.to_dict() +# create an instance of AuthUser from a dict +auth_user_from_dict = AuthUser.from_dict(auth_user_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/sdk/python/src/docs/ChangePasswordRequest.md b/sdk/python/src/docs/ChangePasswordRequest.md new file mode 100644 index 00000000..5fea099e --- /dev/null +++ b/sdk/python/src/docs/ChangePasswordRequest.md @@ -0,0 +1,31 @@ +# ChangePasswordRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**old_password** | **str** | | [optional] +**new_password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.change_password_request import ChangePasswordRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ChangePasswordRequest from a JSON string +change_password_request_instance = ChangePasswordRequest.from_json(json) +# print the JSON string representation of the object +print(ChangePasswordRequest.to_json()) + +# convert the object into a dict +change_password_request_dict = change_password_request_instance.to_dict() +# create an instance of ChangePasswordRequest from a dict +change_password_request_from_dict = ChangePasswordRequest.from_dict(change_password_request_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/sdk/python/src/docs/ClientVersionCheckRequest.md b/sdk/python/src/docs/ClientVersionCheckRequest.md new file mode 100644 index 00000000..53d9e16e --- /dev/null +++ b/sdk/python/src/docs/ClientVersionCheckRequest.md @@ -0,0 +1,29 @@ +# ClientVersionCheckRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_version** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ClientVersionCheckRequest from a JSON string +client_version_check_request_instance = ClientVersionCheckRequest.from_json(json) +# print the JSON string representation of the object +print(ClientVersionCheckRequest.to_json()) + +# convert the object into a dict +client_version_check_request_dict = client_version_check_request_instance.to_dict() +# create an instance of ClientVersionCheckRequest from a dict +client_version_check_request_from_dict = ClientVersionCheckRequest.from_dict(client_version_check_request_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/sdk/python/src/docs/Configuration.md b/sdk/python/src/docs/Configuration.md new file mode 100644 index 00000000..07eec945 --- /dev/null +++ b/sdk/python/src/docs/Configuration.md @@ -0,0 +1,33 @@ +# Configuration + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **str** | | [optional] +**tou_link** | **str** | | [optional] +**invites_open** | **bool** | | [optional] +**requires_invite_token** | **bool** | | [optional] +**invite_token_contact** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.configuration import Configuration + +# TODO update the JSON string below +json = "{}" +# create an instance of Configuration from a JSON string +configuration_instance = Configuration.from_json(json) +# print the JSON string representation of the object +print(Configuration.to_json()) + +# convert the object into a dict +configuration_dict = configuration_instance.to_dict() +# create an instance of Configuration from a dict +configuration_from_dict = Configuration.from_dict(configuration_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/sdk/python/src/docs/CreateFrontend201Response.md b/sdk/python/src/docs/CreateFrontend201Response.md new file mode 100644 index 00000000..7239add1 --- /dev/null +++ b/sdk/python/src/docs/CreateFrontend201Response.md @@ -0,0 +1,29 @@ +# CreateFrontend201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_frontend201_response import CreateFrontend201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFrontend201Response from a JSON string +create_frontend201_response_instance = CreateFrontend201Response.from_json(json) +# print the JSON string representation of the object +print(CreateFrontend201Response.to_json()) + +# convert the object into a dict +create_frontend201_response_dict = create_frontend201_response_instance.to_dict() +# create an instance of CreateFrontend201Response from a dict +create_frontend201_response_from_dict = CreateFrontend201Response.from_dict(create_frontend201_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/sdk/python/src/docs/CreateFrontendRequest.md b/sdk/python/src/docs/CreateFrontendRequest.md new file mode 100644 index 00000000..63fe8779 --- /dev/null +++ b/sdk/python/src/docs/CreateFrontendRequest.md @@ -0,0 +1,32 @@ +# CreateFrontendRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**z_id** | **str** | | [optional] +**url_template** | **str** | | [optional] +**public_name** | **str** | | [optional] +**permission_mode** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_frontend_request import CreateFrontendRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFrontendRequest from a JSON string +create_frontend_request_instance = CreateFrontendRequest.from_json(json) +# print the JSON string representation of the object +print(CreateFrontendRequest.to_json()) + +# convert the object into a dict +create_frontend_request_dict = create_frontend_request_instance.to_dict() +# create an instance of CreateFrontendRequest from a dict +create_frontend_request_from_dict = CreateFrontendRequest.from_dict(create_frontend_request_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/sdk/python/src/docs/CreateIdentity201Response.md b/sdk/python/src/docs/CreateIdentity201Response.md new file mode 100644 index 00000000..245275e2 --- /dev/null +++ b/sdk/python/src/docs/CreateIdentity201Response.md @@ -0,0 +1,30 @@ +# CreateIdentity201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity** | **str** | | [optional] +**cfg** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_identity201_response import CreateIdentity201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateIdentity201Response from a JSON string +create_identity201_response_instance = CreateIdentity201Response.from_json(json) +# print the JSON string representation of the object +print(CreateIdentity201Response.to_json()) + +# convert the object into a dict +create_identity201_response_dict = create_identity201_response_instance.to_dict() +# create an instance of CreateIdentity201Response from a dict +create_identity201_response_from_dict = CreateIdentity201Response.from_dict(create_identity201_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/sdk/python/src/docs/CreateIdentityRequest.md b/sdk/python/src/docs/CreateIdentityRequest.md new file mode 100644 index 00000000..50cb9457 --- /dev/null +++ b/sdk/python/src/docs/CreateIdentityRequest.md @@ -0,0 +1,29 @@ +# CreateIdentityRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_identity_request import CreateIdentityRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateIdentityRequest from a JSON string +create_identity_request_instance = CreateIdentityRequest.from_json(json) +# print the JSON string representation of the object +print(CreateIdentityRequest.to_json()) + +# convert the object into a dict +create_identity_request_dict = create_identity_request_instance.to_dict() +# create an instance of CreateIdentityRequest from a dict +create_identity_request_from_dict = CreateIdentityRequest.from_dict(create_identity_request_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/sdk/python/src/docs/CreateOrganization201Response.md b/sdk/python/src/docs/CreateOrganization201Response.md new file mode 100644 index 00000000..26bc640c --- /dev/null +++ b/sdk/python/src/docs/CreateOrganization201Response.md @@ -0,0 +1,29 @@ +# CreateOrganization201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_organization201_response import CreateOrganization201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOrganization201Response from a JSON string +create_organization201_response_instance = CreateOrganization201Response.from_json(json) +# print the JSON string representation of the object +print(CreateOrganization201Response.to_json()) + +# convert the object into a dict +create_organization201_response_dict = create_organization201_response_instance.to_dict() +# create an instance of CreateOrganization201Response from a dict +create_organization201_response_from_dict = CreateOrganization201Response.from_dict(create_organization201_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/sdk/python/src/docs/CreateOrganizationRequest.md b/sdk/python/src/docs/CreateOrganizationRequest.md new file mode 100644 index 00000000..458e339b --- /dev/null +++ b/sdk/python/src/docs/CreateOrganizationRequest.md @@ -0,0 +1,29 @@ +# CreateOrganizationRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_organization_request import CreateOrganizationRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOrganizationRequest from a JSON string +create_organization_request_instance = CreateOrganizationRequest.from_json(json) +# print the JSON string representation of the object +print(CreateOrganizationRequest.to_json()) + +# convert the object into a dict +create_organization_request_dict = create_organization_request_instance.to_dict() +# create an instance of CreateOrganizationRequest from a dict +create_organization_request_from_dict = CreateOrganizationRequest.from_dict(create_organization_request_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/sdk/python/src/docs/DisableRequest.md b/sdk/python/src/docs/DisableRequest.md new file mode 100644 index 00000000..4e4490f1 --- /dev/null +++ b/sdk/python/src/docs/DisableRequest.md @@ -0,0 +1,29 @@ +# DisableRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.disable_request import DisableRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DisableRequest from a JSON string +disable_request_instance = DisableRequest.from_json(json) +# print the JSON string representation of the object +print(DisableRequest.to_json()) + +# convert the object into a dict +disable_request_dict = disable_request_instance.to_dict() +# create an instance of DisableRequest from a dict +disable_request_from_dict = DisableRequest.from_dict(disable_request_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/sdk/python/src/docs/EnableRequest.md b/sdk/python/src/docs/EnableRequest.md new file mode 100644 index 00000000..7720b3b9 --- /dev/null +++ b/sdk/python/src/docs/EnableRequest.md @@ -0,0 +1,30 @@ +# EnableRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**host** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.enable_request import EnableRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of EnableRequest from a JSON string +enable_request_instance = EnableRequest.from_json(json) +# print the JSON string representation of the object +print(EnableRequest.to_json()) + +# convert the object into a dict +enable_request_dict = enable_request_instance.to_dict() +# create an instance of EnableRequest from a dict +enable_request_from_dict = EnableRequest.from_dict(enable_request_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/sdk/python/src/docs/Environment.md b/sdk/python/src/docs/Environment.md new file mode 100644 index 00000000..44a9356b --- /dev/null +++ b/sdk/python/src/docs/Environment.md @@ -0,0 +1,36 @@ +# Environment + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**host** | **str** | | [optional] +**address** | **str** | | [optional] +**z_id** | **str** | | [optional] +**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] +**limited** | **bool** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +## Example + +```python +from zrok_api.models.environment import Environment + +# TODO update the JSON string below +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()) + +# convert the object into a dict +environment_dict = environment_instance.to_dict() +# create an instance of Environment from a dict +environment_from_dict = Environment.from_dict(environment_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/sdk/python/src/docs/EnvironmentAndResources.md b/sdk/python/src/docs/EnvironmentAndResources.md new file mode 100644 index 00000000..a218ae3c --- /dev/null +++ b/sdk/python/src/docs/EnvironmentAndResources.md @@ -0,0 +1,31 @@ +# EnvironmentAndResources + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**environment** | [**Environment**](Environment.md) | | [optional] +**frontends** | [**List[Frontend]**](Frontend.md) | | [optional] +**shares** | [**List[Share]**](Share.md) | | [optional] + +## Example + +```python +from zrok_api.models.environment_and_resources import EnvironmentAndResources + +# TODO update the JSON string below +json = "{}" +# create an instance of EnvironmentAndResources from a JSON string +environment_and_resources_instance = EnvironmentAndResources.from_json(json) +# print the JSON string representation of the object +print(EnvironmentAndResources.to_json()) + +# convert the object into a dict +environment_and_resources_dict = environment_and_resources_instance.to_dict() +# create an instance of EnvironmentAndResources from a dict +environment_and_resources_from_dict = EnvironmentAndResources.from_dict(environment_and_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/sdk/python/src/docs/EnvironmentApi.md b/sdk/python/src/docs/EnvironmentApi.md new file mode 100644 index 00000000..a50ae1d3 --- /dev/null +++ b/sdk/python/src/docs/EnvironmentApi.md @@ -0,0 +1,162 @@ +# zrok_api.EnvironmentApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**disable**](EnvironmentApi.md#disable) | **POST** /disable | +[**enable**](EnvironmentApi.md#enable) | **POST** /enable | + + +# **disable** +> disable(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.disable_request import DisableRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.EnvironmentApi(api_client) + body = zrok_api.DisableRequest() # DisableRequest | (optional) + + try: + api_instance.disable(body=body) + except Exception as e: + print("Exception when calling EnvironmentApi->disable: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**DisableRequest**](DisableRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | environment disabled | - | +**401** | invalid environment | - | +**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) + +# **enable** +> CreateIdentity201Response enable(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.enable_request import EnableRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.EnvironmentApi(api_client) + body = zrok_api.EnableRequest() # EnableRequest | (optional) + + try: + api_response = api_instance.enable(body=body) + print("The response of EnvironmentApi->enable:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvironmentApi->enable: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**EnableRequest**](EnableRequest.md)| | [optional] + +### Return type + +[**CreateIdentity201Response**](CreateIdentity201Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | environment enabled | - | +**401** | unauthorized | - | +**404** | account 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/sdk/python/src/docs/Frontend.md b/sdk/python/src/docs/Frontend.md new file mode 100644 index 00000000..ce41a9b7 --- /dev/null +++ b/sdk/python/src/docs/Frontend.md @@ -0,0 +1,37 @@ +# Frontend + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**frontend_token** | **str** | | [optional] +**share_token** | **str** | | [optional] +**backend_mode** | **str** | | [optional] +**bind_address** | **str** | | [optional] +**description** | **str** | | [optional] +**z_id** | **str** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +## Example + +```python +from zrok_api.models.frontend import Frontend + +# TODO update the JSON string below +json = "{}" +# create an instance of Frontend from a JSON string +frontend_instance = Frontend.from_json(json) +# print the JSON string representation of the object +print(Frontend.to_json()) + +# convert the object into a dict +frontend_dict = frontend_instance.to_dict() +# create an instance of Frontend from a dict +frontend_from_dict = Frontend.from_dict(frontend_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/sdk/python/src/docs/GetSparklines200Response.md b/sdk/python/src/docs/GetSparklines200Response.md new file mode 100644 index 00000000..66528c7e --- /dev/null +++ b/sdk/python/src/docs/GetSparklines200Response.md @@ -0,0 +1,29 @@ +# GetSparklines200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sparklines** | [**List[Metrics]**](Metrics.md) | | [optional] + +## Example + +```python +from zrok_api.models.get_sparklines200_response import GetSparklines200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetSparklines200Response from a JSON string +get_sparklines200_response_instance = GetSparklines200Response.from_json(json) +# print the JSON string representation of the object +print(GetSparklines200Response.to_json()) + +# convert the object into a dict +get_sparklines200_response_dict = get_sparklines200_response_instance.to_dict() +# create an instance of GetSparklines200Response from a dict +get_sparklines200_response_from_dict = GetSparklines200Response.from_dict(get_sparklines200_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/sdk/python/src/docs/GetSparklinesRequest.md b/sdk/python/src/docs/GetSparklinesRequest.md new file mode 100644 index 00000000..29369ebc --- /dev/null +++ b/sdk/python/src/docs/GetSparklinesRequest.md @@ -0,0 +1,31 @@ +# GetSparklinesRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account** | **bool** | | [optional] +**environments** | **List[str]** | | [optional] +**shares** | **List[str]** | | [optional] + +## Example + +```python +from zrok_api.models.get_sparklines_request import GetSparklinesRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of GetSparklinesRequest from a JSON string +get_sparklines_request_instance = GetSparklinesRequest.from_json(json) +# print the JSON string representation of the object +print(GetSparklinesRequest.to_json()) + +# convert the object into a dict +get_sparklines_request_dict = get_sparklines_request_instance.to_dict() +# create an instance of GetSparklinesRequest from a dict +get_sparklines_request_from_dict = GetSparklinesRequest.from_dict(get_sparklines_request_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/sdk/python/src/docs/InviteRequest.md b/sdk/python/src/docs/InviteRequest.md new file mode 100644 index 00000000..039132e8 --- /dev/null +++ b/sdk/python/src/docs/InviteRequest.md @@ -0,0 +1,30 @@ +# InviteRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**invite_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.invite_request import InviteRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteRequest from a JSON string +invite_request_instance = InviteRequest.from_json(json) +# print the JSON string representation of the object +print(InviteRequest.to_json()) + +# convert the object into a dict +invite_request_dict = invite_request_instance.to_dict() +# create an instance of InviteRequest from a dict +invite_request_from_dict = InviteRequest.from_dict(invite_request_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/sdk/python/src/docs/InviteTokenGenerateRequest.md b/sdk/python/src/docs/InviteTokenGenerateRequest.md new file mode 100644 index 00000000..33a20d70 --- /dev/null +++ b/sdk/python/src/docs/InviteTokenGenerateRequest.md @@ -0,0 +1,29 @@ +# InviteTokenGenerateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_tokens** | **List[str]** | | [optional] + +## Example + +```python +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteTokenGenerateRequest from a JSON string +invite_token_generate_request_instance = InviteTokenGenerateRequest.from_json(json) +# print the JSON string representation of the object +print(InviteTokenGenerateRequest.to_json()) + +# convert the object into a dict +invite_token_generate_request_dict = invite_token_generate_request_instance.to_dict() +# create an instance of InviteTokenGenerateRequest from a dict +invite_token_generate_request_from_dict = InviteTokenGenerateRequest.from_dict(invite_token_generate_request_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/sdk/python/src/docs/ListFrontends200ResponseInner.md b/sdk/python/src/docs/ListFrontends200ResponseInner.md new file mode 100644 index 00000000..625ea343 --- /dev/null +++ b/sdk/python/src/docs/ListFrontends200ResponseInner.md @@ -0,0 +1,34 @@ +# ListFrontends200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**z_id** | **str** | | [optional] +**url_template** | **str** | | [optional] +**public_name** | **str** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +## Example + +```python +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListFrontends200ResponseInner from a JSON string +list_frontends200_response_inner_instance = ListFrontends200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ListFrontends200ResponseInner.to_json()) + +# convert the object into a dict +list_frontends200_response_inner_dict = list_frontends200_response_inner_instance.to_dict() +# create an instance of ListFrontends200ResponseInner from a dict +list_frontends200_response_inner_from_dict = ListFrontends200ResponseInner.from_dict(list_frontends200_response_inner_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/sdk/python/src/docs/ListMemberships200Response.md b/sdk/python/src/docs/ListMemberships200Response.md new file mode 100644 index 00000000..48e19dbf --- /dev/null +++ b/sdk/python/src/docs/ListMemberships200Response.md @@ -0,0 +1,29 @@ +# ListMemberships200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memberships** | [**List[ListMemberships200ResponseMembershipsInner]**](ListMemberships200ResponseMembershipsInner.md) | | [optional] + +## Example + +```python +from zrok_api.models.list_memberships200_response import ListMemberships200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ListMemberships200Response from a JSON string +list_memberships200_response_instance = ListMemberships200Response.from_json(json) +# print the JSON string representation of the object +print(ListMemberships200Response.to_json()) + +# convert the object into a dict +list_memberships200_response_dict = list_memberships200_response_instance.to_dict() +# create an instance of ListMemberships200Response from a dict +list_memberships200_response_from_dict = ListMemberships200Response.from_dict(list_memberships200_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/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md b/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md new file mode 100644 index 00000000..e85c7440 --- /dev/null +++ b/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md @@ -0,0 +1,31 @@ +# ListMemberships200ResponseMembershipsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**description** | **str** | | [optional] +**admin** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListMemberships200ResponseMembershipsInner from a JSON string +list_memberships200_response_memberships_inner_instance = ListMemberships200ResponseMembershipsInner.from_json(json) +# print the JSON string representation of the object +print(ListMemberships200ResponseMembershipsInner.to_json()) + +# convert the object into a dict +list_memberships200_response_memberships_inner_dict = list_memberships200_response_memberships_inner_instance.to_dict() +# create an instance of ListMemberships200ResponseMembershipsInner from a dict +list_memberships200_response_memberships_inner_from_dict = ListMemberships200ResponseMembershipsInner.from_dict(list_memberships200_response_memberships_inner_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/sdk/python/src/docs/ListOrganizationMembers200Response.md b/sdk/python/src/docs/ListOrganizationMembers200Response.md new file mode 100644 index 00000000..e05a28bf --- /dev/null +++ b/sdk/python/src/docs/ListOrganizationMembers200Response.md @@ -0,0 +1,29 @@ +# ListOrganizationMembers200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | [**List[ListOrganizationMembers200ResponseMembersInner]**](ListOrganizationMembers200ResponseMembersInner.md) | | [optional] + +## Example + +```python +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizationMembers200Response from a JSON string +list_organization_members200_response_instance = ListOrganizationMembers200Response.from_json(json) +# print the JSON string representation of the object +print(ListOrganizationMembers200Response.to_json()) + +# convert the object into a dict +list_organization_members200_response_dict = list_organization_members200_response_instance.to_dict() +# create an instance of ListOrganizationMembers200Response from a dict +list_organization_members200_response_from_dict = ListOrganizationMembers200Response.from_dict(list_organization_members200_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/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md b/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md new file mode 100644 index 00000000..8ebbb35e --- /dev/null +++ b/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md @@ -0,0 +1,30 @@ +# ListOrganizationMembers200ResponseMembersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**admin** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizationMembers200ResponseMembersInner from a JSON string +list_organization_members200_response_members_inner_instance = ListOrganizationMembers200ResponseMembersInner.from_json(json) +# print the JSON string representation of the object +print(ListOrganizationMembers200ResponseMembersInner.to_json()) + +# convert the object into a dict +list_organization_members200_response_members_inner_dict = list_organization_members200_response_members_inner_instance.to_dict() +# create an instance of ListOrganizationMembers200ResponseMembersInner from a dict +list_organization_members200_response_members_inner_from_dict = ListOrganizationMembers200ResponseMembersInner.from_dict(list_organization_members200_response_members_inner_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/sdk/python/src/docs/ListOrganizations200Response.md b/sdk/python/src/docs/ListOrganizations200Response.md new file mode 100644 index 00000000..46fe4d60 --- /dev/null +++ b/sdk/python/src/docs/ListOrganizations200Response.md @@ -0,0 +1,29 @@ +# ListOrganizations200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organizations** | [**List[ListOrganizations200ResponseOrganizationsInner]**](ListOrganizations200ResponseOrganizationsInner.md) | | [optional] + +## Example + +```python +from zrok_api.models.list_organizations200_response import ListOrganizations200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizations200Response from a JSON string +list_organizations200_response_instance = ListOrganizations200Response.from_json(json) +# print the JSON string representation of the object +print(ListOrganizations200Response.to_json()) + +# convert the object into a dict +list_organizations200_response_dict = list_organizations200_response_instance.to_dict() +# create an instance of ListOrganizations200Response from a dict +list_organizations200_response_from_dict = ListOrganizations200Response.from_dict(list_organizations200_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/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md b/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md new file mode 100644 index 00000000..468447f2 --- /dev/null +++ b/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md @@ -0,0 +1,30 @@ +# ListOrganizations200ResponseOrganizationsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizations200ResponseOrganizationsInner from a JSON string +list_organizations200_response_organizations_inner_instance = ListOrganizations200ResponseOrganizationsInner.from_json(json) +# print the JSON string representation of the object +print(ListOrganizations200ResponseOrganizationsInner.to_json()) + +# convert the object into a dict +list_organizations200_response_organizations_inner_dict = list_organizations200_response_organizations_inner_instance.to_dict() +# create an instance of ListOrganizations200ResponseOrganizationsInner from a dict +list_organizations200_response_organizations_inner_from_dict = ListOrganizations200ResponseOrganizationsInner.from_dict(list_organizations200_response_organizations_inner_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/sdk/python/src/docs/LoginRequest.md b/sdk/python/src/docs/LoginRequest.md new file mode 100644 index 00000000..05728618 --- /dev/null +++ b/sdk/python/src/docs/LoginRequest.md @@ -0,0 +1,30 @@ +# LoginRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.login_request import LoginRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginRequest from a JSON string +login_request_instance = LoginRequest.from_json(json) +# print the JSON string representation of the object +print(LoginRequest.to_json()) + +# convert the object into a dict +login_request_dict = login_request_instance.to_dict() +# create an instance of LoginRequest from a dict +login_request_from_dict = LoginRequest.from_dict(login_request_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/sdk/python/src/docs/MetadataApi.md b/sdk/python/src/docs/MetadataApi.md new file mode 100644 index 00000000..ecb0cf8b --- /dev/null +++ b/sdk/python/src/docs/MetadataApi.md @@ -0,0 +1,1171 @@ +# zrok_api.MetadataApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**client_version_check**](MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | +[**configuration**](MetadataApi.md#configuration) | **GET** /configuration | +[**get_account_detail**](MetadataApi.md#get_account_detail) | **GET** /detail/account | +[**get_account_metrics**](MetadataApi.md#get_account_metrics) | **GET** /metrics/account | +[**get_environment_detail**](MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | +[**get_environment_metrics**](MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | +[**get_frontend_detail**](MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | +[**get_share_detail**](MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | +[**get_share_metrics**](MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | +[**get_sparklines**](MetadataApi.md#get_sparklines) | **POST** /sparklines | +[**list_memberships**](MetadataApi.md#list_memberships) | **GET** /memberships | +[**list_org_members**](MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | +[**org_account_overview**](MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | +[**overview**](MetadataApi.md#overview) | **GET** /overview | +[**version**](MetadataApi.md#version) | **GET** /version | +[**version_inventory**](MetadataApi.md#version_inventory) | **GET** /versions | + + +# **client_version_check** +> client_version_check(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + body = zrok_api.ClientVersionCheckRequest() # ClientVersionCheckRequest | (optional) + + try: + api_instance.client_version_check(body=body) + except Exception as e: + print("Exception when calling MetadataApi->client_version_check: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ClientVersionCheckRequest**](ClientVersionCheckRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | compatible | - | +**400** | not compatible | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **configuration** +> Configuration configuration() + +### Example + + +```python +import zrok_api +from zrok_api.models.configuration import Configuration +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.configuration() + print("The response of MetadataApi->configuration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->configuration: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Configuration**](Configuration.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | current configuration | - | + +[[Back to top]](#) [[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_account_detail** +> List[Environment] get_account_detail() + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.environment import Environment +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.get_account_detail() + print("The response of MetadataApi->get_account_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_account_detail: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[Environment]**](Environment.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_account_metrics** +> Metrics get_account_metrics(duration=duration) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.metrics import Metrics +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + duration = 'duration_example' # str | (optional) + + try: + api_response = api_instance.get_account_metrics(duration=duration) + print("The response of MetadataApi->get_account_metrics:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **duration** | **str**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | account metrics | - | +**400** | bad request | - | +**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_environment_detail** +> EnvironmentAndResources get_environment_detail(env_zid) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + env_zid = 'env_zid_example' # str | + + try: + api_response = api_instance.get_environment_detail(env_zid) + print("The response of MetadataApi->get_environment_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_zid** | **str**| | + +### Return type + +[**EnvironmentAndResources**](EnvironmentAndResources.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_environment_metrics** +> Metrics get_environment_metrics(env_id, duration=duration) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.metrics import Metrics +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + env_id = 'env_id_example' # str | + duration = 'duration_example' # str | (optional) + + try: + api_response = api_instance.get_environment_metrics(env_id, duration=duration) + print("The response of MetadataApi->get_environment_metrics:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **str**| | + **duration** | **str**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | environment metrics | - | +**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) + +# **get_frontend_detail** +> Frontend get_frontend_detail(frontend_id) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.frontend import Frontend +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + frontend_id = 56 # int | + + try: + api_response = api_instance.get_frontend_detail(frontend_id) + print("The response of MetadataApi->get_frontend_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **frontend_id** | **int**| | + +### Return type + +[**Frontend**](Frontend.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_share_detail** +> Share get_share_detail(share_token) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.share import Share +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + share_token = 'share_token_example' # str | + + try: + api_response = api_instance.get_share_detail(share_token) + print("The response of MetadataApi->get_share_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_share_detail: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **share_token** | **str**| | + +### Return type + +[**Share**](Share.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_share_metrics** +> Metrics get_share_metrics(share_token, duration=duration) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.metrics import Metrics +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + share_token = 'share_token_example' # str | + duration = 'duration_example' # str | (optional) + + try: + api_response = api_instance.get_share_metrics(share_token, duration=duration) + print("The response of MetadataApi->get_share_metrics:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **share_token** | **str**| | + **duration** | **str**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | share metrics | - | +**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) + +# **get_sparklines** +> GetSparklines200Response get_sparklines(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + body = zrok_api.GetSparklinesRequest() # GetSparklinesRequest | (optional) + + try: + api_response = api_instance.get_sparklines(body=body) + print("The response of MetadataApi->get_sparklines:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_sparklines: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GetSparklinesRequest**](GetSparklinesRequest.md)| | [optional] + +### Return type + +[**GetSparklines200Response**](GetSparklines200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | sparklines data | - | +**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) + +# **list_memberships** +> ListMemberships200Response list_memberships() + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.list_memberships200_response import ListMemberships200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.list_memberships() + print("The response of MetadataApi->list_memberships:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->list_memberships: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ListMemberships200Response**](ListMemberships200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_org_members** +> ListOrganizationMembers200Response list_org_members(organization_token) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + organization_token = 'organization_token_example' # str | + + try: + api_response = api_instance.list_org_members(organization_token) + print("The response of MetadataApi->list_org_members:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->list_org_members: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization_token** | **str**| | + +### Return type + +[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) + +# **org_account_overview** +> Overview org_account_overview(organization_token, account_email) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.overview import Overview +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + organization_token = 'organization_token_example' # str | + account_email = 'account_email_example' # str | + + try: + api_response = api_instance.org_account_overview(organization_token, account_email) + print("The response of MetadataApi->org_account_overview:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->org_account_overview: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization_token** | **str**| | + **account_email** | **str**| | + +### Return type + +[**Overview**](Overview.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) + +# **overview** +> Overview overview() + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.overview import Overview +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.overview() + print("The response of MetadataApi->overview:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->overview: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Overview**](Overview.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | overview returned | - | +**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) + +# **version** +> str version() + +### Example + + +```python +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.version() + print("The response of MetadataApi->version:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->version: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**str** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | legacy upgrade required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **version_inventory** +> VersionInventory200Response version_inventory() + +### Example + + +```python +import zrok_api +from zrok_api.models.version_inventory200_response import VersionInventory200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.version_inventory() + print("The response of MetadataApi->version_inventory:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->version_inventory: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**VersionInventory200Response**](VersionInventory200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | + +[[Back to top]](#) [[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/sdk/python/src/docs/Metrics.md b/sdk/python/src/docs/Metrics.md new file mode 100644 index 00000000..9216f700 --- /dev/null +++ b/sdk/python/src/docs/Metrics.md @@ -0,0 +1,32 @@ +# Metrics + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **str** | | [optional] +**id** | **str** | | [optional] +**period** | **float** | | [optional] +**samples** | [**List[MetricsSample]**](MetricsSample.md) | | [optional] + +## Example + +```python +from zrok_api.models.metrics import Metrics + +# TODO update the JSON string below +json = "{}" +# create an instance of Metrics from a JSON string +metrics_instance = Metrics.from_json(json) +# print the JSON string representation of the object +print(Metrics.to_json()) + +# convert the object into a dict +metrics_dict = metrics_instance.to_dict() +# create an instance of Metrics from a dict +metrics_from_dict = Metrics.from_dict(metrics_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/sdk/python/src/docs/MetricsSample.md b/sdk/python/src/docs/MetricsSample.md new file mode 100644 index 00000000..96c1d94e --- /dev/null +++ b/sdk/python/src/docs/MetricsSample.md @@ -0,0 +1,31 @@ +# MetricsSample + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rx** | **float** | | [optional] +**tx** | **float** | | [optional] +**timestamp** | **float** | | [optional] + +## Example + +```python +from zrok_api.models.metrics_sample import MetricsSample + +# TODO update the JSON string below +json = "{}" +# create an instance of MetricsSample from a JSON string +metrics_sample_instance = MetricsSample.from_json(json) +# print the JSON string representation of the object +print(MetricsSample.to_json()) + +# convert the object into a dict +metrics_sample_dict = metrics_sample_instance.to_dict() +# create an instance of MetricsSample from a dict +metrics_sample_from_dict = MetricsSample.from_dict(metrics_sample_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/sdk/python/src/docs/Overview.md b/sdk/python/src/docs/Overview.md new file mode 100644 index 00000000..f50d6232 --- /dev/null +++ b/sdk/python/src/docs/Overview.md @@ -0,0 +1,30 @@ +# Overview + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_limited** | **bool** | | [optional] +**environments** | [**List[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional] + +## Example + +```python +from zrok_api.models.overview import Overview + +# TODO update the JSON string below +json = "{}" +# create an instance of Overview from a JSON string +overview_instance = Overview.from_json(json) +# print the JSON string representation of the object +print(Overview.to_json()) + +# convert the object into a dict +overview_dict = overview_instance.to_dict() +# create an instance of Overview from a dict +overview_from_dict = Overview.from_dict(overview_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/sdk/python/src/docs/Principal.md b/sdk/python/src/docs/Principal.md new file mode 100644 index 00000000..0a6d399c --- /dev/null +++ b/sdk/python/src/docs/Principal.md @@ -0,0 +1,33 @@ +# Principal + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**email** | **str** | | [optional] +**token** | **str** | | [optional] +**limitless** | **bool** | | [optional] +**admin** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.principal import Principal + +# TODO update the JSON string below +json = "{}" +# create an instance of Principal from a JSON string +principal_instance = Principal.from_json(json) +# print the JSON string representation of the object +print(Principal.to_json()) + +# convert the object into a dict +principal_dict = principal_instance.to_dict() +# create an instance of Principal from a dict +principal_from_dict = Principal.from_dict(principal_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/sdk/python/src/docs/RegenerateAccountToken200Response.md b/sdk/python/src/docs/RegenerateAccountToken200Response.md new file mode 100644 index 00000000..e86cc294 --- /dev/null +++ b/sdk/python/src/docs/RegenerateAccountToken200Response.md @@ -0,0 +1,29 @@ +# RegenerateAccountToken200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of RegenerateAccountToken200Response from a JSON string +regenerate_account_token200_response_instance = RegenerateAccountToken200Response.from_json(json) +# print the JSON string representation of the object +print(RegenerateAccountToken200Response.to_json()) + +# convert the object into a dict +regenerate_account_token200_response_dict = regenerate_account_token200_response_instance.to_dict() +# create an instance of RegenerateAccountToken200Response from a dict +regenerate_account_token200_response_from_dict = RegenerateAccountToken200Response.from_dict(regenerate_account_token200_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/sdk/python/src/docs/RegenerateAccountTokenRequest.md b/sdk/python/src/docs/RegenerateAccountTokenRequest.md new file mode 100644 index 00000000..113262a6 --- /dev/null +++ b/sdk/python/src/docs/RegenerateAccountTokenRequest.md @@ -0,0 +1,29 @@ +# RegenerateAccountTokenRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_address** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RegenerateAccountTokenRequest from a JSON string +regenerate_account_token_request_instance = RegenerateAccountTokenRequest.from_json(json) +# print the JSON string representation of the object +print(RegenerateAccountTokenRequest.to_json()) + +# convert the object into a dict +regenerate_account_token_request_dict = regenerate_account_token_request_instance.to_dict() +# create an instance of RegenerateAccountTokenRequest from a dict +regenerate_account_token_request_from_dict = RegenerateAccountTokenRequest.from_dict(regenerate_account_token_request_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/sdk/python/src/docs/RegisterRequest.md b/sdk/python/src/docs/RegisterRequest.md new file mode 100644 index 00000000..6e268aff --- /dev/null +++ b/sdk/python/src/docs/RegisterRequest.md @@ -0,0 +1,30 @@ +# RegisterRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**register_token** | **str** | | [optional] +**password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.register_request import RegisterRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RegisterRequest from a JSON string +register_request_instance = RegisterRequest.from_json(json) +# print the JSON string representation of the object +print(RegisterRequest.to_json()) + +# convert the object into a dict +register_request_dict = register_request_instance.to_dict() +# create an instance of RegisterRequest from a dict +register_request_from_dict = RegisterRequest.from_dict(register_request_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/sdk/python/src/docs/RemoveOrganizationMemberRequest.md b/sdk/python/src/docs/RemoveOrganizationMemberRequest.md new file mode 100644 index 00000000..75743291 --- /dev/null +++ b/sdk/python/src/docs/RemoveOrganizationMemberRequest.md @@ -0,0 +1,30 @@ +# RemoveOrganizationMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**email** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RemoveOrganizationMemberRequest from a JSON string +remove_organization_member_request_instance = RemoveOrganizationMemberRequest.from_json(json) +# print the JSON string representation of the object +print(RemoveOrganizationMemberRequest.to_json()) + +# convert the object into a dict +remove_organization_member_request_dict = remove_organization_member_request_instance.to_dict() +# create an instance of RemoveOrganizationMemberRequest from a dict +remove_organization_member_request_from_dict = RemoveOrganizationMemberRequest.from_dict(remove_organization_member_request_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/sdk/python/src/docs/ResetPasswordRequest.md b/sdk/python/src/docs/ResetPasswordRequest.md new file mode 100644 index 00000000..e91e841a --- /dev/null +++ b/sdk/python/src/docs/ResetPasswordRequest.md @@ -0,0 +1,30 @@ +# ResetPasswordRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reset_token** | **str** | | [optional] +**password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.reset_password_request import ResetPasswordRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ResetPasswordRequest from a JSON string +reset_password_request_instance = ResetPasswordRequest.from_json(json) +# print the JSON string representation of the object +print(ResetPasswordRequest.to_json()) + +# convert the object into a dict +reset_password_request_dict = reset_password_request_instance.to_dict() +# create an instance of ResetPasswordRequest from a dict +reset_password_request_from_dict = ResetPasswordRequest.from_dict(reset_password_request_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/sdk/python/src/docs/Share.md b/sdk/python/src/docs/Share.md new file mode 100644 index 00000000..4fbfc430 --- /dev/null +++ b/sdk/python/src/docs/Share.md @@ -0,0 +1,40 @@ +# Share + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**share_token** | **str** | | [optional] +**z_id** | **str** | | [optional] +**share_mode** | **str** | | [optional] +**backend_mode** | **str** | | [optional] +**frontend_selection** | **str** | | [optional] +**frontend_endpoint** | **str** | | [optional] +**backend_proxy_endpoint** | **str** | | [optional] +**reserved** | **bool** | | [optional] +**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] +**limited** | **bool** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +## Example + +```python +from zrok_api.models.share import Share + +# TODO update the JSON string below +json = "{}" +# create an instance of Share from a JSON string +share_instance = Share.from_json(json) +# print the JSON string representation of the object +print(Share.to_json()) + +# convert the object into a dict +share_dict = share_instance.to_dict() +# create an instance of Share from a dict +share_from_dict = Share.from_dict(share_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/sdk/python/src/docs/ShareApi.md b/sdk/python/src/docs/ShareApi.md new file mode 100644 index 00000000..2831f1d2 --- /dev/null +++ b/sdk/python/src/docs/ShareApi.md @@ -0,0 +1,473 @@ +# zrok_api.ShareApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**access**](ShareApi.md#access) | **POST** /access | +[**share**](ShareApi.md#share) | **POST** /share | +[**unaccess**](ShareApi.md#unaccess) | **DELETE** /unaccess | +[**unshare**](ShareApi.md#unshare) | **DELETE** /unshare | +[**update_access**](ShareApi.md#update_access) | **PATCH** /access | +[**update_share**](ShareApi.md#update_share) | **PATCH** /share | + + +# **access** +> Access201Response access(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.AccessRequest() # AccessRequest | (optional) + + try: + api_response = api_instance.access(body=body) + print("The response of ShareApi->access:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ShareApi->access: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**AccessRequest**](AccessRequest.md)| | [optional] + +### Return type + +[**Access201Response**](Access201Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | access created | - | +**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) + +# **share** +> ShareResponse share(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.share_response import ShareResponse +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.ShareRequest() # ShareRequest | (optional) + + try: + api_response = api_instance.share(body=body) + print("The response of ShareApi->share:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ShareApi->share: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ShareRequest**](ShareRequest.md)| | [optional] + +### Return type + +[**ShareResponse**](ShareResponse.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | share created | - | +**401** | unauthorized | - | +**404** | not found | - | +**409** | conflict | - | +**422** | unprocessable | - | +**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) + +# **unaccess** +> unaccess(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UnaccessRequest() # UnaccessRequest | (optional) + + try: + api_instance.unaccess(body=body) + except Exception as e: + print("Exception when calling ShareApi->unaccess: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UnaccessRequest**](UnaccessRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | access removed | - | +**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) + +# **unshare** +> unshare(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.unshare_request import UnshareRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UnshareRequest() # UnshareRequest | (optional) + + try: + api_instance.unshare(body=body) + except Exception as e: + print("Exception when calling ShareApi->unshare: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UnshareRequest**](UnshareRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | share removed | - | +**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_access** +> update_access(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.update_access_request import UpdateAccessRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UpdateAccessRequest() # UpdateAccessRequest | (optional) + + try: + api_instance.update_access(body=body) + except Exception as e: + print("Exception when calling ShareApi->update_access: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UpdateAccessRequest**](UpdateAccessRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | access updated | - | +**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_share** +> update_share(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.update_share_request import UpdateShareRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UpdateShareRequest() # UpdateShareRequest | (optional) + + try: + api_instance.update_share(body=body) + except Exception as e: + print("Exception when calling ShareApi->update_share: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UpdateShareRequest**](UpdateShareRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | share updated | - | +**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/sdk/python/src/docs/ShareRequest.md b/sdk/python/src/docs/ShareRequest.md new file mode 100644 index 00000000..eb92f07a --- /dev/null +++ b/sdk/python/src/docs/ShareRequest.md @@ -0,0 +1,42 @@ +# ShareRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**env_zid** | **str** | | [optional] +**share_mode** | **str** | | [optional] +**frontend_selection** | **List[str]** | | [optional] +**backend_mode** | **str** | | [optional] +**backend_proxy_endpoint** | **str** | | [optional] +**auth_scheme** | **str** | | [optional] +**auth_users** | [**List[AuthUser]**](AuthUser.md) | | [optional] +**oauth_provider** | **str** | | [optional] +**oauth_email_domains** | **List[str]** | | [optional] +**oauth_authorization_check_interval** | **str** | | [optional] +**reserved** | **bool** | | [optional] +**permission_mode** | **str** | | [optional] +**access_grants** | **List[str]** | | [optional] +**unique_name** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.share_request import ShareRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ShareRequest from a JSON string +share_request_instance = ShareRequest.from_json(json) +# print the JSON string representation of the object +print(ShareRequest.to_json()) + +# convert the object into a dict +share_request_dict = share_request_instance.to_dict() +# create an instance of ShareRequest from a dict +share_request_from_dict = ShareRequest.from_dict(share_request_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/sdk/python/src/docs/ShareResponse.md b/sdk/python/src/docs/ShareResponse.md new file mode 100644 index 00000000..9bbedd0c --- /dev/null +++ b/sdk/python/src/docs/ShareResponse.md @@ -0,0 +1,30 @@ +# ShareResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_proxy_endpoints** | **List[str]** | | [optional] +**share_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.share_response import ShareResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ShareResponse from a JSON string +share_response_instance = ShareResponse.from_json(json) +# print the JSON string representation of the object +print(ShareResponse.to_json()) + +# convert the object into a dict +share_response_dict = share_response_instance.to_dict() +# create an instance of ShareResponse from a dict +share_response_from_dict = ShareResponse.from_dict(share_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/sdk/python/src/docs/SparkDataSample.md b/sdk/python/src/docs/SparkDataSample.md new file mode 100644 index 00000000..6479404c --- /dev/null +++ b/sdk/python/src/docs/SparkDataSample.md @@ -0,0 +1,30 @@ +# SparkDataSample + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rx** | **float** | | [optional] +**tx** | **float** | | [optional] + +## Example + +```python +from zrok_api.models.spark_data_sample import SparkDataSample + +# TODO update the JSON string below +json = "{}" +# create an instance of SparkDataSample from a JSON string +spark_data_sample_instance = SparkDataSample.from_json(json) +# print the JSON string representation of the object +print(SparkDataSample.to_json()) + +# convert the object into a dict +spark_data_sample_dict = spark_data_sample_instance.to_dict() +# create an instance of SparkDataSample from a dict +spark_data_sample_from_dict = SparkDataSample.from_dict(spark_data_sample_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/sdk/python/src/docs/UnaccessRequest.md b/sdk/python/src/docs/UnaccessRequest.md new file mode 100644 index 00000000..c7d57fd8 --- /dev/null +++ b/sdk/python/src/docs/UnaccessRequest.md @@ -0,0 +1,31 @@ +# UnaccessRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.unaccess_request import UnaccessRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnaccessRequest from a JSON string +unaccess_request_instance = UnaccessRequest.from_json(json) +# print the JSON string representation of the object +print(UnaccessRequest.to_json()) + +# convert the object into a dict +unaccess_request_dict = unaccess_request_instance.to_dict() +# create an instance of UnaccessRequest from a dict +unaccess_request_from_dict = UnaccessRequest.from_dict(unaccess_request_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/sdk/python/src/docs/UnshareRequest.md b/sdk/python/src/docs/UnshareRequest.md new file mode 100644 index 00000000..d376f008 --- /dev/null +++ b/sdk/python/src/docs/UnshareRequest.md @@ -0,0 +1,31 @@ +# UnshareRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] +**reserved** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.unshare_request import UnshareRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnshareRequest from a JSON string +unshare_request_instance = UnshareRequest.from_json(json) +# print the JSON string representation of the object +print(UnshareRequest.to_json()) + +# convert the object into a dict +unshare_request_dict = unshare_request_instance.to_dict() +# create an instance of UnshareRequest from a dict +unshare_request_from_dict = UnshareRequest.from_dict(unshare_request_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/sdk/python/src/docs/UpdateAccessRequest.md b/sdk/python/src/docs/UpdateAccessRequest.md new file mode 100644 index 00000000..7d9027da --- /dev/null +++ b/sdk/python/src/docs/UpdateAccessRequest.md @@ -0,0 +1,31 @@ +# UpdateAccessRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**bind_address** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.update_access_request import UpdateAccessRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateAccessRequest from a JSON string +update_access_request_instance = UpdateAccessRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateAccessRequest.to_json()) + +# convert the object into a dict +update_access_request_dict = update_access_request_instance.to_dict() +# create an instance of UpdateAccessRequest from a dict +update_access_request_from_dict = UpdateAccessRequest.from_dict(update_access_request_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/sdk/python/src/docs/UpdateFrontendRequest.md b/sdk/python/src/docs/UpdateFrontendRequest.md new file mode 100644 index 00000000..754bf4b6 --- /dev/null +++ b/sdk/python/src/docs/UpdateFrontendRequest.md @@ -0,0 +1,31 @@ +# UpdateFrontendRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**public_name** | **str** | | [optional] +**url_template** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.update_frontend_request import UpdateFrontendRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFrontendRequest from a JSON string +update_frontend_request_instance = UpdateFrontendRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateFrontendRequest.to_json()) + +# convert the object into a dict +update_frontend_request_dict = update_frontend_request_instance.to_dict() +# create an instance of UpdateFrontendRequest from a dict +update_frontend_request_from_dict = UpdateFrontendRequest.from_dict(update_frontend_request_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/sdk/python/src/docs/UpdateShareRequest.md b/sdk/python/src/docs/UpdateShareRequest.md new file mode 100644 index 00000000..8719ab10 --- /dev/null +++ b/sdk/python/src/docs/UpdateShareRequest.md @@ -0,0 +1,32 @@ +# UpdateShareRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**share_token** | **str** | | [optional] +**backend_proxy_endpoint** | **str** | | [optional] +**add_access_grants** | **List[str]** | | [optional] +**remove_access_grants** | **List[str]** | | [optional] + +## Example + +```python +from zrok_api.models.update_share_request import UpdateShareRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateShareRequest from a JSON string +update_share_request_instance = UpdateShareRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateShareRequest.to_json()) + +# convert the object into a dict +update_share_request_dict = update_share_request_instance.to_dict() +# create an instance of UpdateShareRequest from a dict +update_share_request_from_dict = UpdateShareRequest.from_dict(update_share_request_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/sdk/python/src/docs/Verify200Response.md b/sdk/python/src/docs/Verify200Response.md new file mode 100644 index 00000000..5ca1769d --- /dev/null +++ b/sdk/python/src/docs/Verify200Response.md @@ -0,0 +1,29 @@ +# Verify200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.verify200_response import Verify200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of Verify200Response from a JSON string +verify200_response_instance = Verify200Response.from_json(json) +# print the JSON string representation of the object +print(Verify200Response.to_json()) + +# convert the object into a dict +verify200_response_dict = verify200_response_instance.to_dict() +# create an instance of Verify200Response from a dict +verify200_response_from_dict = Verify200Response.from_dict(verify200_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/sdk/python/src/docs/VerifyRequest.md b/sdk/python/src/docs/VerifyRequest.md new file mode 100644 index 00000000..da6a0728 --- /dev/null +++ b/sdk/python/src/docs/VerifyRequest.md @@ -0,0 +1,29 @@ +# VerifyRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**register_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.verify_request import VerifyRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifyRequest from a JSON string +verify_request_instance = VerifyRequest.from_json(json) +# print the JSON string representation of the object +print(VerifyRequest.to_json()) + +# convert the object into a dict +verify_request_dict = verify_request_instance.to_dict() +# create an instance of VerifyRequest from a dict +verify_request_from_dict = VerifyRequest.from_dict(verify_request_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/sdk/python/src/docs/VersionInventory200Response.md b/sdk/python/src/docs/VersionInventory200Response.md new file mode 100644 index 00000000..2c08de2c --- /dev/null +++ b/sdk/python/src/docs/VersionInventory200Response.md @@ -0,0 +1,29 @@ +# VersionInventory200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**controller_version** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.version_inventory200_response import VersionInventory200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of VersionInventory200Response from a JSON string +version_inventory200_response_instance = VersionInventory200Response.from_json(json) +# print the JSON string representation of the object +print(VersionInventory200Response.to_json()) + +# convert the object into a dict +version_inventory200_response_dict = version_inventory200_response_instance.to_dict() +# create an instance of VersionInventory200Response from a dict +version_inventory200_response_from_dict = VersionInventory200Response.from_dict(version_inventory200_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/sdk/python/src/test/__init__.py b/sdk/python/src/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/sdk/python/src/test/test_access201_response.py b/sdk/python/src/test/test_access201_response.py new file mode 100644 index 00000000..9b698d1c --- /dev/null +++ b/sdk/python/src/test/test_access201_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.access201_response import Access201Response + +class TestAccess201Response(unittest.TestCase): + """Access201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Access201Response: + """Test Access201Response + include_optional 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 `Access201Response` + """ + model = Access201Response() + if include_optional: + return Access201Response( + frontend_token = '', + backend_mode = '' + ) + else: + return Access201Response( + ) + """ + + def testAccess201Response(self): + """Test Access201Response""" + # 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/sdk/python/src/test/test_access_request.py b/sdk/python/src/test/test_access_request.py new file mode 100644 index 00000000..070903e9 --- /dev/null +++ b/sdk/python/src/test/test_access_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.access_request import AccessRequest + +class TestAccessRequest(unittest.TestCase): + """AccessRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccessRequest: + """Test AccessRequest + include_optional 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 `AccessRequest` + """ + model = AccessRequest() + if include_optional: + return AccessRequest( + env_zid = '', + share_token = '', + bind_address = '', + description = '' + ) + else: + return AccessRequest( + ) + """ + + def testAccessRequest(self): + """Test AccessRequest""" + # 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/sdk/python/src/test/test_account_api.py b/sdk/python/src/test/test_account_api.py new file mode 100644 index 00000000..419e1f1b --- /dev/null +++ b/sdk/python/src/test/test_account_api.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.api.account_api import AccountApi + + +class TestAccountApi(unittest.TestCase): + """AccountApi unit test stubs""" + + def setUp(self) -> None: + self.api = AccountApi() + + def tearDown(self) -> None: + pass + + def test_change_password(self) -> None: + """Test case for change_password + + """ + pass + + def test_invite(self) -> None: + """Test case for invite + + """ + pass + + def test_login(self) -> None: + """Test case for login + + """ + pass + + def test_regenerate_account_token(self) -> None: + """Test case for regenerate_account_token + + """ + pass + + def test_register(self) -> None: + """Test case for register + + """ + pass + + def test_reset_password(self) -> None: + """Test case for reset_password + + """ + pass + + def test_reset_password_request(self) -> None: + """Test case for reset_password_request + + """ + pass + + def test_verify(self) -> None: + """Test case for verify + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/src/test/test_add_organization_member_request.py b/sdk/python/src/test/test_add_organization_member_request.py new file mode 100644 index 00000000..7a08de67 --- /dev/null +++ b/sdk/python/src/test/test_add_organization_member_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest + +class TestAddOrganizationMemberRequest(unittest.TestCase): + """AddOrganizationMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddOrganizationMemberRequest: + """Test AddOrganizationMemberRequest + include_optional 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 `AddOrganizationMemberRequest` + """ + model = AddOrganizationMemberRequest() + if include_optional: + return AddOrganizationMemberRequest( + organization_token = '', + email = '', + admin = True + ) + else: + return AddOrganizationMemberRequest( + ) + """ + + def testAddOrganizationMemberRequest(self): + """Test AddOrganizationMemberRequest""" + # 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/sdk/python/src/test/test_admin_api.py b/sdk/python/src/test/test_admin_api.py new file mode 100644 index 00000000..720e8832 --- /dev/null +++ b/sdk/python/src/test/test_admin_api.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.api.admin_api import AdminApi + + +class TestAdminApi(unittest.TestCase): + """AdminApi unit test stubs""" + + def setUp(self) -> None: + self.api = AdminApi() + + def tearDown(self) -> None: + pass + + def test_add_organization_member(self) -> None: + """Test case for add_organization_member + + """ + pass + + def test_create_account(self) -> None: + """Test case for create_account + + """ + pass + + def test_create_frontend(self) -> None: + """Test case for create_frontend + + """ + pass + + def test_create_identity(self) -> None: + """Test case for create_identity + + """ + pass + + def test_create_organization(self) -> None: + """Test case for create_organization + + """ + pass + + def test_delete_frontend(self) -> None: + """Test case for delete_frontend + + """ + pass + + def test_delete_organization(self) -> None: + """Test case for delete_organization + + """ + pass + + def test_grants(self) -> None: + """Test case for grants + + """ + pass + + def test_invite_token_generate(self) -> None: + """Test case for invite_token_generate + + """ + pass + + def test_list_frontends(self) -> None: + """Test case for list_frontends + + """ + pass + + def test_list_organization_members(self) -> None: + """Test case for list_organization_members + + """ + pass + + def test_list_organizations(self) -> None: + """Test case for list_organizations + + """ + pass + + def test_remove_organization_member(self) -> None: + """Test case for remove_organization_member + + """ + pass + + def test_update_frontend(self) -> None: + """Test case for update_frontend + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/src/test/test_auth_user.py b/sdk/python/src/test/test_auth_user.py new file mode 100644 index 00000000..e5d70b26 --- /dev/null +++ b/sdk/python/src/test/test_auth_user.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.auth_user import AuthUser + +class TestAuthUser(unittest.TestCase): + """AuthUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthUser: + """Test AuthUser + include_optional 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 `AuthUser` + """ + model = AuthUser() + if include_optional: + return AuthUser( + username = '', + password = '' + ) + else: + return AuthUser( + ) + """ + + def testAuthUser(self): + """Test AuthUser""" + # 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/sdk/python/src/test/test_change_password_request.py b/sdk/python/src/test/test_change_password_request.py new file mode 100644 index 00000000..592e8be1 --- /dev/null +++ b/sdk/python/src/test/test_change_password_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.change_password_request import ChangePasswordRequest + +class TestChangePasswordRequest(unittest.TestCase): + """ChangePasswordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChangePasswordRequest: + """Test ChangePasswordRequest + include_optional 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 `ChangePasswordRequest` + """ + model = ChangePasswordRequest() + if include_optional: + return ChangePasswordRequest( + email = '', + old_password = '', + new_password = '' + ) + else: + return ChangePasswordRequest( + ) + """ + + def testChangePasswordRequest(self): + """Test ChangePasswordRequest""" + # 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/sdk/python/src/test/test_client_version_check_request.py b/sdk/python/src/test/test_client_version_check_request.py new file mode 100644 index 00000000..169017d6 --- /dev/null +++ b/sdk/python/src/test/test_client_version_check_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest + +class TestClientVersionCheckRequest(unittest.TestCase): + """ClientVersionCheckRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClientVersionCheckRequest: + """Test ClientVersionCheckRequest + include_optional 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 `ClientVersionCheckRequest` + """ + model = ClientVersionCheckRequest() + if include_optional: + return ClientVersionCheckRequest( + client_version = '' + ) + else: + return ClientVersionCheckRequest( + ) + """ + + def testClientVersionCheckRequest(self): + """Test ClientVersionCheckRequest""" + # 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/sdk/python/src/test/test_configuration.py b/sdk/python/src/test/test_configuration.py new file mode 100644 index 00000000..bf80210e --- /dev/null +++ b/sdk/python/src/test/test_configuration.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.configuration import Configuration + +class TestConfiguration(unittest.TestCase): + """Configuration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Configuration: + """Test Configuration + include_optional 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 `Configuration` + """ + model = Configuration() + if include_optional: + return Configuration( + version = '', + tou_link = '', + invites_open = True, + requires_invite_token = True, + invite_token_contact = '' + ) + else: + return Configuration( + ) + """ + + def testConfiguration(self): + """Test Configuration""" + # 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/sdk/python/src/test/test_create_frontend201_response.py b/sdk/python/src/test/test_create_frontend201_response.py new file mode 100644 index 00000000..3f983a1a --- /dev/null +++ b/sdk/python/src/test/test_create_frontend201_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_frontend201_response import CreateFrontend201Response + +class TestCreateFrontend201Response(unittest.TestCase): + """CreateFrontend201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateFrontend201Response: + """Test CreateFrontend201Response + include_optional 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 `CreateFrontend201Response` + """ + model = CreateFrontend201Response() + if include_optional: + return CreateFrontend201Response( + frontend_token = '' + ) + else: + return CreateFrontend201Response( + ) + """ + + def testCreateFrontend201Response(self): + """Test CreateFrontend201Response""" + # 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/sdk/python/src/test/test_create_frontend_request.py b/sdk/python/src/test/test_create_frontend_request.py new file mode 100644 index 00000000..8fc35754 --- /dev/null +++ b/sdk/python/src/test/test_create_frontend_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_frontend_request import CreateFrontendRequest + +class TestCreateFrontendRequest(unittest.TestCase): + """CreateFrontendRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateFrontendRequest: + """Test CreateFrontendRequest + include_optional 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 `CreateFrontendRequest` + """ + model = CreateFrontendRequest() + if include_optional: + return CreateFrontendRequest( + z_id = '', + url_template = '', + public_name = '', + permission_mode = 'open' + ) + else: + return CreateFrontendRequest( + ) + """ + + def testCreateFrontendRequest(self): + """Test CreateFrontendRequest""" + # 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/sdk/python/src/test/test_create_identity201_response.py b/sdk/python/src/test/test_create_identity201_response.py new file mode 100644 index 00000000..2a9c8f2b --- /dev/null +++ b/sdk/python/src/test/test_create_identity201_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_identity201_response import CreateIdentity201Response + +class TestCreateIdentity201Response(unittest.TestCase): + """CreateIdentity201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateIdentity201Response: + """Test CreateIdentity201Response + include_optional 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 `CreateIdentity201Response` + """ + model = CreateIdentity201Response() + if include_optional: + return CreateIdentity201Response( + identity = '', + cfg = '' + ) + else: + return CreateIdentity201Response( + ) + """ + + def testCreateIdentity201Response(self): + """Test CreateIdentity201Response""" + # 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/sdk/python/src/test/test_create_identity_request.py b/sdk/python/src/test/test_create_identity_request.py new file mode 100644 index 00000000..9bf33031 --- /dev/null +++ b/sdk/python/src/test/test_create_identity_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_identity_request import CreateIdentityRequest + +class TestCreateIdentityRequest(unittest.TestCase): + """CreateIdentityRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateIdentityRequest: + """Test CreateIdentityRequest + include_optional 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 `CreateIdentityRequest` + """ + model = CreateIdentityRequest() + if include_optional: + return CreateIdentityRequest( + name = '' + ) + else: + return CreateIdentityRequest( + ) + """ + + def testCreateIdentityRequest(self): + """Test CreateIdentityRequest""" + # 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/sdk/python/src/test/test_create_organization201_response.py b/sdk/python/src/test/test_create_organization201_response.py new file mode 100644 index 00000000..d4dc7c81 --- /dev/null +++ b/sdk/python/src/test/test_create_organization201_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_organization201_response import CreateOrganization201Response + +class TestCreateOrganization201Response(unittest.TestCase): + """CreateOrganization201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOrganization201Response: + """Test CreateOrganization201Response + include_optional 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 `CreateOrganization201Response` + """ + model = CreateOrganization201Response() + if include_optional: + return CreateOrganization201Response( + organization_token = '' + ) + else: + return CreateOrganization201Response( + ) + """ + + def testCreateOrganization201Response(self): + """Test CreateOrganization201Response""" + # 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/sdk/python/src/test/test_create_organization_request.py b/sdk/python/src/test/test_create_organization_request.py new file mode 100644 index 00000000..da880237 --- /dev/null +++ b/sdk/python/src/test/test_create_organization_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_organization_request import CreateOrganizationRequest + +class TestCreateOrganizationRequest(unittest.TestCase): + """CreateOrganizationRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOrganizationRequest: + """Test CreateOrganizationRequest + include_optional 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 `CreateOrganizationRequest` + """ + model = CreateOrganizationRequest() + if include_optional: + return CreateOrganizationRequest( + description = '' + ) + else: + return CreateOrganizationRequest( + ) + """ + + def testCreateOrganizationRequest(self): + """Test CreateOrganizationRequest""" + # 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/sdk/python/src/test/test_disable_request.py b/sdk/python/src/test/test_disable_request.py new file mode 100644 index 00000000..c4837b4b --- /dev/null +++ b/sdk/python/src/test/test_disable_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.disable_request import DisableRequest + +class TestDisableRequest(unittest.TestCase): + """DisableRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DisableRequest: + """Test DisableRequest + include_optional 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 `DisableRequest` + """ + model = DisableRequest() + if include_optional: + return DisableRequest( + identity = '' + ) + else: + return DisableRequest( + ) + """ + + def testDisableRequest(self): + """Test DisableRequest""" + # 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/sdk/python/src/test/test_enable_request.py b/sdk/python/src/test/test_enable_request.py new file mode 100644 index 00000000..49689df4 --- /dev/null +++ b/sdk/python/src/test/test_enable_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.enable_request import EnableRequest + +class TestEnableRequest(unittest.TestCase): + """EnableRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnableRequest: + """Test EnableRequest + include_optional 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 `EnableRequest` + """ + model = EnableRequest() + if include_optional: + return EnableRequest( + description = '', + host = '' + ) + else: + return EnableRequest( + ) + """ + + def testEnableRequest(self): + """Test EnableRequest""" + # 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/sdk/python/src/test/test_environment.py b/sdk/python/src/test/test_environment.py new file mode 100644 index 00000000..d2e28280 --- /dev/null +++ b/sdk/python/src/test/test_environment.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.environment import Environment + +class TestEnvironment(unittest.TestCase): + """Environment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Environment: + """Test Environment + include_optional 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 `Environment` + """ + model = Environment() + if include_optional: + return Environment( + description = '', + host = '', + address = '', + z_id = '', + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56 + ) + else: + return Environment( + ) + """ + + def testEnvironment(self): + """Test Environment""" + # 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/sdk/python/src/test/test_environment_and_resources.py b/sdk/python/src/test/test_environment_and_resources.py new file mode 100644 index 00000000..56cafdac --- /dev/null +++ b/sdk/python/src/test/test_environment_and_resources.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.environment_and_resources import EnvironmentAndResources + +class TestEnvironmentAndResources(unittest.TestCase): + """EnvironmentAndResources unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnvironmentAndResources: + """Test EnvironmentAndResources + include_optional 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 `EnvironmentAndResources` + """ + model = EnvironmentAndResources() + if include_optional: + return EnvironmentAndResources( + environment = zrok_api.models.environment.environment( + description = '', + host = '', + address = '', + z_id = '', + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56, ), + frontends = [ + zrok_api.models.frontend.frontend( + id = 56, + frontend_token = '', + share_token = '', + backend_mode = '', + bind_address = '', + description = '', + z_id = '', + created_at = 56, + updated_at = 56, ) + ], + shares = [ + zrok_api.models.share.share( + share_token = '', + z_id = '', + share_mode = '', + backend_mode = '', + frontend_selection = '', + frontend_endpoint = '', + backend_proxy_endpoint = '', + reserved = True, + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56, ) + ] + ) + else: + return EnvironmentAndResources( + ) + """ + + def testEnvironmentAndResources(self): + """Test EnvironmentAndResources""" + # 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/sdk/python/src/test/test_environment_api.py b/sdk/python/src/test/test_environment_api.py new file mode 100644 index 00000000..83aeacd8 --- /dev/null +++ b/sdk/python/src/test/test_environment_api.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.api.environment_api import EnvironmentApi + + +class TestEnvironmentApi(unittest.TestCase): + """EnvironmentApi unit test stubs""" + + def setUp(self) -> None: + self.api = EnvironmentApi() + + def tearDown(self) -> None: + pass + + def test_disable(self) -> None: + """Test case for disable + + """ + pass + + def test_enable(self) -> None: + """Test case for enable + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/src/test/test_frontend.py b/sdk/python/src/test/test_frontend.py new file mode 100644 index 00000000..eba715d9 --- /dev/null +++ b/sdk/python/src/test/test_frontend.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.frontend import Frontend + +class TestFrontend(unittest.TestCase): + """Frontend unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Frontend: + """Test Frontend + include_optional 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 `Frontend` + """ + model = Frontend() + if include_optional: + return Frontend( + id = 56, + frontend_token = '', + share_token = '', + backend_mode = '', + bind_address = '', + description = '', + z_id = '', + created_at = 56, + updated_at = 56 + ) + else: + return Frontend( + ) + """ + + def testFrontend(self): + """Test Frontend""" + # 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/sdk/python/src/test/test_get_sparklines200_response.py b/sdk/python/src/test/test_get_sparklines200_response.py new file mode 100644 index 00000000..8367cc34 --- /dev/null +++ b/sdk/python/src/test/test_get_sparklines200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.get_sparklines200_response import GetSparklines200Response + +class TestGetSparklines200Response(unittest.TestCase): + """GetSparklines200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetSparklines200Response: + """Test GetSparklines200Response + include_optional 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 `GetSparklines200Response` + """ + model = GetSparklines200Response() + if include_optional: + return GetSparklines200Response( + sparklines = [ + zrok_api.models.metrics.metrics( + scope = '', + id = '', + period = 1.337, + samples = [ + zrok_api.models.metrics_sample.metricsSample( + rx = 1.337, + tx = 1.337, + timestamp = 1.337, ) + ], ) + ] + ) + else: + return GetSparklines200Response( + ) + """ + + def testGetSparklines200Response(self): + """Test GetSparklines200Response""" + # 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/sdk/python/src/test/test_get_sparklines_request.py b/sdk/python/src/test/test_get_sparklines_request.py new file mode 100644 index 00000000..cd46979b --- /dev/null +++ b/sdk/python/src/test/test_get_sparklines_request.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.get_sparklines_request import GetSparklinesRequest + +class TestGetSparklinesRequest(unittest.TestCase): + """GetSparklinesRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetSparklinesRequest: + """Test GetSparklinesRequest + include_optional 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 `GetSparklinesRequest` + """ + model = GetSparklinesRequest() + if include_optional: + return GetSparklinesRequest( + account = True, + environments = [ + '' + ], + shares = [ + '' + ] + ) + else: + return GetSparklinesRequest( + ) + """ + + def testGetSparklinesRequest(self): + """Test GetSparklinesRequest""" + # 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/sdk/python/src/test/test_invite_request.py b/sdk/python/src/test/test_invite_request.py new file mode 100644 index 00000000..a181ad3b --- /dev/null +++ b/sdk/python/src/test/test_invite_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.invite_request import InviteRequest + +class TestInviteRequest(unittest.TestCase): + """InviteRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteRequest: + """Test InviteRequest + include_optional 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 `InviteRequest` + """ + model = InviteRequest() + if include_optional: + return InviteRequest( + email = '', + invite_token = '' + ) + else: + return InviteRequest( + ) + """ + + def testInviteRequest(self): + """Test InviteRequest""" + # 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/sdk/python/src/test/test_invite_token_generate_request.py b/sdk/python/src/test/test_invite_token_generate_request.py new file mode 100644 index 00000000..1a8c2c10 --- /dev/null +++ b/sdk/python/src/test/test_invite_token_generate_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest + +class TestInviteTokenGenerateRequest(unittest.TestCase): + """InviteTokenGenerateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteTokenGenerateRequest: + """Test InviteTokenGenerateRequest + include_optional 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 `InviteTokenGenerateRequest` + """ + model = InviteTokenGenerateRequest() + if include_optional: + return InviteTokenGenerateRequest( + invite_tokens = [ + '' + ] + ) + else: + return InviteTokenGenerateRequest( + ) + """ + + def testInviteTokenGenerateRequest(self): + """Test InviteTokenGenerateRequest""" + # 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/sdk/python/src/test/test_list_frontends200_response_inner.py b/sdk/python/src/test/test_list_frontends200_response_inner.py new file mode 100644 index 00000000..2e21b24d --- /dev/null +++ b/sdk/python/src/test/test_list_frontends200_response_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner + +class TestListFrontends200ResponseInner(unittest.TestCase): + """ListFrontends200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListFrontends200ResponseInner: + """Test ListFrontends200ResponseInner + include_optional 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 `ListFrontends200ResponseInner` + """ + model = ListFrontends200ResponseInner() + if include_optional: + return ListFrontends200ResponseInner( + frontend_token = '', + z_id = '', + url_template = '', + public_name = '', + created_at = 56, + updated_at = 56 + ) + else: + return ListFrontends200ResponseInner( + ) + """ + + def testListFrontends200ResponseInner(self): + """Test ListFrontends200ResponseInner""" + # 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/sdk/python/src/test/test_list_memberships200_response.py b/sdk/python/src/test/test_list_memberships200_response.py new file mode 100644 index 00000000..d23ac2dd --- /dev/null +++ b/sdk/python/src/test/test_list_memberships200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_memberships200_response import ListMemberships200Response + +class TestListMemberships200Response(unittest.TestCase): + """ListMemberships200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListMemberships200Response: + """Test ListMemberships200Response + include_optional 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 `ListMemberships200Response` + """ + model = ListMemberships200Response() + if include_optional: + return ListMemberships200Response( + memberships = [ + zrok_api.models.list_memberships_200_response_memberships_inner.listMemberships_200_response_memberships_inner( + organization_token = '', + description = '', + admin = True, ) + ] + ) + else: + return ListMemberships200Response( + ) + """ + + def testListMemberships200Response(self): + """Test ListMemberships200Response""" + # 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/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py b/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py new file mode 100644 index 00000000..2f7cf7ff --- /dev/null +++ b/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner + +class TestListMemberships200ResponseMembershipsInner(unittest.TestCase): + """ListMemberships200ResponseMembershipsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListMemberships200ResponseMembershipsInner: + """Test ListMemberships200ResponseMembershipsInner + include_optional 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 `ListMemberships200ResponseMembershipsInner` + """ + model = ListMemberships200ResponseMembershipsInner() + if include_optional: + return ListMemberships200ResponseMembershipsInner( + organization_token = '', + description = '', + admin = True + ) + else: + return ListMemberships200ResponseMembershipsInner( + ) + """ + + def testListMemberships200ResponseMembershipsInner(self): + """Test ListMemberships200ResponseMembershipsInner""" + # 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/sdk/python/src/test/test_list_organization_members200_response.py b/sdk/python/src/test/test_list_organization_members200_response.py new file mode 100644 index 00000000..8020c6c7 --- /dev/null +++ b/sdk/python/src/test/test_list_organization_members200_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response + +class TestListOrganizationMembers200Response(unittest.TestCase): + """ListOrganizationMembers200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizationMembers200Response: + """Test ListOrganizationMembers200Response + include_optional 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 `ListOrganizationMembers200Response` + """ + model = ListOrganizationMembers200Response() + if include_optional: + return ListOrganizationMembers200Response( + members = [ + zrok_api.models.list_organization_members_200_response_members_inner.listOrganizationMembers_200_response_members_inner( + email = '', + admin = True, ) + ] + ) + else: + return ListOrganizationMembers200Response( + ) + """ + + def testListOrganizationMembers200Response(self): + """Test ListOrganizationMembers200Response""" + # 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/sdk/python/src/test/test_list_organization_members200_response_members_inner.py b/sdk/python/src/test/test_list_organization_members200_response_members_inner.py new file mode 100644 index 00000000..28cea33f --- /dev/null +++ b/sdk/python/src/test/test_list_organization_members200_response_members_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner + +class TestListOrganizationMembers200ResponseMembersInner(unittest.TestCase): + """ListOrganizationMembers200ResponseMembersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizationMembers200ResponseMembersInner: + """Test ListOrganizationMembers200ResponseMembersInner + include_optional 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 `ListOrganizationMembers200ResponseMembersInner` + """ + model = ListOrganizationMembers200ResponseMembersInner() + if include_optional: + return ListOrganizationMembers200ResponseMembersInner( + email = '', + admin = True + ) + else: + return ListOrganizationMembers200ResponseMembersInner( + ) + """ + + def testListOrganizationMembers200ResponseMembersInner(self): + """Test ListOrganizationMembers200ResponseMembersInner""" + # 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/sdk/python/src/test/test_list_organizations200_response.py b/sdk/python/src/test/test_list_organizations200_response.py new file mode 100644 index 00000000..7133529e --- /dev/null +++ b/sdk/python/src/test/test_list_organizations200_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organizations200_response import ListOrganizations200Response + +class TestListOrganizations200Response(unittest.TestCase): + """ListOrganizations200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizations200Response: + """Test ListOrganizations200Response + include_optional 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 `ListOrganizations200Response` + """ + model = ListOrganizations200Response() + if include_optional: + return ListOrganizations200Response( + organizations = [ + zrok_api.models.list_organizations_200_response_organizations_inner.listOrganizations_200_response_organizations_inner( + organization_token = '', + description = '', ) + ] + ) + else: + return ListOrganizations200Response( + ) + """ + + def testListOrganizations200Response(self): + """Test ListOrganizations200Response""" + # 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/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py b/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py new file mode 100644 index 00000000..6d857ae1 --- /dev/null +++ b/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner + +class TestListOrganizations200ResponseOrganizationsInner(unittest.TestCase): + """ListOrganizations200ResponseOrganizationsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizations200ResponseOrganizationsInner: + """Test ListOrganizations200ResponseOrganizationsInner + include_optional 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 `ListOrganizations200ResponseOrganizationsInner` + """ + model = ListOrganizations200ResponseOrganizationsInner() + if include_optional: + return ListOrganizations200ResponseOrganizationsInner( + organization_token = '', + description = '' + ) + else: + return ListOrganizations200ResponseOrganizationsInner( + ) + """ + + def testListOrganizations200ResponseOrganizationsInner(self): + """Test ListOrganizations200ResponseOrganizationsInner""" + # 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/sdk/python/src/test/test_login_request.py b/sdk/python/src/test/test_login_request.py new file mode 100644 index 00000000..1a4c2642 --- /dev/null +++ b/sdk/python/src/test/test_login_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.login_request import LoginRequest + +class TestLoginRequest(unittest.TestCase): + """LoginRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginRequest: + """Test LoginRequest + include_optional 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 `LoginRequest` + """ + model = LoginRequest() + if include_optional: + return LoginRequest( + email = '', + password = '' + ) + else: + return LoginRequest( + ) + """ + + def testLoginRequest(self): + """Test LoginRequest""" + # 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/sdk/python/src/test/test_metadata_api.py b/sdk/python/src/test/test_metadata_api.py new file mode 100644 index 00000000..2424ae4c --- /dev/null +++ b/sdk/python/src/test/test_metadata_api.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.api.metadata_api import MetadataApi + + +class TestMetadataApi(unittest.TestCase): + """MetadataApi unit test stubs""" + + def setUp(self) -> None: + self.api = MetadataApi() + + def tearDown(self) -> None: + pass + + def test_client_version_check(self) -> None: + """Test case for client_version_check + + """ + pass + + def test_configuration(self) -> None: + """Test case for configuration + + """ + pass + + def test_get_account_detail(self) -> None: + """Test case for get_account_detail + + """ + pass + + def test_get_account_metrics(self) -> None: + """Test case for get_account_metrics + + """ + pass + + def test_get_environment_detail(self) -> None: + """Test case for get_environment_detail + + """ + pass + + def test_get_environment_metrics(self) -> None: + """Test case for get_environment_metrics + + """ + pass + + def test_get_frontend_detail(self) -> None: + """Test case for get_frontend_detail + + """ + pass + + def test_get_share_detail(self) -> None: + """Test case for get_share_detail + + """ + pass + + def test_get_share_metrics(self) -> None: + """Test case for get_share_metrics + + """ + pass + + def test_get_sparklines(self) -> None: + """Test case for get_sparklines + + """ + pass + + def test_list_memberships(self) -> None: + """Test case for list_memberships + + """ + pass + + def test_list_org_members(self) -> None: + """Test case for list_org_members + + """ + pass + + def test_org_account_overview(self) -> None: + """Test case for org_account_overview + + """ + pass + + def test_overview(self) -> None: + """Test case for overview + + """ + pass + + def test_version(self) -> None: + """Test case for version + + """ + pass + + def test_version_inventory(self) -> None: + """Test case for version_inventory + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/src/test/test_metrics.py b/sdk/python/src/test/test_metrics.py new file mode 100644 index 00000000..04179009 --- /dev/null +++ b/sdk/python/src/test/test_metrics.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.metrics import Metrics + +class TestMetrics(unittest.TestCase): + """Metrics unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Metrics: + """Test Metrics + include_optional 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 `Metrics` + """ + model = Metrics() + if include_optional: + return Metrics( + scope = '', + id = '', + period = 1.337, + samples = [ + zrok_api.models.metrics_sample.metricsSample( + rx = 1.337, + tx = 1.337, + timestamp = 1.337, ) + ] + ) + else: + return Metrics( + ) + """ + + def testMetrics(self): + """Test Metrics""" + # 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/sdk/python/src/test/test_metrics_sample.py b/sdk/python/src/test/test_metrics_sample.py new file mode 100644 index 00000000..0b58e38d --- /dev/null +++ b/sdk/python/src/test/test_metrics_sample.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.metrics_sample import MetricsSample + +class TestMetricsSample(unittest.TestCase): + """MetricsSample unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MetricsSample: + """Test MetricsSample + include_optional 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 `MetricsSample` + """ + model = MetricsSample() + if include_optional: + return MetricsSample( + rx = 1.337, + tx = 1.337, + timestamp = 1.337 + ) + else: + return MetricsSample( + ) + """ + + def testMetricsSample(self): + """Test MetricsSample""" + # 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/sdk/python/src/test/test_overview.py b/sdk/python/src/test/test_overview.py new file mode 100644 index 00000000..804007cd --- /dev/null +++ b/sdk/python/src/test/test_overview.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.overview import Overview + +class TestOverview(unittest.TestCase): + """Overview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Overview: + """Test Overview + include_optional 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 `Overview` + """ + model = Overview() + if include_optional: + return Overview( + account_limited = True, + environments = [ + zrok_api.models.environment_and_resources.environmentAndResources( + environment = zrok_api.models.environment.environment( + description = '', + host = '', + address = '', + z_id = '', + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56, ), + frontends = [ + zrok_api.models.frontend.frontend( + id = 56, + frontend_token = '', + share_token = '', + backend_mode = '', + bind_address = '', + description = '', + z_id = '', + created_at = 56, + updated_at = 56, ) + ], + shares = [ + zrok_api.models.share.share( + share_token = '', + z_id = '', + share_mode = '', + backend_mode = '', + frontend_selection = '', + frontend_endpoint = '', + backend_proxy_endpoint = '', + reserved = True, + limited = True, + created_at = 56, + updated_at = 56, ) + ], ) + ] + ) + else: + return Overview( + ) + """ + + def testOverview(self): + """Test Overview""" + # 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/sdk/python/src/test/test_principal.py b/sdk/python/src/test/test_principal.py new file mode 100644 index 00000000..f92c159c --- /dev/null +++ b/sdk/python/src/test/test_principal.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.principal import Principal + +class TestPrincipal(unittest.TestCase): + """Principal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Principal: + """Test Principal + include_optional 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 `Principal` + """ + model = Principal() + if include_optional: + return Principal( + id = 56, + email = '', + token = '', + limitless = True, + admin = True + ) + else: + return Principal( + ) + """ + + def testPrincipal(self): + """Test Principal""" + # 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/sdk/python/src/test/test_regenerate_account_token200_response.py b/sdk/python/src/test/test_regenerate_account_token200_response.py new file mode 100644 index 00000000..a94c4678 --- /dev/null +++ b/sdk/python/src/test/test_regenerate_account_token200_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response + +class TestRegenerateAccountToken200Response(unittest.TestCase): + """RegenerateAccountToken200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RegenerateAccountToken200Response: + """Test RegenerateAccountToken200Response + include_optional 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 `RegenerateAccountToken200Response` + """ + model = RegenerateAccountToken200Response() + if include_optional: + return RegenerateAccountToken200Response( + account_token = '' + ) + else: + return RegenerateAccountToken200Response( + ) + """ + + def testRegenerateAccountToken200Response(self): + """Test RegenerateAccountToken200Response""" + # 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/sdk/python/src/test/test_regenerate_account_token_request.py b/sdk/python/src/test/test_regenerate_account_token_request.py new file mode 100644 index 00000000..b6e0b4bd --- /dev/null +++ b/sdk/python/src/test/test_regenerate_account_token_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest + +class TestRegenerateAccountTokenRequest(unittest.TestCase): + """RegenerateAccountTokenRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RegenerateAccountTokenRequest: + """Test RegenerateAccountTokenRequest + include_optional 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 `RegenerateAccountTokenRequest` + """ + model = RegenerateAccountTokenRequest() + if include_optional: + return RegenerateAccountTokenRequest( + email_address = '' + ) + else: + return RegenerateAccountTokenRequest( + ) + """ + + def testRegenerateAccountTokenRequest(self): + """Test RegenerateAccountTokenRequest""" + # 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/sdk/python/src/test/test_register_request.py b/sdk/python/src/test/test_register_request.py new file mode 100644 index 00000000..e026b200 --- /dev/null +++ b/sdk/python/src/test/test_register_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.register_request import RegisterRequest + +class TestRegisterRequest(unittest.TestCase): + """RegisterRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RegisterRequest: + """Test RegisterRequest + include_optional 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 `RegisterRequest` + """ + model = RegisterRequest() + if include_optional: + return RegisterRequest( + register_token = '', + password = '' + ) + else: + return RegisterRequest( + ) + """ + + def testRegisterRequest(self): + """Test RegisterRequest""" + # 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/sdk/python/src/test/test_remove_organization_member_request.py b/sdk/python/src/test/test_remove_organization_member_request.py new file mode 100644 index 00000000..abf89606 --- /dev/null +++ b/sdk/python/src/test/test_remove_organization_member_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest + +class TestRemoveOrganizationMemberRequest(unittest.TestCase): + """RemoveOrganizationMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemoveOrganizationMemberRequest: + """Test RemoveOrganizationMemberRequest + include_optional 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 `RemoveOrganizationMemberRequest` + """ + model = RemoveOrganizationMemberRequest() + if include_optional: + return RemoveOrganizationMemberRequest( + organization_token = '', + email = '' + ) + else: + return RemoveOrganizationMemberRequest( + ) + """ + + def testRemoveOrganizationMemberRequest(self): + """Test RemoveOrganizationMemberRequest""" + # 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/sdk/python/src/test/test_reset_password_request.py b/sdk/python/src/test/test_reset_password_request.py new file mode 100644 index 00000000..2c047502 --- /dev/null +++ b/sdk/python/src/test/test_reset_password_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.reset_password_request import ResetPasswordRequest + +class TestResetPasswordRequest(unittest.TestCase): + """ResetPasswordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResetPasswordRequest: + """Test ResetPasswordRequest + include_optional 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 `ResetPasswordRequest` + """ + model = ResetPasswordRequest() + if include_optional: + return ResetPasswordRequest( + reset_token = '', + password = '' + ) + else: + return ResetPasswordRequest( + ) + """ + + def testResetPasswordRequest(self): + """Test ResetPasswordRequest""" + # 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/sdk/python/src/test/test_share.py b/sdk/python/src/test/test_share.py new file mode 100644 index 00000000..ed498dc0 --- /dev/null +++ b/sdk/python/src/test/test_share.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.share import Share + +class TestShare(unittest.TestCase): + """Share unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Share: + """Test Share + include_optional 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 `Share` + """ + model = Share() + if include_optional: + return Share( + share_token = '', + z_id = '', + share_mode = '', + backend_mode = '', + frontend_selection = '', + frontend_endpoint = '', + backend_proxy_endpoint = '', + reserved = True, + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56 + ) + else: + return Share( + ) + """ + + def testShare(self): + """Test Share""" + # 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/sdk/python/src/test/test_share_api.py b/sdk/python/src/test/test_share_api.py new file mode 100644 index 00000000..a22ef8bf --- /dev/null +++ b/sdk/python/src/test/test_share_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.api.share_api import ShareApi + + +class TestShareApi(unittest.TestCase): + """ShareApi unit test stubs""" + + def setUp(self) -> None: + self.api = ShareApi() + + def tearDown(self) -> None: + pass + + def test_access(self) -> None: + """Test case for access + + """ + pass + + def test_share(self) -> None: + """Test case for share + + """ + pass + + def test_unaccess(self) -> None: + """Test case for unaccess + + """ + pass + + def test_unshare(self) -> None: + """Test case for unshare + + """ + pass + + def test_update_access(self) -> None: + """Test case for update_access + + """ + pass + + def test_update_share(self) -> None: + """Test case for update_share + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/src/test/test_share_request.py b/sdk/python/src/test/test_share_request.py new file mode 100644 index 00000000..c543ae26 --- /dev/null +++ b/sdk/python/src/test/test_share_request.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.share_request import ShareRequest + +class TestShareRequest(unittest.TestCase): + """ShareRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ShareRequest: + """Test ShareRequest + include_optional 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 `ShareRequest` + """ + model = ShareRequest() + if include_optional: + return ShareRequest( + env_zid = '', + share_mode = 'public', + frontend_selection = [ + '' + ], + backend_mode = 'proxy', + backend_proxy_endpoint = '', + auth_scheme = '', + auth_users = [ + zrok_api.models.auth_user.authUser( + username = '', + password = '', ) + ], + oauth_provider = 'github', + oauth_email_domains = [ + '' + ], + oauth_authorization_check_interval = '', + reserved = True, + permission_mode = 'open', + access_grants = [ + '' + ], + unique_name = '' + ) + else: + return ShareRequest( + ) + """ + + def testShareRequest(self): + """Test ShareRequest""" + # 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/sdk/python/src/test/test_share_response.py b/sdk/python/src/test/test_share_response.py new file mode 100644 index 00000000..46bb5af5 --- /dev/null +++ b/sdk/python/src/test/test_share_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.share_response import ShareResponse + +class TestShareResponse(unittest.TestCase): + """ShareResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ShareResponse: + """Test ShareResponse + include_optional 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 `ShareResponse` + """ + model = ShareResponse() + if include_optional: + return ShareResponse( + frontend_proxy_endpoints = [ + '' + ], + share_token = '' + ) + else: + return ShareResponse( + ) + """ + + def testShareResponse(self): + """Test ShareResponse""" + # 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/sdk/python/src/test/test_spark_data_sample.py b/sdk/python/src/test/test_spark_data_sample.py new file mode 100644 index 00000000..421d5dcd --- /dev/null +++ b/sdk/python/src/test/test_spark_data_sample.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.spark_data_sample import SparkDataSample + +class TestSparkDataSample(unittest.TestCase): + """SparkDataSample unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SparkDataSample: + """Test SparkDataSample + include_optional 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 `SparkDataSample` + """ + model = SparkDataSample() + if include_optional: + return SparkDataSample( + rx = 1.337, + tx = 1.337 + ) + else: + return SparkDataSample( + ) + """ + + def testSparkDataSample(self): + """Test SparkDataSample""" + # 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/sdk/python/src/test/test_unaccess_request.py b/sdk/python/src/test/test_unaccess_request.py new file mode 100644 index 00000000..ade50dff --- /dev/null +++ b/sdk/python/src/test/test_unaccess_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.unaccess_request import UnaccessRequest + +class TestUnaccessRequest(unittest.TestCase): + """UnaccessRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnaccessRequest: + """Test UnaccessRequest + include_optional 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 `UnaccessRequest` + """ + model = UnaccessRequest() + if include_optional: + return UnaccessRequest( + frontend_token = '', + env_zid = '', + share_token = '' + ) + else: + return UnaccessRequest( + ) + """ + + def testUnaccessRequest(self): + """Test UnaccessRequest""" + # 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/sdk/python/src/test/test_unshare_request.py b/sdk/python/src/test/test_unshare_request.py new file mode 100644 index 00000000..f0eccf47 --- /dev/null +++ b/sdk/python/src/test/test_unshare_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.unshare_request import UnshareRequest + +class TestUnshareRequest(unittest.TestCase): + """UnshareRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnshareRequest: + """Test UnshareRequest + include_optional 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 `UnshareRequest` + """ + model = UnshareRequest() + if include_optional: + return UnshareRequest( + env_zid = '', + share_token = '', + reserved = True + ) + else: + return UnshareRequest( + ) + """ + + def testUnshareRequest(self): + """Test UnshareRequest""" + # 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/sdk/python/src/test/test_update_access_request.py b/sdk/python/src/test/test_update_access_request.py new file mode 100644 index 00000000..02c028bf --- /dev/null +++ b/sdk/python/src/test/test_update_access_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.update_access_request import UpdateAccessRequest + +class TestUpdateAccessRequest(unittest.TestCase): + """UpdateAccessRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateAccessRequest: + """Test UpdateAccessRequest + include_optional 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 `UpdateAccessRequest` + """ + model = UpdateAccessRequest() + if include_optional: + return UpdateAccessRequest( + frontend_token = '', + bind_address = '', + description = '' + ) + else: + return UpdateAccessRequest( + ) + """ + + def testUpdateAccessRequest(self): + """Test UpdateAccessRequest""" + # 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/sdk/python/src/test/test_update_frontend_request.py b/sdk/python/src/test/test_update_frontend_request.py new file mode 100644 index 00000000..9546bbac --- /dev/null +++ b/sdk/python/src/test/test_update_frontend_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.update_frontend_request import UpdateFrontendRequest + +class TestUpdateFrontendRequest(unittest.TestCase): + """UpdateFrontendRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateFrontendRequest: + """Test UpdateFrontendRequest + include_optional 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 `UpdateFrontendRequest` + """ + model = UpdateFrontendRequest() + if include_optional: + return UpdateFrontendRequest( + frontend_token = '', + public_name = '', + url_template = '' + ) + else: + return UpdateFrontendRequest( + ) + """ + + def testUpdateFrontendRequest(self): + """Test UpdateFrontendRequest""" + # 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/sdk/python/src/test/test_update_share_request.py b/sdk/python/src/test/test_update_share_request.py new file mode 100644 index 00000000..1d8df185 --- /dev/null +++ b/sdk/python/src/test/test_update_share_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.update_share_request import UpdateShareRequest + +class TestUpdateShareRequest(unittest.TestCase): + """UpdateShareRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateShareRequest: + """Test UpdateShareRequest + include_optional 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 `UpdateShareRequest` + """ + model = UpdateShareRequest() + if include_optional: + return UpdateShareRequest( + share_token = '', + backend_proxy_endpoint = '', + add_access_grants = [ + '' + ], + remove_access_grants = [ + '' + ] + ) + else: + return UpdateShareRequest( + ) + """ + + def testUpdateShareRequest(self): + """Test UpdateShareRequest""" + # 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/sdk/python/src/test/test_verify200_response.py b/sdk/python/src/test/test_verify200_response.py new file mode 100644 index 00000000..bf257b65 --- /dev/null +++ b/sdk/python/src/test/test_verify200_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.verify200_response import Verify200Response + +class TestVerify200Response(unittest.TestCase): + """Verify200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Verify200Response: + """Test Verify200Response + include_optional 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 `Verify200Response` + """ + model = Verify200Response() + if include_optional: + return Verify200Response( + email = '' + ) + else: + return Verify200Response( + ) + """ + + def testVerify200Response(self): + """Test Verify200Response""" + # 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/sdk/python/src/test/test_verify_request.py b/sdk/python/src/test/test_verify_request.py new file mode 100644 index 00000000..c6f45d94 --- /dev/null +++ b/sdk/python/src/test/test_verify_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.verify_request import VerifyRequest + +class TestVerifyRequest(unittest.TestCase): + """VerifyRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VerifyRequest: + """Test VerifyRequest + include_optional 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 `VerifyRequest` + """ + model = VerifyRequest() + if include_optional: + return VerifyRequest( + register_token = '' + ) + else: + return VerifyRequest( + ) + """ + + def testVerifyRequest(self): + """Test VerifyRequest""" + # 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/sdk/python/src/test/test_version_inventory200_response.py b/sdk/python/src/test/test_version_inventory200_response.py new file mode 100644 index 00000000..7343fd1f --- /dev/null +++ b/sdk/python/src/test/test_version_inventory200_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.version_inventory200_response import VersionInventory200Response + +class TestVersionInventory200Response(unittest.TestCase): + """VersionInventory200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VersionInventory200Response: + """Test VersionInventory200Response + include_optional 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 `VersionInventory200Response` + """ + model = VersionInventory200Response() + if include_optional: + return VersionInventory200Response( + controller_version = '' + ) + else: + return VersionInventory200Response( + ) + """ + + def testVersionInventory200Response(self): + """Test VersionInventory200Response""" + # 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/sdk/python/src/zrok_api/__init__.py b/sdk/python/src/zrok_api/__init__.py new file mode 100644 index 00000000..bf54fba9 --- /dev/null +++ b/sdk/python/src/zrok_api/__init__.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +# flake8: noqa + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from zrok_api.api.account_api import AccountApi +from zrok_api.api.admin_api import AdminApi +from zrok_api.api.environment_api import EnvironmentApi +from zrok_api.api.metadata_api import MetadataApi +from zrok_api.api.share_api import ShareApi + +# import ApiClient +from zrok_api.api_response import ApiResponse +from zrok_api.api_client import ApiClient +from zrok_api.configuration import Configuration +from zrok_api.exceptions import OpenApiException +from zrok_api.exceptions import ApiTypeError +from zrok_api.exceptions import ApiValueError +from zrok_api.exceptions import ApiKeyError +from zrok_api.exceptions import ApiAttributeError +from zrok_api.exceptions import ApiException + +# import models into sdk package +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest +from zrok_api.models.auth_user import AuthUser +from zrok_api.models.change_password_request import ChangePasswordRequest +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest +from zrok_api.models.configuration import Configuration +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest +from zrok_api.models.disable_request import DisableRequest +from zrok_api.models.enable_request import EnableRequest +from zrok_api.models.environment import Environment +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from zrok_api.models.frontend import Frontend +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest +from zrok_api.models.invite_request import InviteRequest +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.models.list_memberships200_response import ListMemberships200Response +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner +from zrok_api.models.list_organizations200_response import ListOrganizations200Response +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.metrics import Metrics +from zrok_api.models.metrics_sample import MetricsSample +from zrok_api.models.overview import Overview +from zrok_api.models.principal import Principal +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.models.register_request import RegisterRequest +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest +from zrok_api.models.reset_password_request import ResetPasswordRequest +from zrok_api.models.share import Share +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.share_response import ShareResponse +from zrok_api.models.spark_data_sample import SparkDataSample +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.models.unshare_request import UnshareRequest +from zrok_api.models.update_access_request import UpdateAccessRequest +from zrok_api.models.update_frontend_request import UpdateFrontendRequest +from zrok_api.models.update_share_request import UpdateShareRequest +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest +from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/src/zrok_api/api/__init__.py b/sdk/python/src/zrok_api/api/__init__.py new file mode 100644 index 00000000..714f0a37 --- /dev/null +++ b/sdk/python/src/zrok_api/api/__init__.py @@ -0,0 +1,9 @@ +# flake8: noqa + +# import apis into api package +from zrok_api.api.account_api import AccountApi +from zrok_api.api.admin_api import AdminApi +from zrok_api.api.environment_api import EnvironmentApi +from zrok_api.api.metadata_api import MetadataApi +from zrok_api.api.share_api import ShareApi + diff --git a/sdk/python/src/zrok_api/api/account_api.py b/sdk/python/src/zrok_api/api/account_api.py new file mode 100644 index 00000000..d6a93a82 --- /dev/null +++ b/sdk/python/src/zrok_api/api/account_api.py @@ -0,0 +1,2261 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 StrictStr +from typing import Optional +from zrok_api.models.change_password_request import ChangePasswordRequest +from zrok_api.models.invite_request import InviteRequest +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.models.register_request import RegisterRequest +from zrok_api.models.reset_password_request import ResetPasswordRequest +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class AccountApi: + """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 change_password( + self, + body: Optional[ChangePasswordRequest] = 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, + ) -> None: + """change_password + + + :param body: + :type body: ChangePasswordRequest + :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._change_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '422': "str", + '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 change_password_with_http_info( + self, + body: Optional[ChangePasswordRequest] = 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[None]: + """change_password + + + :param body: + :type body: ChangePasswordRequest + :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._change_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '422': "str", + '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 change_password_without_preload_content( + self, + body: Optional[ChangePasswordRequest] = 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: + """change_password + + + :param body: + :type body: ChangePasswordRequest + :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._change_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '422': "str", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _change_password_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/changePassword', + 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 invite( + self, + body: Optional[InviteRequest] = 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, + ) -> None: + """invite + + + :param body: + :type body: InviteRequest + :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._invite_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': "str", + '401': None, + '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 invite_with_http_info( + self, + body: Optional[InviteRequest] = 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[None]: + """invite + + + :param body: + :type body: InviteRequest + :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._invite_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': "str", + '401': None, + '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 invite_without_preload_content( + self, + body: Optional[InviteRequest] = 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: + """invite + + + :param body: + :type body: InviteRequest + :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._invite_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': "str", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _invite_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/invite', + 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 login( + self, + body: Optional[LoginRequest] = 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, + ) -> str: + """login + + + :param body: + :type body: LoginRequest + :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._login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': 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 login_with_http_info( + self, + body: Optional[LoginRequest] = 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[str]: + """login + + + :param body: + :type body: LoginRequest + :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._login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': 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 login_without_preload_content( + self, + body: Optional[LoginRequest] = 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: + """login + + + :param body: + :type body: LoginRequest + :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._login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _login_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/login', + 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 regenerate_account_token( + self, + body: Optional[RegenerateAccountTokenRequest] = 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, + ) -> RegenerateAccountToken200Response: + """regenerate_account_token + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._regenerate_account_token_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '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 regenerate_account_token_with_http_info( + self, + body: Optional[RegenerateAccountTokenRequest] = 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[RegenerateAccountToken200Response]: + """regenerate_account_token + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._regenerate_account_token_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '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 regenerate_account_token_without_preload_content( + self, + body: Optional[RegenerateAccountTokenRequest] = 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: + """regenerate_account_token + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._regenerate_account_token_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _regenerate_account_token_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/regenerateAccountToken', + 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 register( + self, + body: Optional[RegisterRequest] = 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, + ) -> RegenerateAccountToken200Response: + """register + + + :param body: + :type body: RegisterRequest + :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._register_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '422': "str", + '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 register_with_http_info( + self, + body: Optional[RegisterRequest] = 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[RegenerateAccountToken200Response]: + """register + + + :param body: + :type body: RegisterRequest + :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._register_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '422': "str", + '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 register_without_preload_content( + self, + body: Optional[RegisterRequest] = 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: + """register + + + :param body: + :type body: RegisterRequest + :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._register_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '422': "str", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _register_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/register', + 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 reset_password( + self, + body: Optional[ResetPasswordRequest] = 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, + ) -> None: + """reset_password + + + :param body: + :type body: ResetPasswordRequest + :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._reset_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '404': None, + '422': "str", + '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 reset_password_with_http_info( + self, + body: Optional[ResetPasswordRequest] = 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[None]: + """reset_password + + + :param body: + :type body: ResetPasswordRequest + :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._reset_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '404': None, + '422': "str", + '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 reset_password_without_preload_content( + self, + body: Optional[ResetPasswordRequest] = 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: + """reset_password + + + :param body: + :type body: ResetPasswordRequest + :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._reset_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '404': None, + '422': "str", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reset_password_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/resetPassword', + 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 reset_password_request( + self, + body: Optional[RegenerateAccountTokenRequest] = 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, + ) -> None: + """reset_password_request + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._reset_password_request_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '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 reset_password_request_with_http_info( + self, + body: Optional[RegenerateAccountTokenRequest] = 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[None]: + """reset_password_request + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._reset_password_request_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '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 reset_password_request_without_preload_content( + self, + body: Optional[RegenerateAccountTokenRequest] = 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: + """reset_password_request + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._reset_password_request_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reset_password_request_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/resetPasswordRequest', + 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 verify( + self, + body: Optional[VerifyRequest] = 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, + ) -> Verify200Response: + """verify + + + :param body: + :type body: VerifyRequest + :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._verify_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Verify200Response", + '404': None, + '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 verify_with_http_info( + self, + body: Optional[VerifyRequest] = 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[Verify200Response]: + """verify + + + :param body: + :type body: VerifyRequest + :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._verify_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Verify200Response", + '404': None, + '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 verify_without_preload_content( + self, + body: Optional[VerifyRequest] = 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: + """verify + + + :param body: + :type body: VerifyRequest + :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._verify_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Verify200Response", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _verify_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/verify', + 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/sdk/python/src/zrok_api/api/admin_api.py b/sdk/python/src/zrok_api/api/admin_api.py new file mode 100644 index 00000000..6e0952fe --- /dev/null +++ b/sdk/python/src/zrok_api/api/admin_api.py @@ -0,0 +1,3855 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import List, Optional +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.list_organizations200_response import ListOrganizations200Response +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest +from zrok_api.models.update_frontend_request import UpdateFrontendRequest +from zrok_api.models.verify200_response import Verify200Response + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class AdminApi: + """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_organization_member( + self, + body: Optional[AddOrganizationMemberRequest] = 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, + ) -> None: + """add_organization_member + + + :param body: + :type body: AddOrganizationMemberRequest + :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_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '401': None, + '404': None, + '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_organization_member_with_http_info( + self, + body: Optional[AddOrganizationMemberRequest] = 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[None]: + """add_organization_member + + + :param body: + :type body: AddOrganizationMemberRequest + :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_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '401': None, + '404': None, + '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_organization_member_without_preload_content( + self, + body: Optional[AddOrganizationMemberRequest] = 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: + """add_organization_member + + + :param body: + :type body: AddOrganizationMemberRequest + :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_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_organization_member_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organization/add', + 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_account( + self, + body: Optional[LoginRequest] = 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, + ) -> RegenerateAccountToken200Response: + """create_account + + + :param body: + :type body: LoginRequest + :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_account_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RegenerateAccountToken200Response", + '401': None, + '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_account_with_http_info( + self, + body: Optional[LoginRequest] = 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[RegenerateAccountToken200Response]: + """create_account + + + :param body: + :type body: LoginRequest + :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_account_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RegenerateAccountToken200Response", + '401': None, + '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_account_without_preload_content( + self, + body: Optional[LoginRequest] = 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: + """create_account + + + :param body: + :type body: LoginRequest + :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_account_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RegenerateAccountToken200Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_account_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/account', + 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_frontend( + self, + body: Optional[CreateFrontendRequest] = 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, + ) -> CreateFrontend201Response: + """create_frontend + + + :param body: + :type body: CreateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFrontend201Response", + '400': None, + '401': None, + '404': None, + '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_frontend_with_http_info( + self, + body: Optional[CreateFrontendRequest] = 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[CreateFrontend201Response]: + """create_frontend + + + :param body: + :type body: CreateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFrontend201Response", + '400': None, + '401': None, + '404': None, + '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_frontend_without_preload_content( + self, + body: Optional[CreateFrontendRequest] = 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: + """create_frontend + + + :param body: + :type body: CreateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFrontend201Response", + '400': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_frontend_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/frontend', + 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_identity( + self, + body: Optional[CreateIdentityRequest] = 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, + ) -> CreateIdentity201Response: + """create_identity + + + :param body: + :type body: CreateIdentityRequest + :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_identity_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '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_identity_with_http_info( + self, + body: Optional[CreateIdentityRequest] = 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[CreateIdentity201Response]: + """create_identity + + + :param body: + :type body: CreateIdentityRequest + :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_identity_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '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_identity_without_preload_content( + self, + body: Optional[CreateIdentityRequest] = 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: + """create_identity + + + :param body: + :type body: CreateIdentityRequest + :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_identity_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_identity_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/identity', + 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_organization( + self, + body: Optional[CreateOrganizationRequest] = 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, + ) -> CreateOrganization201Response: + """create_organization + + + :param body: + :type body: CreateOrganizationRequest + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateOrganization201Response", + '401': None, + '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_organization_with_http_info( + self, + body: Optional[CreateOrganizationRequest] = 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[CreateOrganization201Response]: + """create_organization + + + :param body: + :type body: CreateOrganizationRequest + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateOrganization201Response", + '401': None, + '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_organization_without_preload_content( + self, + body: Optional[CreateOrganizationRequest] = 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: + """create_organization + + + :param body: + :type body: CreateOrganizationRequest + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateOrganization201Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_organization_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organization', + 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_frontend( + self, + body: Optional[CreateFrontend201Response] = 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, + ) -> None: + """delete_frontend + + + :param body: + :type body: CreateFrontend201Response + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_frontend_with_http_info( + self, + body: Optional[CreateFrontend201Response] = 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[None]: + """delete_frontend + + + :param body: + :type body: CreateFrontend201Response + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_frontend_without_preload_content( + self, + body: Optional[CreateFrontend201Response] = 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: + """delete_frontend + + + :param body: + :type body: CreateFrontend201Response + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_frontend_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/frontend', + 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_organization( + self, + body: Optional[CreateOrganization201Response] = 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, + ) -> None: + """delete_organization + + + :param body: + :type body: CreateOrganization201Response + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_organization_with_http_info( + self, + body: Optional[CreateOrganization201Response] = 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[None]: + """delete_organization + + + :param body: + :type body: CreateOrganization201Response + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_organization_without_preload_content( + self, + body: Optional[CreateOrganization201Response] = 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: + """delete_organization + + + :param body: + :type body: CreateOrganization201Response + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_organization_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organization', + 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 grants( + self, + body: Optional[Verify200Response] = 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, + ) -> None: + """grants + + + :param body: + :type body: Verify200Response + :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._grants_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 grants_with_http_info( + self, + body: Optional[Verify200Response] = 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[None]: + """grants + + + :param body: + :type body: Verify200Response + :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._grants_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 grants_without_preload_content( + self, + body: Optional[Verify200Response] = 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: + """grants + + + :param body: + :type body: Verify200Response + :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._grants_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/grants', + 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 invite_token_generate( + self, + body: Optional[InviteTokenGenerateRequest] = 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, + ) -> None: + """invite_token_generate + + + :param body: + :type body: InviteTokenGenerateRequest + :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._invite_token_generate_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '401': None, + '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 invite_token_generate_with_http_info( + self, + body: Optional[InviteTokenGenerateRequest] = 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[None]: + """invite_token_generate + + + :param body: + :type body: InviteTokenGenerateRequest + :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._invite_token_generate_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '401': None, + '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 invite_token_generate_without_preload_content( + self, + body: Optional[InviteTokenGenerateRequest] = 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: + """invite_token_generate + + + :param body: + :type body: InviteTokenGenerateRequest + :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._invite_token_generate_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _invite_token_generate_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/invite/token/generate', + 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_frontends( + 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, + ) -> List[ListFrontends200ResponseInner]: + """list_frontends + + + :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_frontends_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListFrontends200ResponseInner]", + '401': None, + '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_frontends_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[List[ListFrontends200ResponseInner]]: + """list_frontends + + + :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_frontends_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListFrontends200ResponseInner]", + '401': None, + '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_frontends_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: + """list_frontends + + + :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_frontends_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListFrontends200ResponseInner]", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_frontends_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/frontends', + 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_organization_members( + self, + body: Optional[CreateOrganization201Response] = 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, + ) -> ListOrganizationMembers200Response: + """list_organization_members + + + :param body: + :type body: CreateOrganization201Response + :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_organization_members_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '401': None, + '404': None, + '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_organization_members_with_http_info( + self, + body: Optional[CreateOrganization201Response] = 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[ListOrganizationMembers200Response]: + """list_organization_members + + + :param body: + :type body: CreateOrganization201Response + :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_organization_members_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '401': None, + '404': None, + '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_organization_members_without_preload_content( + self, + body: Optional[CreateOrganization201Response] = 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_organization_members + + + :param body: + :type body: CreateOrganization201Response + :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_organization_members_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_organization_members_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organization/list', + 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_organizations( + 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, + ) -> ListOrganizations200Response: + """list_organizations + + + :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_organizations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizations200Response", + '401': None, + '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_organizations_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[ListOrganizations200Response]: + """list_organizations + + + :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_organizations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizations200Response", + '401': None, + '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_organizations_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: + """list_organizations + + + :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_organizations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizations200Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_organizations_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations', + 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 remove_organization_member( + self, + body: Optional[RemoveOrganizationMemberRequest] = 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, + ) -> None: + """remove_organization_member + + + :param body: + :type body: RemoveOrganizationMemberRequest + :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._remove_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 remove_organization_member_with_http_info( + self, + body: Optional[RemoveOrganizationMemberRequest] = 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[None]: + """remove_organization_member + + + :param body: + :type body: RemoveOrganizationMemberRequest + :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._remove_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 remove_organization_member_without_preload_content( + self, + body: Optional[RemoveOrganizationMemberRequest] = 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: + """remove_organization_member + + + :param body: + :type body: RemoveOrganizationMemberRequest + :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._remove_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_organization_member_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organization/remove', + 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_frontend( + self, + body: Optional[UpdateFrontendRequest] = 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, + ) -> None: + """update_frontend + + + :param body: + :type body: UpdateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_frontend_with_http_info( + self, + body: Optional[UpdateFrontendRequest] = 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[None]: + """update_frontend + + + :param body: + :type body: UpdateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_frontend_without_preload_content( + self, + body: Optional[UpdateFrontendRequest] = 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: + """update_frontend + + + :param body: + :type body: UpdateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_frontend_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/frontend', + 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/sdk/python/src/zrok_api/api/environment_api.py b/sdk/python/src/zrok_api/api/environment_api.py new file mode 100644 index 00000000..4495d736 --- /dev/null +++ b/sdk/python/src/zrok_api/api/environment_api.py @@ -0,0 +1,589 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.disable_request import DisableRequest +from zrok_api.models.enable_request import EnableRequest + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class EnvironmentApi: + """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 disable( + self, + body: Optional[DisableRequest] = 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, + ) -> None: + """disable + + + :param body: + :type body: DisableRequest + :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._disable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '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 disable_with_http_info( + self, + body: Optional[DisableRequest] = 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[None]: + """disable + + + :param body: + :type body: DisableRequest + :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._disable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '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 disable_without_preload_content( + self, + body: Optional[DisableRequest] = 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: + """disable + + + :param body: + :type body: DisableRequest + :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._disable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _disable_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/disable', + 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 enable( + self, + body: Optional[EnableRequest] = 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, + ) -> CreateIdentity201Response: + """enable + + + :param body: + :type body: EnableRequest + :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._enable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '404': None, + '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 enable_with_http_info( + self, + body: Optional[EnableRequest] = 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[CreateIdentity201Response]: + """enable + + + :param body: + :type body: EnableRequest + :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._enable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '404': None, + '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 enable_without_preload_content( + self, + body: Optional[EnableRequest] = 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: + """enable + + + :param body: + :type body: EnableRequest + :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._enable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _enable_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/enable', + 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/sdk/python/src/zrok_api/api/metadata_api.py b/sdk/python/src/zrok_api/api/metadata_api.py new file mode 100644 index 00000000..ae780e05 --- /dev/null +++ b/sdk/python/src/zrok_api/api/metadata_api.py @@ -0,0 +1,4242 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import List, Optional +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest +from zrok_api.models.configuration import Configuration +from zrok_api.models.environment import Environment +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from zrok_api.models.frontend import Frontend +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest +from zrok_api.models.list_memberships200_response import ListMemberships200Response +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.metrics import Metrics +from zrok_api.models.overview import Overview +from zrok_api.models.share import Share +from zrok_api.models.version_inventory200_response import VersionInventory200Response + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class MetadataApi: + """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 client_version_check( + self, + body: Optional[ClientVersionCheckRequest] = 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, + ) -> None: + """client_version_check + + + :param body: + :type body: ClientVersionCheckRequest + :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._client_version_check_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "str", + } + 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 client_version_check_with_http_info( + self, + body: Optional[ClientVersionCheckRequest] = 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[None]: + """client_version_check + + + :param body: + :type body: ClientVersionCheckRequest + :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._client_version_check_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "str", + } + 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 client_version_check_without_preload_content( + self, + body: Optional[ClientVersionCheckRequest] = 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: + """client_version_check + + + :param body: + :type body: ClientVersionCheckRequest + :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._client_version_check_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _client_version_check_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/clientVersionCheck', + 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 configuration( + 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, + ) -> Configuration: + """configuration + + + :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._configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Configuration", + } + 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 configuration_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[Configuration]: + """configuration + + + :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._configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Configuration", + } + 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 configuration_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: + """configuration + + + :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._configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Configuration", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _configuration_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/configuration', + 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 get_account_detail( + 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, + ) -> List[Environment]: + """get_account_detail + + + :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_account_detail_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Environment]", + '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_account_detail_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[List[Environment]]: + """get_account_detail + + + :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_account_detail_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Environment]", + '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_account_detail_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_account_detail + + + :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_account_detail_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Environment]", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_account_detail_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/account', + 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 get_account_metrics( + self, + 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, + ) -> Metrics: + """get_account_metrics + + + :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._get_account_metrics_serialize( + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '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_account_metrics_with_http_info( + self, + 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[Metrics]: + """get_account_metrics + + + :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._get_account_metrics_serialize( + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '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_account_metrics_without_preload_content( + self, + 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: + """get_account_metrics + + + :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._get_account_metrics_serialize( + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_account_metrics_serialize( + self, + 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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # 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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/metrics/account', + 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 get_environment_detail( + self, + env_zid: StrictStr, + _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, + ) -> EnvironmentAndResources: + """get_environment_detail + + + :param env_zid: (required) + :type env_zid: 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._get_environment_detail_serialize( + env_zid=env_zid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentAndResources", + '401': None, + '404': None, + '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_environment_detail_with_http_info( + self, + env_zid: StrictStr, + _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[EnvironmentAndResources]: + """get_environment_detail + + + :param env_zid: (required) + :type env_zid: 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._get_environment_detail_serialize( + env_zid=env_zid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentAndResources", + '401': None, + '404': None, + '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_environment_detail_without_preload_content( + self, + env_zid: StrictStr, + _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_environment_detail + + + :param env_zid: (required) + :type env_zid: 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._get_environment_detail_serialize( + env_zid=env_zid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentAndResources", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_environment_detail_serialize( + self, + env_zid, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if env_zid is not None: + _path_params['envZId'] = env_zid + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/environment/{envZId}', + 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 get_environment_metrics( + self, + env_id: StrictStr, + 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, + ) -> Metrics: + """get_environment_metrics + + + :param env_id: (required) + :type env_id: str + :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._get_environment_metrics_serialize( + env_id=env_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': "Metrics", + '400': None, + '401': None, + '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_environment_metrics_with_http_info( + self, + env_id: StrictStr, + 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[Metrics]: + """get_environment_metrics + + + :param env_id: (required) + :type env_id: str + :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._get_environment_metrics_serialize( + env_id=env_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': "Metrics", + '400': None, + '401': None, + '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_environment_metrics_without_preload_content( + self, + env_id: StrictStr, + 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: + """get_environment_metrics + + + :param env_id: (required) + :type env_id: str + :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._get_environment_metrics_serialize( + env_id=env_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': "Metrics", + '400': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_environment_metrics_serialize( + self, + env_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if env_id is not None: + _path_params['envId'] = env_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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/metrics/environment/{envId}', + 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 get_frontend_detail( + self, + frontend_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, + ) -> Frontend: + """get_frontend_detail + + + :param frontend_id: (required) + :type frontend_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._get_frontend_detail_serialize( + frontend_id=frontend_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Frontend", + '401': None, + '404': None, + '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_frontend_detail_with_http_info( + self, + frontend_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[Frontend]: + """get_frontend_detail + + + :param frontend_id: (required) + :type frontend_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._get_frontend_detail_serialize( + frontend_id=frontend_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Frontend", + '401': None, + '404': None, + '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_frontend_detail_without_preload_content( + self, + frontend_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: + """get_frontend_detail + + + :param frontend_id: (required) + :type frontend_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._get_frontend_detail_serialize( + frontend_id=frontend_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Frontend", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_frontend_detail_serialize( + self, + frontend_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if frontend_id is not None: + _path_params['frontendId'] = frontend_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/frontend/{frontendId}', + 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 get_share_detail( + self, + share_token: StrictStr, + _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, + ) -> Share: + """get_share_detail + + + :param share_token: (required) + :type share_token: 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._get_share_detail_serialize( + share_token=share_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Share", + '401': None, + '404': None, + '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_share_detail_with_http_info( + self, + share_token: StrictStr, + _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[Share]: + """get_share_detail + + + :param share_token: (required) + :type share_token: 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._get_share_detail_serialize( + share_token=share_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Share", + '401': None, + '404': None, + '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_share_detail_without_preload_content( + self, + share_token: StrictStr, + _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_share_detail + + + :param share_token: (required) + :type share_token: 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._get_share_detail_serialize( + share_token=share_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Share", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_share_detail_serialize( + self, + share_token, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if share_token is not None: + _path_params['shareToken'] = share_token + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/share/{shareToken}', + 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 get_share_metrics( + self, + share_token: StrictStr, + 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, + ) -> Metrics: + """get_share_metrics + + + :param share_token: (required) + :type share_token: str + :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._get_share_metrics_serialize( + share_token=share_token, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '401': None, + '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_share_metrics_with_http_info( + self, + share_token: StrictStr, + 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[Metrics]: + """get_share_metrics + + + :param share_token: (required) + :type share_token: str + :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._get_share_metrics_serialize( + share_token=share_token, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '401': None, + '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_share_metrics_without_preload_content( + self, + share_token: StrictStr, + 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: + """get_share_metrics + + + :param share_token: (required) + :type share_token: str + :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._get_share_metrics_serialize( + share_token=share_token, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_share_metrics_serialize( + self, + share_token, + 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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if share_token is not None: + _path_params['shareToken'] = share_token + # 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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/metrics/share/{shareToken}', + 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 get_sparklines( + self, + body: Optional[GetSparklinesRequest] = 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, + ) -> GetSparklines200Response: + """get_sparklines + + + :param body: + :type body: GetSparklinesRequest + :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_sparklines_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSparklines200Response", + '401': None, + '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_sparklines_with_http_info( + self, + body: Optional[GetSparklinesRequest] = 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[GetSparklines200Response]: + """get_sparklines + + + :param body: + :type body: GetSparklinesRequest + :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_sparklines_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSparklines200Response", + '401': None, + '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_sparklines_without_preload_content( + self, + body: Optional[GetSparklinesRequest] = 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: + """get_sparklines + + + :param body: + :type body: GetSparklinesRequest + :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_sparklines_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSparklines200Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_sparklines_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sparklines', + 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_memberships( + 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, + ) -> ListMemberships200Response: + """list_memberships + + + :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_memberships_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMemberships200Response", + '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_memberships_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[ListMemberships200Response]: + """list_memberships + + + :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_memberships_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMemberships200Response", + '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_memberships_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: + """list_memberships + + + :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_memberships_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMemberships200Response", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_memberships_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/memberships', + 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_org_members( + self, + organization_token: StrictStr, + _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, + ) -> ListOrganizationMembers200Response: + """list_org_members + + + :param organization_token: (required) + :type organization_token: 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._list_org_members_serialize( + organization_token=organization_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '404': None, + '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_org_members_with_http_info( + self, + organization_token: StrictStr, + _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[ListOrganizationMembers200Response]: + """list_org_members + + + :param organization_token: (required) + :type organization_token: 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._list_org_members_serialize( + organization_token=organization_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '404': None, + '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_org_members_without_preload_content( + self, + organization_token: StrictStr, + _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_org_members + + + :param organization_token: (required) + :type organization_token: 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._list_org_members_serialize( + organization_token=organization_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_org_members_serialize( + self, + organization_token, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_token is not None: + _path_params['organizationToken'] = organization_token + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/members/{organizationToken}', + 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 org_account_overview( + self, + organization_token: StrictStr, + account_email: StrictStr, + _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, + ) -> Overview: + """org_account_overview + + + :param organization_token: (required) + :type organization_token: str + :param account_email: (required) + :type account_email: 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._org_account_overview_serialize( + organization_token=organization_token, + account_email=account_email, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '404': None, + '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 org_account_overview_with_http_info( + self, + organization_token: StrictStr, + account_email: StrictStr, + _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[Overview]: + """org_account_overview + + + :param organization_token: (required) + :type organization_token: str + :param account_email: (required) + :type account_email: 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._org_account_overview_serialize( + organization_token=organization_token, + account_email=account_email, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '404': None, + '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 org_account_overview_without_preload_content( + self, + organization_token: StrictStr, + account_email: StrictStr, + _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: + """org_account_overview + + + :param organization_token: (required) + :type organization_token: str + :param account_email: (required) + :type account_email: 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._org_account_overview_serialize( + organization_token=organization_token, + account_email=account_email, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _org_account_overview_serialize( + self, + organization_token, + account_email, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_token is not None: + _path_params['organizationToken'] = organization_token + if account_email is not None: + _path_params['accountEmail'] = account_email + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/overview/{organizationToken}/{accountEmail}', + 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 overview( + 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, + ) -> Overview: + """overview + + + :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._overview_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '500': "str", + } + 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 overview_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[Overview]: + """overview + + + :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._overview_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '500': "str", + } + 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 overview_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: + """overview + + + :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._overview_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '500': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _overview_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/overview', + 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 version( + 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, + ) -> str: + """version + + + :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._version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + 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 version_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[str]: + """version + + + :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._version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + 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 version_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: + """version + + + :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._version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _version_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/version', + 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 version_inventory( + 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, + ) -> VersionInventory200Response: + """version_inventory + + + :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._version_inventory_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionInventory200Response", + } + 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 version_inventory_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[VersionInventory200Response]: + """version_inventory + + + :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._version_inventory_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionInventory200Response", + } + 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 version_inventory_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: + """version_inventory + + + :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._version_inventory_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionInventory200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _version_inventory_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/versions', + 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/sdk/python/src/zrok_api/api/share_api.py b/sdk/python/src/zrok_api/api/share_api.py new file mode 100644 index 00000000..626035ee --- /dev/null +++ b/sdk/python/src/zrok_api/api/share_api.py @@ -0,0 +1,1712 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.share_response import ShareResponse +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.models.unshare_request import UnshareRequest +from zrok_api.models.update_access_request import UpdateAccessRequest +from zrok_api.models.update_share_request import UpdateShareRequest + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class ShareApi: + """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 access( + self, + body: Optional[AccessRequest] = 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, + ) -> Access201Response: + """access + + + :param body: + :type body: AccessRequest + :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._access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Access201Response", + '401': None, + '404': None, + '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 access_with_http_info( + self, + body: Optional[AccessRequest] = 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[Access201Response]: + """access + + + :param body: + :type body: AccessRequest + :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._access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Access201Response", + '401': None, + '404': None, + '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 access_without_preload_content( + self, + body: Optional[AccessRequest] = 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: + """access + + + :param body: + :type body: AccessRequest + :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._access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Access201Response", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _access_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/access', + 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 share( + self, + body: Optional[ShareRequest] = 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, + ) -> ShareResponse: + """share + + + :param body: + :type body: ShareRequest + :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._share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareResponse", + '401': None, + '404': None, + '409': None, + '422': None, + '500': "str", + } + 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 share_with_http_info( + self, + body: Optional[ShareRequest] = 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[ShareResponse]: + """share + + + :param body: + :type body: ShareRequest + :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._share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareResponse", + '401': None, + '404': None, + '409': None, + '422': None, + '500': "str", + } + 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 share_without_preload_content( + self, + body: Optional[ShareRequest] = 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: + """share + + + :param body: + :type body: ShareRequest + :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._share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareResponse", + '401': None, + '404': None, + '409': None, + '422': None, + '500': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _share_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/share', + 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 unaccess( + self, + body: Optional[UnaccessRequest] = 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, + ) -> None: + """unaccess + + + :param body: + :type body: UnaccessRequest + :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._unaccess_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 unaccess_with_http_info( + self, + body: Optional[UnaccessRequest] = 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[None]: + """unaccess + + + :param body: + :type body: UnaccessRequest + :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._unaccess_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 unaccess_without_preload_content( + self, + body: Optional[UnaccessRequest] = 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: + """unaccess + + + :param body: + :type body: UnaccessRequest + :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._unaccess_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unaccess_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/unaccess', + 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 unshare( + self, + body: Optional[UnshareRequest] = 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, + ) -> None: + """unshare + + + :param body: + :type body: UnshareRequest + :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._unshare_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': "str", + } + 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 unshare_with_http_info( + self, + body: Optional[UnshareRequest] = 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[None]: + """unshare + + + :param body: + :type body: UnshareRequest + :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._unshare_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': "str", + } + 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 unshare_without_preload_content( + self, + body: Optional[UnshareRequest] = 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: + """unshare + + + :param body: + :type body: UnshareRequest + :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._unshare_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unshare_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/unshare', + 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_access( + self, + body: Optional[UpdateAccessRequest] = 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, + ) -> None: + """update_access + + + :param body: + :type body: UpdateAccessRequest + :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_access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_access_with_http_info( + self, + body: Optional[UpdateAccessRequest] = 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[None]: + """update_access + + + :param body: + :type body: UpdateAccessRequest + :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_access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_access_without_preload_content( + self, + body: Optional[UpdateAccessRequest] = 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: + """update_access + + + :param body: + :type body: UpdateAccessRequest + :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_access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_access_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/access', + 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_share( + self, + body: Optional[UpdateShareRequest] = 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, + ) -> None: + """update_share + + + :param body: + :type body: UpdateShareRequest + :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_share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '404': None, + '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_share_with_http_info( + self, + body: Optional[UpdateShareRequest] = 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[None]: + """update_share + + + :param body: + :type body: UpdateShareRequest + :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_share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '404': None, + '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_share_without_preload_content( + self, + body: Optional[UpdateShareRequest] = 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: + """update_share + + + :param body: + :type body: UpdateShareRequest + :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_share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_share_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/share', + 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/sdk/python/src/zrok_api/api_client.py b/sdk/python/src/zrok_api/api_client.py new file mode 100644 index 00000000..7b417812 --- /dev/null +++ b/sdk/python/src/zrok_api/api_client.py @@ -0,0 +1,797 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from zrok_api.configuration import Configuration +from zrok_api.api_response import ApiResponse, T as ApiResponseT +import zrok_api.models +from zrok_api import rest +from zrok_api.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(zrok_api.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __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. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/sdk/python/src/zrok_api/api_response.py b/sdk/python/src/zrok_api/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/sdk/python/src/zrok_api/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/sdk/python/src/zrok_api/configuration.py b/sdk/python/src/zrok_api/configuration.py new file mode 100644 index 00000000..d504babc --- /dev/null +++ b/sdk/python/src/zrok_api/configuration.py @@ -0,0 +1,602 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import http.client as httplib +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + +import urllib3 + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "key": APIKeyAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = zrok_api.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 + """ + + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + *, + debug: Optional[bool] = None, + ) -> None: + """Constructor + """ + self._base_path = "/api/v1" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("zrok_api") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = retries + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default: Optional[Self]) -> None: + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = cls() + return cls._default + + @property + def logger_file(self) -> Optional[str]: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value: Optional[str]) -> None: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self) -> bool: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value: bool) -> None: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self) -> str: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value: str) -> None: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + return None + + def get_basic_auth_token(self) -> Optional[str]: + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self)-> AuthSettings: + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth: AuthSettings = {} + if 'key' in self.api_key: + auth['key'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'x-token', + 'value': self.get_api_key_with_prefix( + 'key', + ), + } + return auth + + def to_debug_report(self) -> str: + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self) -> List[HostSetting]: + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "/api/v1", + 'description': "No description provided", + } + ] + + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self) -> str: + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value: str) -> None: + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/sdk/python/src/zrok_api/exceptions.py b/sdk/python/src/zrok_api/exceptions.py new file mode 100644 index 00000000..1b37d862 --- /dev/null +++ b/sdk/python/src/zrok_api/exceptions.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/sdk/python/src/zrok_api/models/__init__.py b/sdk/python/src/zrok_api/models/__init__.py new file mode 100644 index 00000000..c4f5e3c4 --- /dev/null +++ b/sdk/python/src/zrok_api/models/__init__.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +# flake8: noqa +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest +from zrok_api.models.auth_user import AuthUser +from zrok_api.models.change_password_request import ChangePasswordRequest +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest +from zrok_api.models.configuration import Configuration +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest +from zrok_api.models.disable_request import DisableRequest +from zrok_api.models.enable_request import EnableRequest +from zrok_api.models.environment import Environment +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from zrok_api.models.frontend import Frontend +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest +from zrok_api.models.invite_request import InviteRequest +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.models.list_memberships200_response import ListMemberships200Response +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner +from zrok_api.models.list_organizations200_response import ListOrganizations200Response +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.metrics import Metrics +from zrok_api.models.metrics_sample import MetricsSample +from zrok_api.models.overview import Overview +from zrok_api.models.principal import Principal +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.models.register_request import RegisterRequest +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest +from zrok_api.models.reset_password_request import ResetPasswordRequest +from zrok_api.models.share import Share +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.share_response import ShareResponse +from zrok_api.models.spark_data_sample import SparkDataSample +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.models.unshare_request import UnshareRequest +from zrok_api.models.update_access_request import UpdateAccessRequest +from zrok_api.models.update_frontend_request import UpdateFrontendRequest +from zrok_api.models.update_share_request import UpdateShareRequest +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest +from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/src/zrok_api/models/access201_response.py b/sdk/python/src/zrok_api/models/access201_response.py new file mode 100644 index 00000000..6058082c --- /dev/null +++ b/sdk/python/src/zrok_api/models/access201_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Access201Response(BaseModel): + """ + Access201Response + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + __properties: ClassVar[List[str]] = ["frontendToken", "backendMode"] + + 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 Access201Response 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 Access201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "backendMode": obj.get("backendMode") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/access_request.py b/sdk/python/src/zrok_api/models/access_request.py new file mode 100644 index 00000000..18eb9837 --- /dev/null +++ b/sdk/python/src/zrok_api/models/access_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AccessRequest(BaseModel): + """ + AccessRequest + """ # noqa: E501 + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["envZId", "shareToken", "bindAddress", "description"] + + 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 AccessRequest 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 AccessRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "envZId": obj.get("envZId"), + "shareToken": obj.get("shareToken"), + "bindAddress": obj.get("bindAddress"), + "description": obj.get("description") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/add_organization_member_request.py b/sdk/python/src/zrok_api/models/add_organization_member_request.py new file mode 100644 index 00000000..d6db9e38 --- /dev/null +++ b/sdk/python/src/zrok_api/models/add_organization_member_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class AddOrganizationMemberRequest(BaseModel): + """ + AddOrganizationMemberRequest + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + email: Optional[StrictStr] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["organizationToken", "email", "admin"] + + 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 AddOrganizationMemberRequest 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 AddOrganizationMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "email": obj.get("email"), + "admin": obj.get("admin") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/auth_user.py b/sdk/python/src/zrok_api/models/auth_user.py new file mode 100644 index 00000000..b8e1718d --- /dev/null +++ b/sdk/python/src/zrok_api/models/auth_user.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 AuthUser(BaseModel): + """ + AuthUser + """ # noqa: E501 + username: Optional[StrictStr] = None + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["username", "password"] + + 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 AuthUser 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 AuthUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/change_password_request.py b/sdk/python/src/zrok_api/models/change_password_request.py new file mode 100644 index 00000000..dcbdafb3 --- /dev/null +++ b/sdk/python/src/zrok_api/models/change_password_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ChangePasswordRequest(BaseModel): + """ + ChangePasswordRequest + """ # noqa: E501 + email: Optional[StrictStr] = None + old_password: Optional[StrictStr] = Field(default=None, alias="oldPassword") + new_password: Optional[StrictStr] = Field(default=None, alias="newPassword") + __properties: ClassVar[List[str]] = ["email", "oldPassword", "newPassword"] + + 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 ChangePasswordRequest 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 ChangePasswordRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "oldPassword": obj.get("oldPassword"), + "newPassword": obj.get("newPassword") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/client_version_check_request.py b/sdk/python/src/zrok_api/models/client_version_check_request.py new file mode 100644 index 00000000..813e57ac --- /dev/null +++ b/sdk/python/src/zrok_api/models/client_version_check_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClientVersionCheckRequest(BaseModel): + """ + ClientVersionCheckRequest + """ # noqa: E501 + client_version: Optional[StrictStr] = Field(default=None, alias="clientVersion") + __properties: ClassVar[List[str]] = ["clientVersion"] + + 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 ClientVersionCheckRequest 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 ClientVersionCheckRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientVersion": obj.get("clientVersion") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/configuration.py b/sdk/python/src/zrok_api/models/configuration.py new file mode 100644 index 00000000..ed5ece38 --- /dev/null +++ b/sdk/python/src/zrok_api/models/configuration.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class Configuration(BaseModel): + """ + Configuration + """ # noqa: E501 + version: Optional[StrictStr] = None + tou_link: Optional[StrictStr] = Field(default=None, alias="touLink") + invites_open: Optional[StrictBool] = Field(default=None, alias="invitesOpen") + requires_invite_token: Optional[StrictBool] = Field(default=None, alias="requiresInviteToken") + invite_token_contact: Optional[StrictStr] = Field(default=None, alias="inviteTokenContact") + __properties: ClassVar[List[str]] = ["version", "touLink", "invitesOpen", "requiresInviteToken", "inviteTokenContact"] + + 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 Configuration 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 Configuration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version"), + "touLink": obj.get("touLink"), + "invitesOpen": obj.get("invitesOpen"), + "requiresInviteToken": obj.get("requiresInviteToken"), + "inviteTokenContact": obj.get("inviteTokenContact") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/create_frontend201_response.py b/sdk/python/src/zrok_api/models/create_frontend201_response.py new file mode 100644 index 00000000..61fc364c --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_frontend201_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateFrontend201Response(BaseModel): + """ + CreateFrontend201Response + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + __properties: ClassVar[List[str]] = ["frontendToken"] + + 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 CreateFrontend201Response 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 CreateFrontend201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/create_frontend_request.py b/sdk/python/src/zrok_api/models/create_frontend_request.py new file mode 100644 index 00000000..5f7072e8 --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_frontend_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateFrontendRequest(BaseModel): + """ + CreateFrontendRequest + """ # noqa: E501 + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + url_template: Optional[StrictStr] = None + public_name: Optional[StrictStr] = None + permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") + __properties: ClassVar[List[str]] = ["zId", "url_template", "public_name", "permissionMode"] + + @field_validator('permission_mode') + def permission_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['open', 'closed']): + raise ValueError("must be one of enum values ('open', 'closed')") + return value + + 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 CreateFrontendRequest 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 CreateFrontendRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "zId": obj.get("zId"), + "url_template": obj.get("url_template"), + "public_name": obj.get("public_name"), + "permissionMode": obj.get("permissionMode") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/create_identity201_response.py b/sdk/python/src/zrok_api/models/create_identity201_response.py new file mode 100644 index 00000000..f2811bbf --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_identity201_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 CreateIdentity201Response(BaseModel): + """ + CreateIdentity201Response + """ # noqa: E501 + identity: Optional[StrictStr] = None + cfg: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["identity", "cfg"] + + 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 CreateIdentity201Response 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 CreateIdentity201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identity": obj.get("identity"), + "cfg": obj.get("cfg") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/create_identity_request.py b/sdk/python/src/zrok_api/models/create_identity_request.py new file mode 100644 index 00000000..9f21d0a8 --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_identity_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 CreateIdentityRequest(BaseModel): + """ + CreateIdentityRequest + """ # noqa: E501 + name: Optional[StrictStr] = None + __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 CreateIdentityRequest 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 CreateIdentityRequest 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/sdk/python/src/zrok_api/models/create_organization201_response.py b/sdk/python/src/zrok_api/models/create_organization201_response.py new file mode 100644 index 00000000..431bf57a --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_organization201_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateOrganization201Response(BaseModel): + """ + CreateOrganization201Response + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + __properties: ClassVar[List[str]] = ["organizationToken"] + + 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 CreateOrganization201Response 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 CreateOrganization201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/create_organization_request.py b/sdk/python/src/zrok_api/models/create_organization_request.py new file mode 100644 index 00000000..de5d6572 --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_organization_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 CreateOrganizationRequest(BaseModel): + """ + CreateOrganizationRequest + """ # noqa: E501 + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["description"] + + 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 CreateOrganizationRequest 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 CreateOrganizationRequest 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") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/disable_request.py b/sdk/python/src/zrok_api/models/disable_request.py new file mode 100644 index 00000000..a6c30a01 --- /dev/null +++ b/sdk/python/src/zrok_api/models/disable_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 DisableRequest(BaseModel): + """ + DisableRequest + """ # noqa: E501 + identity: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["identity"] + + 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 DisableRequest 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 DisableRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identity": obj.get("identity") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/enable_request.py b/sdk/python/src/zrok_api/models/enable_request.py new file mode 100644 index 00000000..ad54886c --- /dev/null +++ b/sdk/python/src/zrok_api/models/enable_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 EnableRequest(BaseModel): + """ + EnableRequest + """ # noqa: E501 + description: Optional[StrictStr] = None + host: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["description", "host"] + + 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 EnableRequest 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 EnableRequest 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"), + "host": obj.get("host") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/environment.py b/sdk/python/src/zrok_api/models/environment.py new file mode 100644 index 00000000..063ff59e --- /dev/null +++ b/sdk/python/src/zrok_api/models/environment.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.spark_data_sample import SparkDataSample +from typing import Optional, Set +from typing_extensions import Self + +class Environment(BaseModel): + """ + Environment + """ # noqa: E501 + description: Optional[StrictStr] = None + host: Optional[StrictStr] = None + address: Optional[StrictStr] = None + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + activity: Optional[List[SparkDataSample]] = None + limited: Optional[StrictBool] = None + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["description", "host", "address", "zId", "activity", "limited", "createdAt", "updatedAt"] + + 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 Environment 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 activity (list) + _items = [] + if self.activity: + for _item_activity in self.activity: + if _item_activity: + _items.append(_item_activity.to_dict()) + _dict['activity'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Environment 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"), + "host": obj.get("host"), + "address": obj.get("address"), + "zId": obj.get("zId"), + "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, + "limited": obj.get("limited"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/environment_and_resources.py b/sdk/python/src/zrok_api/models/environment_and_resources.py new file mode 100644 index 00000000..65e4f257 --- /dev/null +++ b/sdk/python/src/zrok_api/models/environment_and_resources.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.environment import Environment +from zrok_api.models.frontend import Frontend +from zrok_api.models.share import Share +from typing import Optional, Set +from typing_extensions import Self + +class EnvironmentAndResources(BaseModel): + """ + EnvironmentAndResources + """ # noqa: E501 + environment: Optional[Environment] = None + frontends: Optional[List[Frontend]] = None + shares: Optional[List[Share]] = None + __properties: ClassVar[List[str]] = ["environment", "frontends", "shares"] + + 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 EnvironmentAndResources 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 frontends (list) + _items = [] + if self.frontends: + for _item_frontends in self.frontends: + if _item_frontends: + _items.append(_item_frontends.to_dict()) + _dict['frontends'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shares (list) + _items = [] + if self.shares: + for _item_shares in self.shares: + if _item_shares: + _items.append(_item_shares.to_dict()) + _dict['shares'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnvironmentAndResources from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "environment": Environment.from_dict(obj["environment"]) if obj.get("environment") is not None else None, + "frontends": [Frontend.from_dict(_item) for _item in obj["frontends"]] if obj.get("frontends") is not None else None, + "shares": [Share.from_dict(_item) for _item in obj["shares"]] if obj.get("shares") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/frontend.py b/sdk/python/src/zrok_api/models/frontend.py new file mode 100644 index 00000000..ae3c4c5d --- /dev/null +++ b/sdk/python/src/zrok_api/models/frontend.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Frontend(BaseModel): + """ + Frontend + """ # noqa: E501 + id: Optional[StrictInt] = None + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") + description: Optional[StrictStr] = None + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["id", "frontendToken", "shareToken", "backendMode", "bindAddress", "description", "zId", "createdAt", "updatedAt"] + + 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 Frontend 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 Frontend 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"), + "frontendToken": obj.get("frontendToken"), + "shareToken": obj.get("shareToken"), + "backendMode": obj.get("backendMode"), + "bindAddress": obj.get("bindAddress"), + "description": obj.get("description"), + "zId": obj.get("zId"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/get_sparklines200_response.py b/sdk/python/src/zrok_api/models/get_sparklines200_response.py new file mode 100644 index 00000000..177b0efa --- /dev/null +++ b/sdk/python/src/zrok_api/models/get_sparklines200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics import Metrics +from typing import Optional, Set +from typing_extensions import Self + +class GetSparklines200Response(BaseModel): + """ + GetSparklines200Response + """ # noqa: E501 + sparklines: Optional[List[Metrics]] = None + __properties: ClassVar[List[str]] = ["sparklines"] + + 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 GetSparklines200Response 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 sparklines (list) + _items = [] + if self.sparklines: + for _item_sparklines in self.sparklines: + if _item_sparklines: + _items.append(_item_sparklines.to_dict()) + _dict['sparklines'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetSparklines200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sparklines": [Metrics.from_dict(_item) for _item in obj["sparklines"]] if obj.get("sparklines") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/get_sparklines_request.py b/sdk/python/src/zrok_api/models/get_sparklines_request.py new file mode 100644 index 00000000..d9bef43d --- /dev/null +++ b/sdk/python/src/zrok_api/models/get_sparklines_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 GetSparklinesRequest(BaseModel): + """ + GetSparklinesRequest + """ # noqa: E501 + account: Optional[StrictBool] = None + environments: Optional[List[StrictStr]] = None + shares: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["account", "environments", "shares"] + + 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 GetSparklinesRequest 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 GetSparklinesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "account": obj.get("account"), + "environments": obj.get("environments"), + "shares": obj.get("shares") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/invite_request.py b/sdk/python/src/zrok_api/models/invite_request.py new file mode 100644 index 00000000..1c5bcc76 --- /dev/null +++ b/sdk/python/src/zrok_api/models/invite_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InviteRequest(BaseModel): + """ + InviteRequest + """ # noqa: E501 + email: Optional[StrictStr] = None + invite_token: Optional[StrictStr] = Field(default=None, alias="inviteToken") + __properties: ClassVar[List[str]] = ["email", "inviteToken"] + + 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 InviteRequest 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 InviteRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "inviteToken": obj.get("inviteToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/invite_token_generate_request.py b/sdk/python/src/zrok_api/models/invite_token_generate_request.py new file mode 100644 index 00000000..dd876de6 --- /dev/null +++ b/sdk/python/src/zrok_api/models/invite_token_generate_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InviteTokenGenerateRequest(BaseModel): + """ + InviteTokenGenerateRequest + """ # noqa: E501 + invite_tokens: Optional[List[StrictStr]] = Field(default=None, alias="inviteTokens") + __properties: ClassVar[List[str]] = ["inviteTokens"] + + 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 InviteTokenGenerateRequest 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 InviteTokenGenerateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inviteTokens": obj.get("inviteTokens") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py b/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py new file mode 100644 index 00000000..ff9d1bb4 --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ListFrontends200ResponseInner(BaseModel): + """ + ListFrontends200ResponseInner + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + public_name: Optional[StrictStr] = Field(default=None, alias="publicName") + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["frontendToken", "zId", "urlTemplate", "publicName", "createdAt", "updatedAt"] + + 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 ListFrontends200ResponseInner 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 ListFrontends200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "zId": obj.get("zId"), + "urlTemplate": obj.get("urlTemplate"), + "publicName": obj.get("publicName"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_memberships200_response.py b/sdk/python/src/zrok_api/models/list_memberships200_response.py new file mode 100644 index 00000000..f3db8fa7 --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_memberships200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner +from typing import Optional, Set +from typing_extensions import Self + +class ListMemberships200Response(BaseModel): + """ + ListMemberships200Response + """ # noqa: E501 + memberships: Optional[List[ListMemberships200ResponseMembershipsInner]] = None + __properties: ClassVar[List[str]] = ["memberships"] + + 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 ListMemberships200Response 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 memberships (list) + _items = [] + if self.memberships: + for _item_memberships in self.memberships: + if _item_memberships: + _items.append(_item_memberships.to_dict()) + _dict['memberships'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListMemberships200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "memberships": [ListMemberships200ResponseMembershipsInner.from_dict(_item) for _item in obj["memberships"]] if obj.get("memberships") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py b/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py new file mode 100644 index 00000000..e39b07b8 --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class ListMemberships200ResponseMembershipsInner(BaseModel): + """ + ListMemberships200ResponseMembershipsInner + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + description: Optional[StrictStr] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["organizationToken", "description", "admin"] + + 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 ListMemberships200ResponseMembershipsInner 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 ListMemberships200ResponseMembershipsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "description": obj.get("description"), + "admin": obj.get("admin") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_organization_members200_response.py b/sdk/python/src/zrok_api/models/list_organization_members200_response.py new file mode 100644 index 00000000..6058124c --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_organization_members200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner +from typing import Optional, Set +from typing_extensions import Self + +class ListOrganizationMembers200Response(BaseModel): + """ + ListOrganizationMembers200Response + """ # noqa: E501 + members: Optional[List[ListOrganizationMembers200ResponseMembersInner]] = None + __properties: ClassVar[List[str]] = ["members"] + + 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 ListOrganizationMembers200Response 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 members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListOrganizationMembers200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "members": [ListOrganizationMembers200ResponseMembersInner.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py b/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py new file mode 100644 index 00000000..0266e878 --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 ListOrganizationMembers200ResponseMembersInner(BaseModel): + """ + ListOrganizationMembers200ResponseMembersInner + """ # noqa: E501 + email: Optional[StrictStr] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["email", "admin"] + + 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 ListOrganizationMembers200ResponseMembersInner 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 ListOrganizationMembers200ResponseMembersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "admin": obj.get("admin") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_organizations200_response.py b/sdk/python/src/zrok_api/models/list_organizations200_response.py new file mode 100644 index 00000000..03fe63da --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_organizations200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner +from typing import Optional, Set +from typing_extensions import Self + +class ListOrganizations200Response(BaseModel): + """ + ListOrganizations200Response + """ # noqa: E501 + organizations: Optional[List[ListOrganizations200ResponseOrganizationsInner]] = None + __properties: ClassVar[List[str]] = ["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 ListOrganizations200Response 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_organizations in self.organizations: + if _item_organizations: + _items.append(_item_organizations.to_dict()) + _dict['organizations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListOrganizations200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizations": [ListOrganizations200ResponseOrganizationsInner.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py b/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py new file mode 100644 index 00000000..463e142a --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ListOrganizations200ResponseOrganizationsInner(BaseModel): + """ + ListOrganizations200ResponseOrganizationsInner + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["organizationToken", "description"] + + 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 ListOrganizations200ResponseOrganizationsInner 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 ListOrganizations200ResponseOrganizationsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "description": obj.get("description") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/login_request.py b/sdk/python/src/zrok_api/models/login_request.py new file mode 100644 index 00000000..6ef640ea --- /dev/null +++ b/sdk/python/src/zrok_api/models/login_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 LoginRequest(BaseModel): + """ + LoginRequest + """ # noqa: E501 + email: Optional[StrictStr] = None + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["email", "password"] + + 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 LoginRequest 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 LoginRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "password": obj.get("password") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/metrics.py b/sdk/python/src/zrok_api/models/metrics.py new file mode 100644 index 00000000..40db696c --- /dev/null +++ b/sdk/python/src/zrok_api/models/metrics.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics_sample import MetricsSample +from typing import Optional, Set +from typing_extensions import Self + +class Metrics(BaseModel): + """ + Metrics + """ # noqa: E501 + scope: Optional[StrictStr] = None + id: Optional[StrictStr] = None + period: Optional[Union[StrictFloat, StrictInt]] = None + samples: Optional[List[MetricsSample]] = None + __properties: ClassVar[List[str]] = ["scope", "id", "period", "samples"] + + 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 Metrics 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 samples (list) + _items = [] + if self.samples: + for _item_samples in self.samples: + if _item_samples: + _items.append(_item_samples.to_dict()) + _dict['samples'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Metrics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope": obj.get("scope"), + "id": obj.get("id"), + "period": obj.get("period"), + "samples": [MetricsSample.from_dict(_item) for _item in obj["samples"]] if obj.get("samples") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/metrics_sample.py b/sdk/python/src/zrok_api/models/metrics_sample.py new file mode 100644 index 00000000..678d0c1e --- /dev/null +++ b/sdk/python/src/zrok_api/models/metrics_sample.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class MetricsSample(BaseModel): + """ + MetricsSample + """ # noqa: E501 + rx: Optional[Union[StrictFloat, StrictInt]] = None + tx: Optional[Union[StrictFloat, StrictInt]] = None + timestamp: Optional[Union[StrictFloat, StrictInt]] = None + __properties: ClassVar[List[str]] = ["rx", "tx", "timestamp"] + + 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 MetricsSample 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 MetricsSample from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rx": obj.get("rx"), + "tx": obj.get("tx"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/overview.py b/sdk/python/src/zrok_api/models/overview.py new file mode 100644 index 00000000..2feb65cc --- /dev/null +++ b/sdk/python/src/zrok_api/models/overview.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from typing import Optional, Set +from typing_extensions import Self + +class Overview(BaseModel): + """ + Overview + """ # noqa: E501 + account_limited: Optional[StrictBool] = Field(default=None, alias="accountLimited") + environments: Optional[List[EnvironmentAndResources]] = None + __properties: ClassVar[List[str]] = ["accountLimited", "environments"] + + 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 Overview 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 environments (list) + _items = [] + if self.environments: + for _item_environments in self.environments: + if _item_environments: + _items.append(_item_environments.to_dict()) + _dict['environments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Overview from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountLimited": obj.get("accountLimited"), + "environments": [EnvironmentAndResources.from_dict(_item) for _item in obj["environments"]] if obj.get("environments") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/principal.py b/sdk/python/src/zrok_api/models/principal.py new file mode 100644 index 00000000..6ff9f756 --- /dev/null +++ b/sdk/python/src/zrok_api/models/principal.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 Principal(BaseModel): + """ + Principal + """ # noqa: E501 + id: Optional[StrictInt] = None + email: Optional[StrictStr] = None + token: Optional[StrictStr] = None + limitless: Optional[StrictBool] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "email", "token", "limitless", "admin"] + + 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 Principal 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 Principal 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"), + "email": obj.get("email"), + "token": obj.get("token"), + "limitless": obj.get("limitless"), + "admin": obj.get("admin") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py b/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py new file mode 100644 index 00000000..ccaf7ff4 --- /dev/null +++ b/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RegenerateAccountToken200Response(BaseModel): + """ + RegenerateAccountToken200Response + """ # noqa: E501 + account_token: Optional[StrictStr] = Field(default=None, alias="accountToken") + __properties: ClassVar[List[str]] = ["accountToken"] + + 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 RegenerateAccountToken200Response 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 RegenerateAccountToken200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountToken": obj.get("accountToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/regenerate_account_token_request.py b/sdk/python/src/zrok_api/models/regenerate_account_token_request.py new file mode 100644 index 00000000..32f2029f --- /dev/null +++ b/sdk/python/src/zrok_api/models/regenerate_account_token_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RegenerateAccountTokenRequest(BaseModel): + """ + RegenerateAccountTokenRequest + """ # noqa: E501 + email_address: Optional[StrictStr] = Field(default=None, alias="emailAddress") + __properties: ClassVar[List[str]] = ["emailAddress"] + + 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 RegenerateAccountTokenRequest 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 RegenerateAccountTokenRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "emailAddress": obj.get("emailAddress") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/register_request.py b/sdk/python/src/zrok_api/models/register_request.py new file mode 100644 index 00000000..f2bf90bd --- /dev/null +++ b/sdk/python/src/zrok_api/models/register_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RegisterRequest(BaseModel): + """ + RegisterRequest + """ # noqa: E501 + register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["registerToken", "password"] + + 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 RegisterRequest 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 RegisterRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "registerToken": obj.get("registerToken"), + "password": obj.get("password") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/remove_organization_member_request.py b/sdk/python/src/zrok_api/models/remove_organization_member_request.py new file mode 100644 index 00000000..28b6bd25 --- /dev/null +++ b/sdk/python/src/zrok_api/models/remove_organization_member_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RemoveOrganizationMemberRequest(BaseModel): + """ + RemoveOrganizationMemberRequest + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + email: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["organizationToken", "email"] + + 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 RemoveOrganizationMemberRequest 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 RemoveOrganizationMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "email": obj.get("email") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/reset_password_request.py b/sdk/python/src/zrok_api/models/reset_password_request.py new file mode 100644 index 00000000..a81c4bd3 --- /dev/null +++ b/sdk/python/src/zrok_api/models/reset_password_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ResetPasswordRequest(BaseModel): + """ + ResetPasswordRequest + """ # noqa: E501 + reset_token: Optional[StrictStr] = Field(default=None, alias="resetToken") + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["resetToken", "password"] + + 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 ResetPasswordRequest 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 ResetPasswordRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resetToken": obj.get("resetToken"), + "password": obj.get("password") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/share.py b/sdk/python/src/zrok_api/models/share.py new file mode 100644 index 00000000..aaf72fb8 --- /dev/null +++ b/sdk/python/src/zrok_api/models/share.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.spark_data_sample import SparkDataSample +from typing import Optional, Set +from typing_extensions import Self + +class Share(BaseModel): + """ + Share + """ # noqa: E501 + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + frontend_selection: Optional[StrictStr] = Field(default=None, alias="frontendSelection") + frontend_endpoint: Optional[StrictStr] = Field(default=None, alias="frontendEndpoint") + backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") + reserved: Optional[StrictBool] = None + activity: Optional[List[SparkDataSample]] = None + limited: Optional[StrictBool] = None + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["shareToken", "zId", "shareMode", "backendMode", "frontendSelection", "frontendEndpoint", "backendProxyEndpoint", "reserved", "activity", "limited", "createdAt", "updatedAt"] + + 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 Share 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 activity (list) + _items = [] + if self.activity: + for _item_activity in self.activity: + if _item_activity: + _items.append(_item_activity.to_dict()) + _dict['activity'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Share from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "shareToken": obj.get("shareToken"), + "zId": obj.get("zId"), + "shareMode": obj.get("shareMode"), + "backendMode": obj.get("backendMode"), + "frontendSelection": obj.get("frontendSelection"), + "frontendEndpoint": obj.get("frontendEndpoint"), + "backendProxyEndpoint": obj.get("backendProxyEndpoint"), + "reserved": obj.get("reserved"), + "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, + "limited": obj.get("limited"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/share_request.py b/sdk/python/src/zrok_api/models/share_request.py new file mode 100644 index 00000000..7ea8d828 --- /dev/null +++ b/sdk/python/src/zrok_api/models/share_request.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.auth_user import AuthUser +from typing import Optional, Set +from typing_extensions import Self + +class ShareRequest(BaseModel): + """ + ShareRequest + """ # noqa: E501 + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") + frontend_selection: Optional[List[StrictStr]] = Field(default=None, alias="frontendSelection") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") + auth_scheme: Optional[StrictStr] = Field(default=None, alias="authScheme") + auth_users: Optional[List[AuthUser]] = Field(default=None, alias="authUsers") + oauth_provider: Optional[StrictStr] = Field(default=None, alias="oauthProvider") + oauth_email_domains: Optional[List[StrictStr]] = Field(default=None, alias="oauthEmailDomains") + oauth_authorization_check_interval: Optional[StrictStr] = Field(default=None, alias="oauthAuthorizationCheckInterval") + reserved: Optional[StrictBool] = None + permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") + access_grants: Optional[List[StrictStr]] = Field(default=None, alias="accessGrants") + unique_name: Optional[StrictStr] = Field(default=None, alias="uniqueName") + __properties: ClassVar[List[str]] = ["envZId", "shareMode", "frontendSelection", "backendMode", "backendProxyEndpoint", "authScheme", "authUsers", "oauthProvider", "oauthEmailDomains", "oauthAuthorizationCheckInterval", "reserved", "permissionMode", "accessGrants", "uniqueName"] + + @field_validator('share_mode') + def share_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['public', 'private']): + raise ValueError("must be one of enum values ('public', 'private')") + return value + + @field_validator('backend_mode') + def backend_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn']): + raise ValueError("must be one of enum values ('proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn')") + return value + + @field_validator('oauth_provider') + def oauth_provider_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['github', 'google']): + raise ValueError("must be one of enum values ('github', 'google')") + return value + + @field_validator('permission_mode') + def permission_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['open', 'closed']): + raise ValueError("must be one of enum values ('open', 'closed')") + return value + + 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 ShareRequest 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 auth_users (list) + _items = [] + if self.auth_users: + for _item_auth_users in self.auth_users: + if _item_auth_users: + _items.append(_item_auth_users.to_dict()) + _dict['authUsers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ShareRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "envZId": obj.get("envZId"), + "shareMode": obj.get("shareMode"), + "frontendSelection": obj.get("frontendSelection"), + "backendMode": obj.get("backendMode"), + "backendProxyEndpoint": obj.get("backendProxyEndpoint"), + "authScheme": obj.get("authScheme"), + "authUsers": [AuthUser.from_dict(_item) for _item in obj["authUsers"]] if obj.get("authUsers") is not None else None, + "oauthProvider": obj.get("oauthProvider"), + "oauthEmailDomains": obj.get("oauthEmailDomains"), + "oauthAuthorizationCheckInterval": obj.get("oauthAuthorizationCheckInterval"), + "reserved": obj.get("reserved"), + "permissionMode": obj.get("permissionMode"), + "accessGrants": obj.get("accessGrants"), + "uniqueName": obj.get("uniqueName") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/share_response.py b/sdk/python/src/zrok_api/models/share_response.py new file mode 100644 index 00000000..8fa25d60 --- /dev/null +++ b/sdk/python/src/zrok_api/models/share_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ShareResponse(BaseModel): + """ + ShareResponse + """ # noqa: E501 + frontend_proxy_endpoints: Optional[List[StrictStr]] = Field(default=None, alias="frontendProxyEndpoints") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + __properties: ClassVar[List[str]] = ["frontendProxyEndpoints", "shareToken"] + + 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 ShareResponse 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 ShareResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendProxyEndpoints": obj.get("frontendProxyEndpoints"), + "shareToken": obj.get("shareToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/spark_data_sample.py b/sdk/python/src/zrok_api/models/spark_data_sample.py new file mode 100644 index 00000000..23c4ef51 --- /dev/null +++ b/sdk/python/src/zrok_api/models/spark_data_sample.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SparkDataSample(BaseModel): + """ + SparkDataSample + """ # noqa: E501 + rx: Optional[Union[StrictFloat, StrictInt]] = None + tx: Optional[Union[StrictFloat, StrictInt]] = None + __properties: ClassVar[List[str]] = ["rx", "tx"] + + 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 SparkDataSample 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 SparkDataSample from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rx": obj.get("rx"), + "tx": obj.get("tx") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/unaccess_request.py b/sdk/python/src/zrok_api/models/unaccess_request.py new file mode 100644 index 00000000..19a3f5df --- /dev/null +++ b/sdk/python/src/zrok_api/models/unaccess_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UnaccessRequest(BaseModel): + """ + UnaccessRequest + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + __properties: ClassVar[List[str]] = ["frontendToken", "envZId", "shareToken"] + + 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 UnaccessRequest 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 UnaccessRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "envZId": obj.get("envZId"), + "shareToken": obj.get("shareToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/unshare_request.py b/sdk/python/src/zrok_api/models/unshare_request.py new file mode 100644 index 00000000..3ff557e1 --- /dev/null +++ b/sdk/python/src/zrok_api/models/unshare_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class UnshareRequest(BaseModel): + """ + UnshareRequest + """ # noqa: E501 + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + reserved: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["envZId", "shareToken", "reserved"] + + 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 UnshareRequest 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 UnshareRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "envZId": obj.get("envZId"), + "shareToken": obj.get("shareToken"), + "reserved": obj.get("reserved") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/update_access_request.py b/sdk/python/src/zrok_api/models/update_access_request.py new file mode 100644 index 00000000..a27f9623 --- /dev/null +++ b/sdk/python/src/zrok_api/models/update_access_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateAccessRequest(BaseModel): + """ + UpdateAccessRequest + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["frontendToken", "bindAddress", "description"] + + 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 UpdateAccessRequest 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 UpdateAccessRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "bindAddress": obj.get("bindAddress"), + "description": obj.get("description") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/update_frontend_request.py b/sdk/python/src/zrok_api/models/update_frontend_request.py new file mode 100644 index 00000000..52916296 --- /dev/null +++ b/sdk/python/src/zrok_api/models/update_frontend_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateFrontendRequest(BaseModel): + """ + UpdateFrontendRequest + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + public_name: Optional[StrictStr] = Field(default=None, alias="publicName") + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + __properties: ClassVar[List[str]] = ["frontendToken", "publicName", "urlTemplate"] + + 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 UpdateFrontendRequest 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 UpdateFrontendRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "publicName": obj.get("publicName"), + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/update_share_request.py b/sdk/python/src/zrok_api/models/update_share_request.py new file mode 100644 index 00000000..9e3de749 --- /dev/null +++ b/sdk/python/src/zrok_api/models/update_share_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateShareRequest(BaseModel): + """ + UpdateShareRequest + """ # noqa: E501 + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") + add_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="addAccessGrants") + remove_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="removeAccessGrants") + __properties: ClassVar[List[str]] = ["shareToken", "backendProxyEndpoint", "addAccessGrants", "removeAccessGrants"] + + 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 UpdateShareRequest 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 UpdateShareRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "shareToken": obj.get("shareToken"), + "backendProxyEndpoint": obj.get("backendProxyEndpoint"), + "addAccessGrants": obj.get("addAccessGrants"), + "removeAccessGrants": obj.get("removeAccessGrants") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/verify200_response.py b/sdk/python/src/zrok_api/models/verify200_response.py new file mode 100644 index 00000000..4709d646 --- /dev/null +++ b/sdk/python/src/zrok_api/models/verify200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 Verify200Response(BaseModel): + """ + Verify200Response + """ # noqa: E501 + email: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["email"] + + 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 Verify200Response 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 Verify200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/verify_request.py b/sdk/python/src/zrok_api/models/verify_request.py new file mode 100644 index 00000000..76def799 --- /dev/null +++ b/sdk/python/src/zrok_api/models/verify_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VerifyRequest(BaseModel): + """ + VerifyRequest + """ # noqa: E501 + register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") + __properties: ClassVar[List[str]] = ["registerToken"] + + 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 VerifyRequest 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 VerifyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "registerToken": obj.get("registerToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/version_inventory200_response.py b/sdk/python/src/zrok_api/models/version_inventory200_response.py new file mode 100644 index 00000000..8cbf4288 --- /dev/null +++ b/sdk/python/src/zrok_api/models/version_inventory200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VersionInventory200Response(BaseModel): + """ + VersionInventory200Response + """ # noqa: E501 + controller_version: Optional[StrictStr] = Field(default=None, alias="controllerVersion") + __properties: ClassVar[List[str]] = ["controllerVersion"] + + 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 VersionInventory200Response 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 VersionInventory200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "controllerVersion": obj.get("controllerVersion") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/py.typed b/sdk/python/src/zrok_api/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/sdk/python/src/zrok_api/rest.py b/sdk/python/src/zrok_api/rest.py new file mode 100644 index 00000000..f09faee7 --- /dev/null +++ b/sdk/python/src/zrok_api/rest.py @@ -0,0 +1,258 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from zrok_api.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) From 0851e3e560a525343e1d6c4ac431daf48709b5a6 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 19:37:06 -0500 Subject: [PATCH 37/56] Revert "temporarily commit the generated py client" This reverts commit 97d76d45cd07cf39bddf40973fd9b2b5165995a8. --- sdk/python/src/.gitignore | 66 - sdk/python/src/README.md | 215 - sdk/python/src/docs/Access201Response.md | 30 - sdk/python/src/docs/AccessRequest.md | 32 - sdk/python/src/docs/AccountApi.md | 557 --- .../src/docs/AddOrganizationMemberRequest.md | 31 - sdk/python/src/docs/AdminApi.md | 1079 ----- sdk/python/src/docs/AuthUser.md | 30 - sdk/python/src/docs/ChangePasswordRequest.md | 31 - .../src/docs/ClientVersionCheckRequest.md | 29 - sdk/python/src/docs/Configuration.md | 33 - .../src/docs/CreateFrontend201Response.md | 29 - sdk/python/src/docs/CreateFrontendRequest.md | 32 - .../src/docs/CreateIdentity201Response.md | 30 - sdk/python/src/docs/CreateIdentityRequest.md | 29 - .../src/docs/CreateOrganization201Response.md | 29 - .../src/docs/CreateOrganizationRequest.md | 29 - sdk/python/src/docs/DisableRequest.md | 29 - sdk/python/src/docs/EnableRequest.md | 30 - sdk/python/src/docs/Environment.md | 36 - .../src/docs/EnvironmentAndResources.md | 31 - sdk/python/src/docs/EnvironmentApi.md | 162 - sdk/python/src/docs/Frontend.md | 37 - .../src/docs/GetSparklines200Response.md | 29 - sdk/python/src/docs/GetSparklinesRequest.md | 31 - sdk/python/src/docs/InviteRequest.md | 30 - .../src/docs/InviteTokenGenerateRequest.md | 29 - .../src/docs/ListFrontends200ResponseInner.md | 34 - .../src/docs/ListMemberships200Response.md | 29 - ...tMemberships200ResponseMembershipsInner.md | 31 - .../ListOrganizationMembers200Response.md | 29 - ...anizationMembers200ResponseMembersInner.md | 30 - .../src/docs/ListOrganizations200Response.md | 29 - ...anizations200ResponseOrganizationsInner.md | 30 - sdk/python/src/docs/LoginRequest.md | 30 - sdk/python/src/docs/MetadataApi.md | 1171 ----- sdk/python/src/docs/Metrics.md | 32 - sdk/python/src/docs/MetricsSample.md | 31 - sdk/python/src/docs/Overview.md | 30 - sdk/python/src/docs/Principal.md | 33 - .../docs/RegenerateAccountToken200Response.md | 29 - .../src/docs/RegenerateAccountTokenRequest.md | 29 - sdk/python/src/docs/RegisterRequest.md | 30 - .../docs/RemoveOrganizationMemberRequest.md | 30 - sdk/python/src/docs/ResetPasswordRequest.md | 30 - sdk/python/src/docs/Share.md | 40 - sdk/python/src/docs/ShareApi.md | 473 -- sdk/python/src/docs/ShareRequest.md | 42 - sdk/python/src/docs/ShareResponse.md | 30 - sdk/python/src/docs/SparkDataSample.md | 30 - sdk/python/src/docs/UnaccessRequest.md | 31 - sdk/python/src/docs/UnshareRequest.md | 31 - sdk/python/src/docs/UpdateAccessRequest.md | 31 - sdk/python/src/docs/UpdateFrontendRequest.md | 31 - sdk/python/src/docs/UpdateShareRequest.md | 32 - sdk/python/src/docs/Verify200Response.md | 29 - sdk/python/src/docs/VerifyRequest.md | 29 - .../src/docs/VersionInventory200Response.md | 29 - sdk/python/src/test/__init__.py | 0 .../src/test/test_access201_response.py | 52 - sdk/python/src/test/test_access_request.py | 54 - sdk/python/src/test/test_account_api.py | 79 - .../test_add_organization_member_request.py | 53 - sdk/python/src/test/test_admin_api.py | 115 - sdk/python/src/test/test_auth_user.py | 52 - .../src/test/test_change_password_request.py | 53 - .../test/test_client_version_check_request.py | 51 - sdk/python/src/test/test_configuration.py | 55 - .../test/test_create_frontend201_response.py | 51 - .../src/test/test_create_frontend_request.py | 54 - .../test/test_create_identity201_response.py | 52 - .../src/test/test_create_identity_request.py | 51 - .../test_create_organization201_response.py | 51 - .../test/test_create_organization_request.py | 51 - sdk/python/src/test/test_disable_request.py | 51 - sdk/python/src/test/test_enable_request.py | 52 - sdk/python/src/test/test_environment.py | 62 - .../test/test_environment_and_resources.py | 94 - sdk/python/src/test/test_environment_api.py | 43 - sdk/python/src/test/test_frontend.py | 59 - .../test/test_get_sparklines200_response.py | 62 - .../src/test/test_get_sparklines_request.py | 57 - sdk/python/src/test/test_invite_request.py | 52 - .../test_invite_token_generate_request.py | 53 - .../test_list_frontends200_response_inner.py | 56 - .../test/test_list_memberships200_response.py | 56 - ...mberships200_response_memberships_inner.py | 53 - ...t_list_organization_members200_response.py | 55 - ...ation_members200_response_members_inner.py | 52 - .../test_list_organizations200_response.py | 55 - ...zations200_response_organizations_inner.py | 52 - sdk/python/src/test/test_login_request.py | 52 - sdk/python/src/test/test_metadata_api.py | 127 - sdk/python/src/test/test_metrics.py | 59 - sdk/python/src/test/test_metrics_sample.py | 53 - sdk/python/src/test/test_overview.py | 93 - sdk/python/src/test/test_principal.py | 55 - ...st_regenerate_account_token200_response.py | 51 - .../test_regenerate_account_token_request.py | 51 - sdk/python/src/test/test_register_request.py | 52 - ...test_remove_organization_member_request.py | 52 - .../src/test/test_reset_password_request.py | 52 - sdk/python/src/test/test_share.py | 66 - sdk/python/src/test/test_share_api.py | 67 - sdk/python/src/test/test_share_request.py | 74 - sdk/python/src/test/test_share_response.py | 54 - sdk/python/src/test/test_spark_data_sample.py | 52 - sdk/python/src/test/test_unaccess_request.py | 53 - sdk/python/src/test/test_unshare_request.py | 53 - .../src/test/test_update_access_request.py | 53 - .../src/test/test_update_frontend_request.py | 53 - .../src/test/test_update_share_request.py | 58 - .../src/test/test_verify200_response.py | 51 - sdk/python/src/test/test_verify_request.py | 51 - .../test_version_inventory200_response.py | 51 - sdk/python/src/zrok_api/__init__.py | 88 - sdk/python/src/zrok_api/api/__init__.py | 9 - sdk/python/src/zrok_api/api/account_api.py | 2261 --------- sdk/python/src/zrok_api/api/admin_api.py | 3855 --------------- .../src/zrok_api/api/environment_api.py | 589 --- sdk/python/src/zrok_api/api/metadata_api.py | 4242 ----------------- sdk/python/src/zrok_api/api/share_api.py | 1712 ------- sdk/python/src/zrok_api/api_client.py | 797 ---- sdk/python/src/zrok_api/api_response.py | 21 - sdk/python/src/zrok_api/configuration.py | 602 --- sdk/python/src/zrok_api/exceptions.py | 216 - sdk/python/src/zrok_api/models/__init__.py | 67 - .../src/zrok_api/models/access201_response.py | 89 - .../src/zrok_api/models/access_request.py | 93 - .../models/add_organization_member_request.py | 91 - sdk/python/src/zrok_api/models/auth_user.py | 89 - .../models/change_password_request.py | 91 - .../models/client_version_check_request.py | 87 - .../src/zrok_api/models/configuration.py | 95 - .../models/create_frontend201_response.py | 87 - .../models/create_frontend_request.py | 103 - .../models/create_identity201_response.py | 89 - .../models/create_identity_request.py | 87 - .../models/create_organization201_response.py | 87 - .../models/create_organization_request.py | 87 - .../src/zrok_api/models/disable_request.py | 87 - .../src/zrok_api/models/enable_request.py | 89 - sdk/python/src/zrok_api/models/environment.py | 109 - .../models/environment_and_resources.py | 111 - sdk/python/src/zrok_api/models/frontend.py | 103 - .../models/get_sparklines200_response.py | 95 - .../zrok_api/models/get_sparklines_request.py | 91 - .../src/zrok_api/models/invite_request.py | 89 - .../models/invite_token_generate_request.py | 87 - .../list_frontends200_response_inner.py | 97 - .../models/list_memberships200_response.py | 95 - ...mberships200_response_memberships_inner.py | 91 - .../list_organization_members200_response.py | 95 - ...ation_members200_response_members_inner.py | 89 - .../models/list_organizations200_response.py | 95 - ...zations200_response_organizations_inner.py | 89 - .../src/zrok_api/models/login_request.py | 89 - sdk/python/src/zrok_api/models/metrics.py | 101 - .../src/zrok_api/models/metrics_sample.py | 91 - sdk/python/src/zrok_api/models/overview.py | 97 - sdk/python/src/zrok_api/models/principal.py | 95 - .../regenerate_account_token200_response.py | 87 - .../regenerate_account_token_request.py | 87 - .../src/zrok_api/models/register_request.py | 89 - .../remove_organization_member_request.py | 89 - .../zrok_api/models/reset_password_request.py | 89 - sdk/python/src/zrok_api/models/share.py | 117 - .../src/zrok_api/models/share_request.py | 161 - .../src/zrok_api/models/share_response.py | 89 - .../src/zrok_api/models/spark_data_sample.py | 89 - .../src/zrok_api/models/unaccess_request.py | 91 - .../src/zrok_api/models/unshare_request.py | 91 - .../zrok_api/models/update_access_request.py | 91 - .../models/update_frontend_request.py | 91 - .../zrok_api/models/update_share_request.py | 93 - .../src/zrok_api/models/verify200_response.py | 87 - .../src/zrok_api/models/verify_request.py | 87 - .../models/version_inventory200_response.py | 87 - sdk/python/src/zrok_api/py.typed | 0 sdk/python/src/zrok_api/rest.py | 258 - 180 files changed, 28063 deletions(-) delete mode 100644 sdk/python/src/.gitignore delete mode 100644 sdk/python/src/README.md delete mode 100644 sdk/python/src/docs/Access201Response.md delete mode 100644 sdk/python/src/docs/AccessRequest.md delete mode 100644 sdk/python/src/docs/AccountApi.md delete mode 100644 sdk/python/src/docs/AddOrganizationMemberRequest.md delete mode 100644 sdk/python/src/docs/AdminApi.md delete mode 100644 sdk/python/src/docs/AuthUser.md delete mode 100644 sdk/python/src/docs/ChangePasswordRequest.md delete mode 100644 sdk/python/src/docs/ClientVersionCheckRequest.md delete mode 100644 sdk/python/src/docs/Configuration.md delete mode 100644 sdk/python/src/docs/CreateFrontend201Response.md delete mode 100644 sdk/python/src/docs/CreateFrontendRequest.md delete mode 100644 sdk/python/src/docs/CreateIdentity201Response.md delete mode 100644 sdk/python/src/docs/CreateIdentityRequest.md delete mode 100644 sdk/python/src/docs/CreateOrganization201Response.md delete mode 100644 sdk/python/src/docs/CreateOrganizationRequest.md delete mode 100644 sdk/python/src/docs/DisableRequest.md delete mode 100644 sdk/python/src/docs/EnableRequest.md delete mode 100644 sdk/python/src/docs/Environment.md delete mode 100644 sdk/python/src/docs/EnvironmentAndResources.md delete mode 100644 sdk/python/src/docs/EnvironmentApi.md delete mode 100644 sdk/python/src/docs/Frontend.md delete mode 100644 sdk/python/src/docs/GetSparklines200Response.md delete mode 100644 sdk/python/src/docs/GetSparklinesRequest.md delete mode 100644 sdk/python/src/docs/InviteRequest.md delete mode 100644 sdk/python/src/docs/InviteTokenGenerateRequest.md delete mode 100644 sdk/python/src/docs/ListFrontends200ResponseInner.md delete mode 100644 sdk/python/src/docs/ListMemberships200Response.md delete mode 100644 sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md delete mode 100644 sdk/python/src/docs/ListOrganizationMembers200Response.md delete mode 100644 sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md delete mode 100644 sdk/python/src/docs/ListOrganizations200Response.md delete mode 100644 sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md delete mode 100644 sdk/python/src/docs/LoginRequest.md delete mode 100644 sdk/python/src/docs/MetadataApi.md delete mode 100644 sdk/python/src/docs/Metrics.md delete mode 100644 sdk/python/src/docs/MetricsSample.md delete mode 100644 sdk/python/src/docs/Overview.md delete mode 100644 sdk/python/src/docs/Principal.md delete mode 100644 sdk/python/src/docs/RegenerateAccountToken200Response.md delete mode 100644 sdk/python/src/docs/RegenerateAccountTokenRequest.md delete mode 100644 sdk/python/src/docs/RegisterRequest.md delete mode 100644 sdk/python/src/docs/RemoveOrganizationMemberRequest.md delete mode 100644 sdk/python/src/docs/ResetPasswordRequest.md delete mode 100644 sdk/python/src/docs/Share.md delete mode 100644 sdk/python/src/docs/ShareApi.md delete mode 100644 sdk/python/src/docs/ShareRequest.md delete mode 100644 sdk/python/src/docs/ShareResponse.md delete mode 100644 sdk/python/src/docs/SparkDataSample.md delete mode 100644 sdk/python/src/docs/UnaccessRequest.md delete mode 100644 sdk/python/src/docs/UnshareRequest.md delete mode 100644 sdk/python/src/docs/UpdateAccessRequest.md delete mode 100644 sdk/python/src/docs/UpdateFrontendRequest.md delete mode 100644 sdk/python/src/docs/UpdateShareRequest.md delete mode 100644 sdk/python/src/docs/Verify200Response.md delete mode 100644 sdk/python/src/docs/VerifyRequest.md delete mode 100644 sdk/python/src/docs/VersionInventory200Response.md delete mode 100644 sdk/python/src/test/__init__.py delete mode 100644 sdk/python/src/test/test_access201_response.py delete mode 100644 sdk/python/src/test/test_access_request.py delete mode 100644 sdk/python/src/test/test_account_api.py delete mode 100644 sdk/python/src/test/test_add_organization_member_request.py delete mode 100644 sdk/python/src/test/test_admin_api.py delete mode 100644 sdk/python/src/test/test_auth_user.py delete mode 100644 sdk/python/src/test/test_change_password_request.py delete mode 100644 sdk/python/src/test/test_client_version_check_request.py delete mode 100644 sdk/python/src/test/test_configuration.py delete mode 100644 sdk/python/src/test/test_create_frontend201_response.py delete mode 100644 sdk/python/src/test/test_create_frontend_request.py delete mode 100644 sdk/python/src/test/test_create_identity201_response.py delete mode 100644 sdk/python/src/test/test_create_identity_request.py delete mode 100644 sdk/python/src/test/test_create_organization201_response.py delete mode 100644 sdk/python/src/test/test_create_organization_request.py delete mode 100644 sdk/python/src/test/test_disable_request.py delete mode 100644 sdk/python/src/test/test_enable_request.py delete mode 100644 sdk/python/src/test/test_environment.py delete mode 100644 sdk/python/src/test/test_environment_and_resources.py delete mode 100644 sdk/python/src/test/test_environment_api.py delete mode 100644 sdk/python/src/test/test_frontend.py delete mode 100644 sdk/python/src/test/test_get_sparklines200_response.py delete mode 100644 sdk/python/src/test/test_get_sparklines_request.py delete mode 100644 sdk/python/src/test/test_invite_request.py delete mode 100644 sdk/python/src/test/test_invite_token_generate_request.py delete mode 100644 sdk/python/src/test/test_list_frontends200_response_inner.py delete mode 100644 sdk/python/src/test/test_list_memberships200_response.py delete mode 100644 sdk/python/src/test/test_list_memberships200_response_memberships_inner.py delete mode 100644 sdk/python/src/test/test_list_organization_members200_response.py delete mode 100644 sdk/python/src/test/test_list_organization_members200_response_members_inner.py delete mode 100644 sdk/python/src/test/test_list_organizations200_response.py delete mode 100644 sdk/python/src/test/test_list_organizations200_response_organizations_inner.py delete mode 100644 sdk/python/src/test/test_login_request.py delete mode 100644 sdk/python/src/test/test_metadata_api.py delete mode 100644 sdk/python/src/test/test_metrics.py delete mode 100644 sdk/python/src/test/test_metrics_sample.py delete mode 100644 sdk/python/src/test/test_overview.py delete mode 100644 sdk/python/src/test/test_principal.py delete mode 100644 sdk/python/src/test/test_regenerate_account_token200_response.py delete mode 100644 sdk/python/src/test/test_regenerate_account_token_request.py delete mode 100644 sdk/python/src/test/test_register_request.py delete mode 100644 sdk/python/src/test/test_remove_organization_member_request.py delete mode 100644 sdk/python/src/test/test_reset_password_request.py delete mode 100644 sdk/python/src/test/test_share.py delete mode 100644 sdk/python/src/test/test_share_api.py delete mode 100644 sdk/python/src/test/test_share_request.py delete mode 100644 sdk/python/src/test/test_share_response.py delete mode 100644 sdk/python/src/test/test_spark_data_sample.py delete mode 100644 sdk/python/src/test/test_unaccess_request.py delete mode 100644 sdk/python/src/test/test_unshare_request.py delete mode 100644 sdk/python/src/test/test_update_access_request.py delete mode 100644 sdk/python/src/test/test_update_frontend_request.py delete mode 100644 sdk/python/src/test/test_update_share_request.py delete mode 100644 sdk/python/src/test/test_verify200_response.py delete mode 100644 sdk/python/src/test/test_verify_request.py delete mode 100644 sdk/python/src/test/test_version_inventory200_response.py delete mode 100644 sdk/python/src/zrok_api/__init__.py delete mode 100644 sdk/python/src/zrok_api/api/__init__.py delete mode 100644 sdk/python/src/zrok_api/api/account_api.py delete mode 100644 sdk/python/src/zrok_api/api/admin_api.py delete mode 100644 sdk/python/src/zrok_api/api/environment_api.py delete mode 100644 sdk/python/src/zrok_api/api/metadata_api.py delete mode 100644 sdk/python/src/zrok_api/api/share_api.py delete mode 100644 sdk/python/src/zrok_api/api_client.py delete mode 100644 sdk/python/src/zrok_api/api_response.py delete mode 100644 sdk/python/src/zrok_api/configuration.py delete mode 100644 sdk/python/src/zrok_api/exceptions.py delete mode 100644 sdk/python/src/zrok_api/models/__init__.py delete mode 100644 sdk/python/src/zrok_api/models/access201_response.py delete mode 100644 sdk/python/src/zrok_api/models/access_request.py delete mode 100644 sdk/python/src/zrok_api/models/add_organization_member_request.py delete mode 100644 sdk/python/src/zrok_api/models/auth_user.py delete mode 100644 sdk/python/src/zrok_api/models/change_password_request.py delete mode 100644 sdk/python/src/zrok_api/models/client_version_check_request.py delete mode 100644 sdk/python/src/zrok_api/models/configuration.py delete mode 100644 sdk/python/src/zrok_api/models/create_frontend201_response.py delete mode 100644 sdk/python/src/zrok_api/models/create_frontend_request.py delete mode 100644 sdk/python/src/zrok_api/models/create_identity201_response.py delete mode 100644 sdk/python/src/zrok_api/models/create_identity_request.py delete mode 100644 sdk/python/src/zrok_api/models/create_organization201_response.py delete mode 100644 sdk/python/src/zrok_api/models/create_organization_request.py delete mode 100644 sdk/python/src/zrok_api/models/disable_request.py delete mode 100644 sdk/python/src/zrok_api/models/enable_request.py delete mode 100644 sdk/python/src/zrok_api/models/environment.py delete mode 100644 sdk/python/src/zrok_api/models/environment_and_resources.py delete mode 100644 sdk/python/src/zrok_api/models/frontend.py delete mode 100644 sdk/python/src/zrok_api/models/get_sparklines200_response.py delete mode 100644 sdk/python/src/zrok_api/models/get_sparklines_request.py delete mode 100644 sdk/python/src/zrok_api/models/invite_request.py delete mode 100644 sdk/python/src/zrok_api/models/invite_token_generate_request.py delete mode 100644 sdk/python/src/zrok_api/models/list_frontends200_response_inner.py delete mode 100644 sdk/python/src/zrok_api/models/list_memberships200_response.py delete mode 100644 sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py delete mode 100644 sdk/python/src/zrok_api/models/list_organization_members200_response.py delete mode 100644 sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py delete mode 100644 sdk/python/src/zrok_api/models/list_organizations200_response.py delete mode 100644 sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py delete mode 100644 sdk/python/src/zrok_api/models/login_request.py delete mode 100644 sdk/python/src/zrok_api/models/metrics.py delete mode 100644 sdk/python/src/zrok_api/models/metrics_sample.py delete mode 100644 sdk/python/src/zrok_api/models/overview.py delete mode 100644 sdk/python/src/zrok_api/models/principal.py delete mode 100644 sdk/python/src/zrok_api/models/regenerate_account_token200_response.py delete mode 100644 sdk/python/src/zrok_api/models/regenerate_account_token_request.py delete mode 100644 sdk/python/src/zrok_api/models/register_request.py delete mode 100644 sdk/python/src/zrok_api/models/remove_organization_member_request.py delete mode 100644 sdk/python/src/zrok_api/models/reset_password_request.py delete mode 100644 sdk/python/src/zrok_api/models/share.py delete mode 100644 sdk/python/src/zrok_api/models/share_request.py delete mode 100644 sdk/python/src/zrok_api/models/share_response.py delete mode 100644 sdk/python/src/zrok_api/models/spark_data_sample.py delete mode 100644 sdk/python/src/zrok_api/models/unaccess_request.py delete mode 100644 sdk/python/src/zrok_api/models/unshare_request.py delete mode 100644 sdk/python/src/zrok_api/models/update_access_request.py delete mode 100644 sdk/python/src/zrok_api/models/update_frontend_request.py delete mode 100644 sdk/python/src/zrok_api/models/update_share_request.py delete mode 100644 sdk/python/src/zrok_api/models/verify200_response.py delete mode 100644 sdk/python/src/zrok_api/models/verify_request.py delete mode 100644 sdk/python/src/zrok_api/models/version_inventory200_response.py delete mode 100644 sdk/python/src/zrok_api/py.typed delete mode 100644 sdk/python/src/zrok_api/rest.py diff --git a/sdk/python/src/.gitignore b/sdk/python/src/.gitignore deleted file mode 100644 index 43995bd4..00000000 --- a/sdk/python/src/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/sdk/python/src/README.md b/sdk/python/src/README.md deleted file mode 100644 index 25ad2fe6..00000000 --- a/sdk/python/src/README.md +++ /dev/null @@ -1,215 +0,0 @@ -# zrok -zrok client access - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Package version: 1.0.0 -- Generator version: 7.12.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -Python 3.8+ - -## Installation & Usage -### pip install - -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 -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import zrok_api -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import zrok_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) - - try: - api_instance.change_password(body=body) - except ApiException as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to */api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AccountApi* | [**change_password**](docs/AccountApi.md#change_password) | **POST** /changePassword | -*AccountApi* | [**invite**](docs/AccountApi.md#invite) | **POST** /invite | -*AccountApi* | [**login**](docs/AccountApi.md#login) | **POST** /login | -*AccountApi* | [**regenerate_account_token**](docs/AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | -*AccountApi* | [**register**](docs/AccountApi.md#register) | **POST** /register | -*AccountApi* | [**reset_password**](docs/AccountApi.md#reset_password) | **POST** /resetPassword | -*AccountApi* | [**reset_password_request**](docs/AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | -*AccountApi* | [**verify**](docs/AccountApi.md#verify) | **POST** /verify | -*AdminApi* | [**add_organization_member**](docs/AdminApi.md#add_organization_member) | **POST** /organization/add | -*AdminApi* | [**create_account**](docs/AdminApi.md#create_account) | **POST** /account | -*AdminApi* | [**create_frontend**](docs/AdminApi.md#create_frontend) | **POST** /frontend | -*AdminApi* | [**create_identity**](docs/AdminApi.md#create_identity) | **POST** /identity | -*AdminApi* | [**create_organization**](docs/AdminApi.md#create_organization) | **POST** /organization | -*AdminApi* | [**delete_frontend**](docs/AdminApi.md#delete_frontend) | **DELETE** /frontend | -*AdminApi* | [**delete_organization**](docs/AdminApi.md#delete_organization) | **DELETE** /organization | -*AdminApi* | [**grants**](docs/AdminApi.md#grants) | **POST** /grants | -*AdminApi* | [**invite_token_generate**](docs/AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | -*AdminApi* | [**list_frontends**](docs/AdminApi.md#list_frontends) | **GET** /frontends | -*AdminApi* | [**list_organization_members**](docs/AdminApi.md#list_organization_members) | **POST** /organization/list | -*AdminApi* | [**list_organizations**](docs/AdminApi.md#list_organizations) | **GET** /organizations | -*AdminApi* | [**remove_organization_member**](docs/AdminApi.md#remove_organization_member) | **POST** /organization/remove | -*AdminApi* | [**update_frontend**](docs/AdminApi.md#update_frontend) | **PATCH** /frontend | -*EnvironmentApi* | [**disable**](docs/EnvironmentApi.md#disable) | **POST** /disable | -*EnvironmentApi* | [**enable**](docs/EnvironmentApi.md#enable) | **POST** /enable | -*MetadataApi* | [**client_version_check**](docs/MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | -*MetadataApi* | [**configuration**](docs/MetadataApi.md#configuration) | **GET** /configuration | -*MetadataApi* | [**get_account_detail**](docs/MetadataApi.md#get_account_detail) | **GET** /detail/account | -*MetadataApi* | [**get_account_metrics**](docs/MetadataApi.md#get_account_metrics) | **GET** /metrics/account | -*MetadataApi* | [**get_environment_detail**](docs/MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | -*MetadataApi* | [**get_environment_metrics**](docs/MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | -*MetadataApi* | [**get_frontend_detail**](docs/MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | -*MetadataApi* | [**get_share_detail**](docs/MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | -*MetadataApi* | [**get_share_metrics**](docs/MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | -*MetadataApi* | [**get_sparklines**](docs/MetadataApi.md#get_sparklines) | **POST** /sparklines | -*MetadataApi* | [**list_memberships**](docs/MetadataApi.md#list_memberships) | **GET** /memberships | -*MetadataApi* | [**list_org_members**](docs/MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | -*MetadataApi* | [**org_account_overview**](docs/MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | -*MetadataApi* | [**overview**](docs/MetadataApi.md#overview) | **GET** /overview | -*MetadataApi* | [**version**](docs/MetadataApi.md#version) | **GET** /version | -*MetadataApi* | [**version_inventory**](docs/MetadataApi.md#version_inventory) | **GET** /versions | -*ShareApi* | [**access**](docs/ShareApi.md#access) | **POST** /access | -*ShareApi* | [**share**](docs/ShareApi.md#share) | **POST** /share | -*ShareApi* | [**unaccess**](docs/ShareApi.md#unaccess) | **DELETE** /unaccess | -*ShareApi* | [**unshare**](docs/ShareApi.md#unshare) | **DELETE** /unshare | -*ShareApi* | [**update_access**](docs/ShareApi.md#update_access) | **PATCH** /access | -*ShareApi* | [**update_share**](docs/ShareApi.md#update_share) | **PATCH** /share | - - -## Documentation For Models - - - [Access201Response](docs/Access201Response.md) - - [AccessRequest](docs/AccessRequest.md) - - [AddOrganizationMemberRequest](docs/AddOrganizationMemberRequest.md) - - [AuthUser](docs/AuthUser.md) - - [ChangePasswordRequest](docs/ChangePasswordRequest.md) - - [ClientVersionCheckRequest](docs/ClientVersionCheckRequest.md) - - [Configuration](docs/Configuration.md) - - [CreateFrontend201Response](docs/CreateFrontend201Response.md) - - [CreateFrontendRequest](docs/CreateFrontendRequest.md) - - [CreateIdentity201Response](docs/CreateIdentity201Response.md) - - [CreateIdentityRequest](docs/CreateIdentityRequest.md) - - [CreateOrganization201Response](docs/CreateOrganization201Response.md) - - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md) - - [DisableRequest](docs/DisableRequest.md) - - [EnableRequest](docs/EnableRequest.md) - - [Environment](docs/Environment.md) - - [EnvironmentAndResources](docs/EnvironmentAndResources.md) - - [Frontend](docs/Frontend.md) - - [GetSparklines200Response](docs/GetSparklines200Response.md) - - [GetSparklinesRequest](docs/GetSparklinesRequest.md) - - [InviteRequest](docs/InviteRequest.md) - - [InviteTokenGenerateRequest](docs/InviteTokenGenerateRequest.md) - - [ListFrontends200ResponseInner](docs/ListFrontends200ResponseInner.md) - - [ListMemberships200Response](docs/ListMemberships200Response.md) - - [ListMemberships200ResponseMembershipsInner](docs/ListMemberships200ResponseMembershipsInner.md) - - [ListOrganizationMembers200Response](docs/ListOrganizationMembers200Response.md) - - [ListOrganizationMembers200ResponseMembersInner](docs/ListOrganizationMembers200ResponseMembersInner.md) - - [ListOrganizations200Response](docs/ListOrganizations200Response.md) - - [ListOrganizations200ResponseOrganizationsInner](docs/ListOrganizations200ResponseOrganizationsInner.md) - - [LoginRequest](docs/LoginRequest.md) - - [Metrics](docs/Metrics.md) - - [MetricsSample](docs/MetricsSample.md) - - [Overview](docs/Overview.md) - - [Principal](docs/Principal.md) - - [RegenerateAccountToken200Response](docs/RegenerateAccountToken200Response.md) - - [RegenerateAccountTokenRequest](docs/RegenerateAccountTokenRequest.md) - - [RegisterRequest](docs/RegisterRequest.md) - - [RemoveOrganizationMemberRequest](docs/RemoveOrganizationMemberRequest.md) - - [ResetPasswordRequest](docs/ResetPasswordRequest.md) - - [Share](docs/Share.md) - - [ShareRequest](docs/ShareRequest.md) - - [ShareResponse](docs/ShareResponse.md) - - [SparkDataSample](docs/SparkDataSample.md) - - [UnaccessRequest](docs/UnaccessRequest.md) - - [UnshareRequest](docs/UnshareRequest.md) - - [UpdateAccessRequest](docs/UpdateAccessRequest.md) - - [UpdateFrontendRequest](docs/UpdateFrontendRequest.md) - - [UpdateShareRequest](docs/UpdateShareRequest.md) - - [Verify200Response](docs/Verify200Response.md) - - [VerifyRequest](docs/VerifyRequest.md) - - [VersionInventory200Response](docs/VersionInventory200Response.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### key - -- **Type**: API key -- **API key parameter name**: x-token -- **Location**: HTTP header - - -## Author - - - - diff --git a/sdk/python/src/docs/Access201Response.md b/sdk/python/src/docs/Access201Response.md deleted file mode 100644 index bc12a97a..00000000 --- a/sdk/python/src/docs/Access201Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# Access201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**backend_mode** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.access201_response import Access201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of Access201Response from a JSON string -access201_response_instance = Access201Response.from_json(json) -# print the JSON string representation of the object -print(Access201Response.to_json()) - -# convert the object into a dict -access201_response_dict = access201_response_instance.to_dict() -# create an instance of Access201Response from a dict -access201_response_from_dict = Access201Response.from_dict(access201_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/sdk/python/src/docs/AccessRequest.md b/sdk/python/src/docs/AccessRequest.md deleted file mode 100644 index 288b82ae..00000000 --- a/sdk/python/src/docs/AccessRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# AccessRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.access_request import AccessRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of AccessRequest from a JSON string -access_request_instance = AccessRequest.from_json(json) -# print the JSON string representation of the object -print(AccessRequest.to_json()) - -# convert the object into a dict -access_request_dict = access_request_instance.to_dict() -# create an instance of AccessRequest from a dict -access_request_from_dict = AccessRequest.from_dict(access_request_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/sdk/python/src/docs/AccountApi.md b/sdk/python/src/docs/AccountApi.md deleted file mode 100644 index cb6a3e97..00000000 --- a/sdk/python/src/docs/AccountApi.md +++ /dev/null @@ -1,557 +0,0 @@ -# zrok_api.AccountApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**change_password**](AccountApi.md#change_password) | **POST** /changePassword | -[**invite**](AccountApi.md#invite) | **POST** /invite | -[**login**](AccountApi.md#login) | **POST** /login | -[**regenerate_account_token**](AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | -[**register**](AccountApi.md#register) | **POST** /register | -[**reset_password**](AccountApi.md#reset_password) | **POST** /resetPassword | -[**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | -[**verify**](AccountApi.md#verify) | **POST** /verify | - - -# **change_password** -> change_password(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) - - try: - api_instance.change_password(body=body) - except Exception as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ChangePasswordRequest**](ChangePasswordRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | password changed | - | -**400** | password not changed | - | -**401** | unauthorized | - | -**422** | password validation failure | - | -**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) - -# **invite** -> invite(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.invite_request import InviteRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.InviteRequest() # InviteRequest | (optional) - - try: - api_instance.invite(body=body) - except Exception as e: - print("Exception when calling AccountApi->invite: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**InviteRequest**](InviteRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | invitation created | - | -**400** | invitation not created (already exists) | - | -**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) - -# **login** -> str login(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.login_request import LoginRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.LoginRequest() # LoginRequest | (optional) - - try: - api_response = api_instance.login(body=body) - print("The response of AccountApi->login:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->login: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**LoginRequest**](LoginRequest.md)| | [optional] - -### Return type - -**str** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | login successful | - | -**401** | invalid login | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **regenerate_account_token** -> RegenerateAccountToken200Response regenerate_account_token(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) - - try: - api_response = api_instance.regenerate_account_token(body=body) - print("The response of AccountApi->regenerate_account_token:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] - -### Return type - -[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | regenerate account token | - | -**404** | account 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) - -# **register** -> RegenerateAccountToken200Response register(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.register_request import RegisterRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.RegisterRequest() # RegisterRequest | (optional) - - try: - api_response = api_instance.register(body=body) - print("The response of AccountApi->register:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->register: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegisterRequest**](RegisterRequest.md)| | [optional] - -### Return type - -[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | account created | - | -**404** | request not found | - | -**422** | password validation failure | - | -**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) - -# **reset_password** -> reset_password(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.ResetPasswordRequest() # ResetPasswordRequest | (optional) - - try: - api_instance.reset_password(body=body) - except Exception as e: - print("Exception when calling AccountApi->reset_password: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ResetPasswordRequest**](ResetPasswordRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | password reset | - | -**404** | request not found | - | -**422** | password validation failure | - | -**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) - -# **reset_password_request** -> reset_password_request(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) - - try: - api_instance.reset_password_request(body=body) - except Exception as e: - print("Exception when calling AccountApi->reset_password_request: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | reset password request created | - | -**400** | reset password request not created | - | -**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) - -# **verify** -> Verify200Response verify(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.VerifyRequest() # VerifyRequest | (optional) - - try: - api_response = api_instance.verify(body=body) - print("The response of AccountApi->verify:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->verify: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**VerifyRequest**](VerifyRequest.md)| | [optional] - -### Return type - -[**Verify200Response**](Verify200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | registration token ready | - | -**404** | registration token 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/sdk/python/src/docs/AddOrganizationMemberRequest.md b/sdk/python/src/docs/AddOrganizationMemberRequest.md deleted file mode 100644 index c866784a..00000000 --- a/sdk/python/src/docs/AddOrganizationMemberRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# AddOrganizationMemberRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of AddOrganizationMemberRequest from a JSON string -add_organization_member_request_instance = AddOrganizationMemberRequest.from_json(json) -# print the JSON string representation of the object -print(AddOrganizationMemberRequest.to_json()) - -# convert the object into a dict -add_organization_member_request_dict = add_organization_member_request_instance.to_dict() -# create an instance of AddOrganizationMemberRequest from a dict -add_organization_member_request_from_dict = AddOrganizationMemberRequest.from_dict(add_organization_member_request_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/sdk/python/src/docs/AdminApi.md b/sdk/python/src/docs/AdminApi.md deleted file mode 100644 index 7eec6028..00000000 --- a/sdk/python/src/docs/AdminApi.md +++ /dev/null @@ -1,1079 +0,0 @@ -# zrok_api.AdminApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_organization_member**](AdminApi.md#add_organization_member) | **POST** /organization/add | -[**create_account**](AdminApi.md#create_account) | **POST** /account | -[**create_frontend**](AdminApi.md#create_frontend) | **POST** /frontend | -[**create_identity**](AdminApi.md#create_identity) | **POST** /identity | -[**create_organization**](AdminApi.md#create_organization) | **POST** /organization | -[**delete_frontend**](AdminApi.md#delete_frontend) | **DELETE** /frontend | -[**delete_organization**](AdminApi.md#delete_organization) | **DELETE** /organization | -[**grants**](AdminApi.md#grants) | **POST** /grants | -[**invite_token_generate**](AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | -[**list_frontends**](AdminApi.md#list_frontends) | **GET** /frontends | -[**list_organization_members**](AdminApi.md#list_organization_members) | **POST** /organization/list | -[**list_organizations**](AdminApi.md#list_organizations) | **GET** /organizations | -[**remove_organization_member**](AdminApi.md#remove_organization_member) | **POST** /organization/remove | -[**update_frontend**](AdminApi.md#update_frontend) | **PATCH** /frontend | - - -# **add_organization_member** -> add_organization_member(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.AddOrganizationMemberRequest() # AddOrganizationMemberRequest | (optional) - - try: - api_instance.add_organization_member(body=body) - except Exception as e: - print("Exception when calling AdminApi->add_organization_member: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AddOrganizationMemberRequest**](AddOrganizationMemberRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | member added | - | -**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_account** -> RegenerateAccountToken200Response create_account(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.LoginRequest() # LoginRequest | (optional) - - try: - api_response = api_instance.create_account(body=body) - print("The response of AdminApi->create_account:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_account: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**LoginRequest**](LoginRequest.md)| | [optional] - -### Return type - -[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | created | - | -**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) - -# **create_frontend** -> CreateFrontend201Response create_frontend(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateFrontendRequest() # CreateFrontendRequest | (optional) - - try: - api_response = api_instance.create_frontend(body=body) - print("The response of AdminApi->create_frontend:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_frontend: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateFrontendRequest**](CreateFrontendRequest.md)| | [optional] - -### Return type - -[**CreateFrontend201Response**](CreateFrontend201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | frontend created | - | -**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_identity** -> CreateIdentity201Response create_identity(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateIdentityRequest() # CreateIdentityRequest | (optional) - - try: - api_response = api_instance.create_identity(body=body) - print("The response of AdminApi->create_identity:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_identity: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateIdentityRequest**](CreateIdentityRequest.md)| | [optional] - -### Return type - -[**CreateIdentity201Response**](CreateIdentity201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | created | - | -**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) - -# **create_organization** -> CreateOrganization201Response create_organization(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateOrganizationRequest() # CreateOrganizationRequest | (optional) - - try: - api_response = api_instance.create_organization(body=body) - print("The response of AdminApi->create_organization:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_organization: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md)| | [optional] - -### Return type - -[**CreateOrganization201Response**](CreateOrganization201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | organization created | - | -**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) - -# **delete_frontend** -> delete_frontend(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateFrontend201Response() # CreateFrontend201Response | (optional) - - try: - api_instance.delete_frontend(body=body) - except Exception as e: - print("Exception when calling AdminApi->delete_frontend: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateFrontend201Response**](CreateFrontend201Response.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | frontend deleted | - | -**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) - -# **delete_organization** -> delete_organization(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) - - try: - api_instance.delete_organization(body=body) - except Exception as e: - print("Exception when calling AdminApi->delete_organization: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | organization deleted | - | -**401** | unauthorized | - | -**404** | organization 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) - -# **grants** -> grants(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.Verify200Response() # Verify200Response | (optional) - - try: - api_instance.grants(body=body) - except Exception as e: - print("Exception when calling AdminApi->grants: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Verify200Response**](Verify200Response.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **invite_token_generate** -> invite_token_generate(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.InviteTokenGenerateRequest() # InviteTokenGenerateRequest | (optional) - - try: - api_instance.invite_token_generate(body=body) - except Exception as e: - print("Exception when calling AdminApi->invite_token_generate: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**InviteTokenGenerateRequest**](InviteTokenGenerateRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | invite tokens created | - | -**400** | invite tokens not created | - | -**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) - -# **list_frontends** -> List[ListFrontends200ResponseInner] list_frontends() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - - try: - api_response = api_instance.list_frontends() - print("The response of AdminApi->list_frontends:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->list_frontends: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[ListFrontends200ResponseInner]**](ListFrontends200ResponseInner.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **list_organization_members** -> ListOrganizationMembers200Response list_organization_members(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) - - try: - api_response = api_instance.list_organization_members(body=body) - print("The response of AdminApi->list_organization_members:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->list_organization_members: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] - -### Return type - -[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | list organization members | - | -**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_organizations** -> ListOrganizations200Response list_organizations() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - - try: - api_response = api_instance.list_organizations() - print("The response of AdminApi->list_organizations:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->list_organizations: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ListOrganizations200Response**](ListOrganizations200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **remove_organization_member** -> remove_organization_member(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.RemoveOrganizationMemberRequest() # RemoveOrganizationMemberRequest | (optional) - - try: - api_instance.remove_organization_member(body=body) - except Exception as e: - print("Exception when calling AdminApi->remove_organization_member: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RemoveOrganizationMemberRequest**](RemoveOrganizationMemberRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | member removed | - | -**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_frontend** -> update_frontend(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.UpdateFrontendRequest() # UpdateFrontendRequest | (optional) - - try: - api_instance.update_frontend(body=body) - except Exception as e: - print("Exception when calling AdminApi->update_frontend: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UpdateFrontendRequest**](UpdateFrontendRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | frontend updated | - | -**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/sdk/python/src/docs/AuthUser.md b/sdk/python/src/docs/AuthUser.md deleted file mode 100644 index 99960687..00000000 --- a/sdk/python/src/docs/AuthUser.md +++ /dev/null @@ -1,30 +0,0 @@ -# AuthUser - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.auth_user import AuthUser - -# TODO update the JSON string below -json = "{}" -# create an instance of AuthUser from a JSON string -auth_user_instance = AuthUser.from_json(json) -# print the JSON string representation of the object -print(AuthUser.to_json()) - -# convert the object into a dict -auth_user_dict = auth_user_instance.to_dict() -# create an instance of AuthUser from a dict -auth_user_from_dict = AuthUser.from_dict(auth_user_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/sdk/python/src/docs/ChangePasswordRequest.md b/sdk/python/src/docs/ChangePasswordRequest.md deleted file mode 100644 index 5fea099e..00000000 --- a/sdk/python/src/docs/ChangePasswordRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# ChangePasswordRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**old_password** | **str** | | [optional] -**new_password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.change_password_request import ChangePasswordRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ChangePasswordRequest from a JSON string -change_password_request_instance = ChangePasswordRequest.from_json(json) -# print the JSON string representation of the object -print(ChangePasswordRequest.to_json()) - -# convert the object into a dict -change_password_request_dict = change_password_request_instance.to_dict() -# create an instance of ChangePasswordRequest from a dict -change_password_request_from_dict = ChangePasswordRequest.from_dict(change_password_request_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/sdk/python/src/docs/ClientVersionCheckRequest.md b/sdk/python/src/docs/ClientVersionCheckRequest.md deleted file mode 100644 index 53d9e16e..00000000 --- a/sdk/python/src/docs/ClientVersionCheckRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# ClientVersionCheckRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ClientVersionCheckRequest from a JSON string -client_version_check_request_instance = ClientVersionCheckRequest.from_json(json) -# print the JSON string representation of the object -print(ClientVersionCheckRequest.to_json()) - -# convert the object into a dict -client_version_check_request_dict = client_version_check_request_instance.to_dict() -# create an instance of ClientVersionCheckRequest from a dict -client_version_check_request_from_dict = ClientVersionCheckRequest.from_dict(client_version_check_request_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/sdk/python/src/docs/Configuration.md b/sdk/python/src/docs/Configuration.md deleted file mode 100644 index 07eec945..00000000 --- a/sdk/python/src/docs/Configuration.md +++ /dev/null @@ -1,33 +0,0 @@ -# Configuration - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **str** | | [optional] -**tou_link** | **str** | | [optional] -**invites_open** | **bool** | | [optional] -**requires_invite_token** | **bool** | | [optional] -**invite_token_contact** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.configuration import Configuration - -# TODO update the JSON string below -json = "{}" -# create an instance of Configuration from a JSON string -configuration_instance = Configuration.from_json(json) -# print the JSON string representation of the object -print(Configuration.to_json()) - -# convert the object into a dict -configuration_dict = configuration_instance.to_dict() -# create an instance of Configuration from a dict -configuration_from_dict = Configuration.from_dict(configuration_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/sdk/python/src/docs/CreateFrontend201Response.md b/sdk/python/src/docs/CreateFrontend201Response.md deleted file mode 100644 index 7239add1..00000000 --- a/sdk/python/src/docs/CreateFrontend201Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateFrontend201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_frontend201_response import CreateFrontend201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateFrontend201Response from a JSON string -create_frontend201_response_instance = CreateFrontend201Response.from_json(json) -# print the JSON string representation of the object -print(CreateFrontend201Response.to_json()) - -# convert the object into a dict -create_frontend201_response_dict = create_frontend201_response_instance.to_dict() -# create an instance of CreateFrontend201Response from a dict -create_frontend201_response_from_dict = CreateFrontend201Response.from_dict(create_frontend201_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/sdk/python/src/docs/CreateFrontendRequest.md b/sdk/python/src/docs/CreateFrontendRequest.md deleted file mode 100644 index 63fe8779..00000000 --- a/sdk/python/src/docs/CreateFrontendRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# CreateFrontendRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**permission_mode** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_frontend_request import CreateFrontendRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateFrontendRequest from a JSON string -create_frontend_request_instance = CreateFrontendRequest.from_json(json) -# print the JSON string representation of the object -print(CreateFrontendRequest.to_json()) - -# convert the object into a dict -create_frontend_request_dict = create_frontend_request_instance.to_dict() -# create an instance of CreateFrontendRequest from a dict -create_frontend_request_from_dict = CreateFrontendRequest.from_dict(create_frontend_request_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/sdk/python/src/docs/CreateIdentity201Response.md b/sdk/python/src/docs/CreateIdentity201Response.md deleted file mode 100644 index 245275e2..00000000 --- a/sdk/python/src/docs/CreateIdentity201Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# CreateIdentity201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] -**cfg** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_identity201_response import CreateIdentity201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateIdentity201Response from a JSON string -create_identity201_response_instance = CreateIdentity201Response.from_json(json) -# print the JSON string representation of the object -print(CreateIdentity201Response.to_json()) - -# convert the object into a dict -create_identity201_response_dict = create_identity201_response_instance.to_dict() -# create an instance of CreateIdentity201Response from a dict -create_identity201_response_from_dict = CreateIdentity201Response.from_dict(create_identity201_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/sdk/python/src/docs/CreateIdentityRequest.md b/sdk/python/src/docs/CreateIdentityRequest.md deleted file mode 100644 index 50cb9457..00000000 --- a/sdk/python/src/docs/CreateIdentityRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateIdentityRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_identity_request import CreateIdentityRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateIdentityRequest from a JSON string -create_identity_request_instance = CreateIdentityRequest.from_json(json) -# print the JSON string representation of the object -print(CreateIdentityRequest.to_json()) - -# convert the object into a dict -create_identity_request_dict = create_identity_request_instance.to_dict() -# create an instance of CreateIdentityRequest from a dict -create_identity_request_from_dict = CreateIdentityRequest.from_dict(create_identity_request_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/sdk/python/src/docs/CreateOrganization201Response.md b/sdk/python/src/docs/CreateOrganization201Response.md deleted file mode 100644 index 26bc640c..00000000 --- a/sdk/python/src/docs/CreateOrganization201Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateOrganization201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_organization201_response import CreateOrganization201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateOrganization201Response from a JSON string -create_organization201_response_instance = CreateOrganization201Response.from_json(json) -# print the JSON string representation of the object -print(CreateOrganization201Response.to_json()) - -# convert the object into a dict -create_organization201_response_dict = create_organization201_response_instance.to_dict() -# create an instance of CreateOrganization201Response from a dict -create_organization201_response_from_dict = CreateOrganization201Response.from_dict(create_organization201_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/sdk/python/src/docs/CreateOrganizationRequest.md b/sdk/python/src/docs/CreateOrganizationRequest.md deleted file mode 100644 index 458e339b..00000000 --- a/sdk/python/src/docs/CreateOrganizationRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateOrganizationRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_organization_request import CreateOrganizationRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateOrganizationRequest from a JSON string -create_organization_request_instance = CreateOrganizationRequest.from_json(json) -# print the JSON string representation of the object -print(CreateOrganizationRequest.to_json()) - -# convert the object into a dict -create_organization_request_dict = create_organization_request_instance.to_dict() -# create an instance of CreateOrganizationRequest from a dict -create_organization_request_from_dict = CreateOrganizationRequest.from_dict(create_organization_request_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/sdk/python/src/docs/DisableRequest.md b/sdk/python/src/docs/DisableRequest.md deleted file mode 100644 index 4e4490f1..00000000 --- a/sdk/python/src/docs/DisableRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# DisableRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.disable_request import DisableRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of DisableRequest from a JSON string -disable_request_instance = DisableRequest.from_json(json) -# print the JSON string representation of the object -print(DisableRequest.to_json()) - -# convert the object into a dict -disable_request_dict = disable_request_instance.to_dict() -# create an instance of DisableRequest from a dict -disable_request_from_dict = DisableRequest.from_dict(disable_request_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/sdk/python/src/docs/EnableRequest.md b/sdk/python/src/docs/EnableRequest.md deleted file mode 100644 index 7720b3b9..00000000 --- a/sdk/python/src/docs/EnableRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# EnableRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**host** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.enable_request import EnableRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of EnableRequest from a JSON string -enable_request_instance = EnableRequest.from_json(json) -# print the JSON string representation of the object -print(EnableRequest.to_json()) - -# convert the object into a dict -enable_request_dict = enable_request_instance.to_dict() -# create an instance of EnableRequest from a dict -enable_request_from_dict = EnableRequest.from_dict(enable_request_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/sdk/python/src/docs/Environment.md b/sdk/python/src/docs/Environment.md deleted file mode 100644 index 44a9356b..00000000 --- a/sdk/python/src/docs/Environment.md +++ /dev/null @@ -1,36 +0,0 @@ -# Environment - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**host** | **str** | | [optional] -**address** | **str** | | [optional] -**z_id** | **str** | | [optional] -**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] -**limited** | **bool** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.environment import Environment - -# TODO update the JSON string below -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()) - -# convert the object into a dict -environment_dict = environment_instance.to_dict() -# create an instance of Environment from a dict -environment_from_dict = Environment.from_dict(environment_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/sdk/python/src/docs/EnvironmentAndResources.md b/sdk/python/src/docs/EnvironmentAndResources.md deleted file mode 100644 index a218ae3c..00000000 --- a/sdk/python/src/docs/EnvironmentAndResources.md +++ /dev/null @@ -1,31 +0,0 @@ -# EnvironmentAndResources - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**environment** | [**Environment**](Environment.md) | | [optional] -**frontends** | [**List[Frontend]**](Frontend.md) | | [optional] -**shares** | [**List[Share]**](Share.md) | | [optional] - -## Example - -```python -from zrok_api.models.environment_and_resources import EnvironmentAndResources - -# TODO update the JSON string below -json = "{}" -# create an instance of EnvironmentAndResources from a JSON string -environment_and_resources_instance = EnvironmentAndResources.from_json(json) -# print the JSON string representation of the object -print(EnvironmentAndResources.to_json()) - -# convert the object into a dict -environment_and_resources_dict = environment_and_resources_instance.to_dict() -# create an instance of EnvironmentAndResources from a dict -environment_and_resources_from_dict = EnvironmentAndResources.from_dict(environment_and_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/sdk/python/src/docs/EnvironmentApi.md b/sdk/python/src/docs/EnvironmentApi.md deleted file mode 100644 index a50ae1d3..00000000 --- a/sdk/python/src/docs/EnvironmentApi.md +++ /dev/null @@ -1,162 +0,0 @@ -# zrok_api.EnvironmentApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**disable**](EnvironmentApi.md#disable) | **POST** /disable | -[**enable**](EnvironmentApi.md#enable) | **POST** /enable | - - -# **disable** -> disable(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.disable_request import DisableRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.EnvironmentApi(api_client) - body = zrok_api.DisableRequest() # DisableRequest | (optional) - - try: - api_instance.disable(body=body) - except Exception as e: - print("Exception when calling EnvironmentApi->disable: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DisableRequest**](DisableRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | environment disabled | - | -**401** | invalid environment | - | -**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) - -# **enable** -> CreateIdentity201Response enable(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.enable_request import EnableRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.EnvironmentApi(api_client) - body = zrok_api.EnableRequest() # EnableRequest | (optional) - - try: - api_response = api_instance.enable(body=body) - print("The response of EnvironmentApi->enable:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EnvironmentApi->enable: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**EnableRequest**](EnableRequest.md)| | [optional] - -### Return type - -[**CreateIdentity201Response**](CreateIdentity201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | environment enabled | - | -**401** | unauthorized | - | -**404** | account 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/sdk/python/src/docs/Frontend.md b/sdk/python/src/docs/Frontend.md deleted file mode 100644 index ce41a9b7..00000000 --- a/sdk/python/src/docs/Frontend.md +++ /dev/null @@ -1,37 +0,0 @@ -# Frontend - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**frontend_token** | **str** | | [optional] -**share_token** | **str** | | [optional] -**backend_mode** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] -**z_id** | **str** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.frontend import Frontend - -# TODO update the JSON string below -json = "{}" -# create an instance of Frontend from a JSON string -frontend_instance = Frontend.from_json(json) -# print the JSON string representation of the object -print(Frontend.to_json()) - -# convert the object into a dict -frontend_dict = frontend_instance.to_dict() -# create an instance of Frontend from a dict -frontend_from_dict = Frontend.from_dict(frontend_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/sdk/python/src/docs/GetSparklines200Response.md b/sdk/python/src/docs/GetSparklines200Response.md deleted file mode 100644 index 66528c7e..00000000 --- a/sdk/python/src/docs/GetSparklines200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetSparklines200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sparklines** | [**List[Metrics]**](Metrics.md) | | [optional] - -## Example - -```python -from zrok_api.models.get_sparklines200_response import GetSparklines200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetSparklines200Response from a JSON string -get_sparklines200_response_instance = GetSparklines200Response.from_json(json) -# print the JSON string representation of the object -print(GetSparklines200Response.to_json()) - -# convert the object into a dict -get_sparklines200_response_dict = get_sparklines200_response_instance.to_dict() -# create an instance of GetSparklines200Response from a dict -get_sparklines200_response_from_dict = GetSparklines200Response.from_dict(get_sparklines200_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/sdk/python/src/docs/GetSparklinesRequest.md b/sdk/python/src/docs/GetSparklinesRequest.md deleted file mode 100644 index 29369ebc..00000000 --- a/sdk/python/src/docs/GetSparklinesRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# GetSparklinesRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | **bool** | | [optional] -**environments** | **List[str]** | | [optional] -**shares** | **List[str]** | | [optional] - -## Example - -```python -from zrok_api.models.get_sparklines_request import GetSparklinesRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of GetSparklinesRequest from a JSON string -get_sparklines_request_instance = GetSparklinesRequest.from_json(json) -# print the JSON string representation of the object -print(GetSparklinesRequest.to_json()) - -# convert the object into a dict -get_sparklines_request_dict = get_sparklines_request_instance.to_dict() -# create an instance of GetSparklinesRequest from a dict -get_sparklines_request_from_dict = GetSparklinesRequest.from_dict(get_sparklines_request_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/sdk/python/src/docs/InviteRequest.md b/sdk/python/src/docs/InviteRequest.md deleted file mode 100644 index 039132e8..00000000 --- a/sdk/python/src/docs/InviteRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# InviteRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**invite_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.invite_request import InviteRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of InviteRequest from a JSON string -invite_request_instance = InviteRequest.from_json(json) -# print the JSON string representation of the object -print(InviteRequest.to_json()) - -# convert the object into a dict -invite_request_dict = invite_request_instance.to_dict() -# create an instance of InviteRequest from a dict -invite_request_from_dict = InviteRequest.from_dict(invite_request_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/sdk/python/src/docs/InviteTokenGenerateRequest.md b/sdk/python/src/docs/InviteTokenGenerateRequest.md deleted file mode 100644 index 33a20d70..00000000 --- a/sdk/python/src/docs/InviteTokenGenerateRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# InviteTokenGenerateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invite_tokens** | **List[str]** | | [optional] - -## Example - -```python -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of InviteTokenGenerateRequest from a JSON string -invite_token_generate_request_instance = InviteTokenGenerateRequest.from_json(json) -# print the JSON string representation of the object -print(InviteTokenGenerateRequest.to_json()) - -# convert the object into a dict -invite_token_generate_request_dict = invite_token_generate_request_instance.to_dict() -# create an instance of InviteTokenGenerateRequest from a dict -invite_token_generate_request_from_dict = InviteTokenGenerateRequest.from_dict(invite_token_generate_request_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/sdk/python/src/docs/ListFrontends200ResponseInner.md b/sdk/python/src/docs/ListFrontends200ResponseInner.md deleted file mode 100644 index 625ea343..00000000 --- a/sdk/python/src/docs/ListFrontends200ResponseInner.md +++ /dev/null @@ -1,34 +0,0 @@ -# ListFrontends200ResponseInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListFrontends200ResponseInner from a JSON string -list_frontends200_response_inner_instance = ListFrontends200ResponseInner.from_json(json) -# print the JSON string representation of the object -print(ListFrontends200ResponseInner.to_json()) - -# convert the object into a dict -list_frontends200_response_inner_dict = list_frontends200_response_inner_instance.to_dict() -# create an instance of ListFrontends200ResponseInner from a dict -list_frontends200_response_inner_from_dict = ListFrontends200ResponseInner.from_dict(list_frontends200_response_inner_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/sdk/python/src/docs/ListMemberships200Response.md b/sdk/python/src/docs/ListMemberships200Response.md deleted file mode 100644 index 48e19dbf..00000000 --- a/sdk/python/src/docs/ListMemberships200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListMemberships200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**memberships** | [**List[ListMemberships200ResponseMembershipsInner]**](ListMemberships200ResponseMembershipsInner.md) | | [optional] - -## Example - -```python -from zrok_api.models.list_memberships200_response import ListMemberships200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListMemberships200Response from a JSON string -list_memberships200_response_instance = ListMemberships200Response.from_json(json) -# print the JSON string representation of the object -print(ListMemberships200Response.to_json()) - -# convert the object into a dict -list_memberships200_response_dict = list_memberships200_response_instance.to_dict() -# create an instance of ListMemberships200Response from a dict -list_memberships200_response_from_dict = ListMemberships200Response.from_dict(list_memberships200_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/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md b/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md deleted file mode 100644 index e85c7440..00000000 --- a/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# ListMemberships200ResponseMembershipsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListMemberships200ResponseMembershipsInner from a JSON string -list_memberships200_response_memberships_inner_instance = ListMemberships200ResponseMembershipsInner.from_json(json) -# print the JSON string representation of the object -print(ListMemberships200ResponseMembershipsInner.to_json()) - -# convert the object into a dict -list_memberships200_response_memberships_inner_dict = list_memberships200_response_memberships_inner_instance.to_dict() -# create an instance of ListMemberships200ResponseMembershipsInner from a dict -list_memberships200_response_memberships_inner_from_dict = ListMemberships200ResponseMembershipsInner.from_dict(list_memberships200_response_memberships_inner_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/sdk/python/src/docs/ListOrganizationMembers200Response.md b/sdk/python/src/docs/ListOrganizationMembers200Response.md deleted file mode 100644 index e05a28bf..00000000 --- a/sdk/python/src/docs/ListOrganizationMembers200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListOrganizationMembers200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**members** | [**List[ListOrganizationMembers200ResponseMembersInner]**](ListOrganizationMembers200ResponseMembersInner.md) | | [optional] - -## Example - -```python -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizationMembers200Response from a JSON string -list_organization_members200_response_instance = ListOrganizationMembers200Response.from_json(json) -# print the JSON string representation of the object -print(ListOrganizationMembers200Response.to_json()) - -# convert the object into a dict -list_organization_members200_response_dict = list_organization_members200_response_instance.to_dict() -# create an instance of ListOrganizationMembers200Response from a dict -list_organization_members200_response_from_dict = ListOrganizationMembers200Response.from_dict(list_organization_members200_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/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md b/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md deleted file mode 100644 index 8ebbb35e..00000000 --- a/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListOrganizationMembers200ResponseMembersInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizationMembers200ResponseMembersInner from a JSON string -list_organization_members200_response_members_inner_instance = ListOrganizationMembers200ResponseMembersInner.from_json(json) -# print the JSON string representation of the object -print(ListOrganizationMembers200ResponseMembersInner.to_json()) - -# convert the object into a dict -list_organization_members200_response_members_inner_dict = list_organization_members200_response_members_inner_instance.to_dict() -# create an instance of ListOrganizationMembers200ResponseMembersInner from a dict -list_organization_members200_response_members_inner_from_dict = ListOrganizationMembers200ResponseMembersInner.from_dict(list_organization_members200_response_members_inner_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/sdk/python/src/docs/ListOrganizations200Response.md b/sdk/python/src/docs/ListOrganizations200Response.md deleted file mode 100644 index 46fe4d60..00000000 --- a/sdk/python/src/docs/ListOrganizations200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListOrganizations200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organizations** | [**List[ListOrganizations200ResponseOrganizationsInner]**](ListOrganizations200ResponseOrganizationsInner.md) | | [optional] - -## Example - -```python -from zrok_api.models.list_organizations200_response import ListOrganizations200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizations200Response from a JSON string -list_organizations200_response_instance = ListOrganizations200Response.from_json(json) -# print the JSON string representation of the object -print(ListOrganizations200Response.to_json()) - -# convert the object into a dict -list_organizations200_response_dict = list_organizations200_response_instance.to_dict() -# create an instance of ListOrganizations200Response from a dict -list_organizations200_response_from_dict = ListOrganizations200Response.from_dict(list_organizations200_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/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md b/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md deleted file mode 100644 index 468447f2..00000000 --- a/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListOrganizations200ResponseOrganizationsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizations200ResponseOrganizationsInner from a JSON string -list_organizations200_response_organizations_inner_instance = ListOrganizations200ResponseOrganizationsInner.from_json(json) -# print the JSON string representation of the object -print(ListOrganizations200ResponseOrganizationsInner.to_json()) - -# convert the object into a dict -list_organizations200_response_organizations_inner_dict = list_organizations200_response_organizations_inner_instance.to_dict() -# create an instance of ListOrganizations200ResponseOrganizationsInner from a dict -list_organizations200_response_organizations_inner_from_dict = ListOrganizations200ResponseOrganizationsInner.from_dict(list_organizations200_response_organizations_inner_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/sdk/python/src/docs/LoginRequest.md b/sdk/python/src/docs/LoginRequest.md deleted file mode 100644 index 05728618..00000000 --- a/sdk/python/src/docs/LoginRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# LoginRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.login_request import LoginRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of LoginRequest from a JSON string -login_request_instance = LoginRequest.from_json(json) -# print the JSON string representation of the object -print(LoginRequest.to_json()) - -# convert the object into a dict -login_request_dict = login_request_instance.to_dict() -# create an instance of LoginRequest from a dict -login_request_from_dict = LoginRequest.from_dict(login_request_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/sdk/python/src/docs/MetadataApi.md b/sdk/python/src/docs/MetadataApi.md deleted file mode 100644 index ecb0cf8b..00000000 --- a/sdk/python/src/docs/MetadataApi.md +++ /dev/null @@ -1,1171 +0,0 @@ -# zrok_api.MetadataApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**client_version_check**](MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | -[**configuration**](MetadataApi.md#configuration) | **GET** /configuration | -[**get_account_detail**](MetadataApi.md#get_account_detail) | **GET** /detail/account | -[**get_account_metrics**](MetadataApi.md#get_account_metrics) | **GET** /metrics/account | -[**get_environment_detail**](MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | -[**get_environment_metrics**](MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | -[**get_frontend_detail**](MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | -[**get_share_detail**](MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | -[**get_share_metrics**](MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | -[**get_sparklines**](MetadataApi.md#get_sparklines) | **POST** /sparklines | -[**list_memberships**](MetadataApi.md#list_memberships) | **GET** /memberships | -[**list_org_members**](MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | -[**org_account_overview**](MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | -[**overview**](MetadataApi.md#overview) | **GET** /overview | -[**version**](MetadataApi.md#version) | **GET** /version | -[**version_inventory**](MetadataApi.md#version_inventory) | **GET** /versions | - - -# **client_version_check** -> client_version_check(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - body = zrok_api.ClientVersionCheckRequest() # ClientVersionCheckRequest | (optional) - - try: - api_instance.client_version_check(body=body) - except Exception as e: - print("Exception when calling MetadataApi->client_version_check: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ClientVersionCheckRequest**](ClientVersionCheckRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | compatible | - | -**400** | not compatible | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **configuration** -> Configuration configuration() - -### Example - - -```python -import zrok_api -from zrok_api.models.configuration import Configuration -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.configuration() - print("The response of MetadataApi->configuration:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->configuration: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Configuration**](Configuration.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | current configuration | - | - -[[Back to top]](#) [[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_account_detail** -> List[Environment] get_account_detail() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.environment import Environment -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.get_account_detail() - print("The response of MetadataApi->get_account_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_account_detail: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[Environment]**](Environment.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_account_metrics** -> Metrics get_account_metrics(duration=duration) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.metrics import Metrics -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - duration = 'duration_example' # str | (optional) - - try: - api_response = api_instance.get_account_metrics(duration=duration) - print("The response of MetadataApi->get_account_metrics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | account metrics | - | -**400** | bad request | - | -**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_environment_detail** -> EnvironmentAndResources get_environment_detail(env_zid) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - env_zid = 'env_zid_example' # str | - - try: - api_response = api_instance.get_environment_detail(env_zid) - print("The response of MetadataApi->get_environment_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_zid** | **str**| | - -### Return type - -[**EnvironmentAndResources**](EnvironmentAndResources.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_environment_metrics** -> Metrics get_environment_metrics(env_id, duration=duration) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.metrics import Metrics -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - env_id = 'env_id_example' # str | - duration = 'duration_example' # str | (optional) - - try: - api_response = api_instance.get_environment_metrics(env_id, duration=duration) - print("The response of MetadataApi->get_environment_metrics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_id** | **str**| | - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | environment metrics | - | -**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) - -# **get_frontend_detail** -> Frontend get_frontend_detail(frontend_id) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.frontend import Frontend -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - frontend_id = 56 # int | - - try: - api_response = api_instance.get_frontend_detail(frontend_id) - print("The response of MetadataApi->get_frontend_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **frontend_id** | **int**| | - -### Return type - -[**Frontend**](Frontend.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_share_detail** -> Share get_share_detail(share_token) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.share import Share -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - share_token = 'share_token_example' # str | - - try: - api_response = api_instance.get_share_detail(share_token) - print("The response of MetadataApi->get_share_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_share_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_token** | **str**| | - -### Return type - -[**Share**](Share.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_share_metrics** -> Metrics get_share_metrics(share_token, duration=duration) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.metrics import Metrics -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - share_token = 'share_token_example' # str | - duration = 'duration_example' # str | (optional) - - try: - api_response = api_instance.get_share_metrics(share_token, duration=duration) - print("The response of MetadataApi->get_share_metrics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_token** | **str**| | - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | share metrics | - | -**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) - -# **get_sparklines** -> GetSparklines200Response get_sparklines(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - body = zrok_api.GetSparklinesRequest() # GetSparklinesRequest | (optional) - - try: - api_response = api_instance.get_sparklines(body=body) - print("The response of MetadataApi->get_sparklines:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_sparklines: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**GetSparklinesRequest**](GetSparklinesRequest.md)| | [optional] - -### Return type - -[**GetSparklines200Response**](GetSparklines200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | sparklines data | - | -**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) - -# **list_memberships** -> ListMemberships200Response list_memberships() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.list_memberships() - print("The response of MetadataApi->list_memberships:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->list_memberships: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ListMemberships200Response**](ListMemberships200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_org_members** -> ListOrganizationMembers200Response list_org_members(organization_token) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - organization_token = 'organization_token_example' # str | - - try: - api_response = api_instance.list_org_members(organization_token) - print("The response of MetadataApi->list_org_members:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->list_org_members: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_token** | **str**| | - -### Return type - -[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **org_account_overview** -> Overview org_account_overview(organization_token, account_email) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.overview import Overview -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - organization_token = 'organization_token_example' # str | - account_email = 'account_email_example' # str | - - try: - api_response = api_instance.org_account_overview(organization_token, account_email) - print("The response of MetadataApi->org_account_overview:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->org_account_overview: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_token** | **str**| | - **account_email** | **str**| | - -### Return type - -[**Overview**](Overview.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **overview** -> Overview overview() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.overview import Overview -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.overview() - print("The response of MetadataApi->overview:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->overview: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Overview**](Overview.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | overview returned | - | -**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) - -# **version** -> str version() - -### Example - - -```python -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.version() - print("The response of MetadataApi->version:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->version: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**str** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | legacy upgrade required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **version_inventory** -> VersionInventory200Response version_inventory() - -### Example - - -```python -import zrok_api -from zrok_api.models.version_inventory200_response import VersionInventory200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.version_inventory() - print("The response of MetadataApi->version_inventory:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->version_inventory: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**VersionInventory200Response**](VersionInventory200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | - -[[Back to top]](#) [[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/sdk/python/src/docs/Metrics.md b/sdk/python/src/docs/Metrics.md deleted file mode 100644 index 9216f700..00000000 --- a/sdk/python/src/docs/Metrics.md +++ /dev/null @@ -1,32 +0,0 @@ -# Metrics - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope** | **str** | | [optional] -**id** | **str** | | [optional] -**period** | **float** | | [optional] -**samples** | [**List[MetricsSample]**](MetricsSample.md) | | [optional] - -## Example - -```python -from zrok_api.models.metrics import Metrics - -# TODO update the JSON string below -json = "{}" -# create an instance of Metrics from a JSON string -metrics_instance = Metrics.from_json(json) -# print the JSON string representation of the object -print(Metrics.to_json()) - -# convert the object into a dict -metrics_dict = metrics_instance.to_dict() -# create an instance of Metrics from a dict -metrics_from_dict = Metrics.from_dict(metrics_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/sdk/python/src/docs/MetricsSample.md b/sdk/python/src/docs/MetricsSample.md deleted file mode 100644 index 96c1d94e..00000000 --- a/sdk/python/src/docs/MetricsSample.md +++ /dev/null @@ -1,31 +0,0 @@ -# MetricsSample - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rx** | **float** | | [optional] -**tx** | **float** | | [optional] -**timestamp** | **float** | | [optional] - -## Example - -```python -from zrok_api.models.metrics_sample import MetricsSample - -# TODO update the JSON string below -json = "{}" -# create an instance of MetricsSample from a JSON string -metrics_sample_instance = MetricsSample.from_json(json) -# print the JSON string representation of the object -print(MetricsSample.to_json()) - -# convert the object into a dict -metrics_sample_dict = metrics_sample_instance.to_dict() -# create an instance of MetricsSample from a dict -metrics_sample_from_dict = MetricsSample.from_dict(metrics_sample_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/sdk/python/src/docs/Overview.md b/sdk/python/src/docs/Overview.md deleted file mode 100644 index f50d6232..00000000 --- a/sdk/python/src/docs/Overview.md +++ /dev/null @@ -1,30 +0,0 @@ -# Overview - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_limited** | **bool** | | [optional] -**environments** | [**List[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional] - -## Example - -```python -from zrok_api.models.overview import Overview - -# TODO update the JSON string below -json = "{}" -# create an instance of Overview from a JSON string -overview_instance = Overview.from_json(json) -# print the JSON string representation of the object -print(Overview.to_json()) - -# convert the object into a dict -overview_dict = overview_instance.to_dict() -# create an instance of Overview from a dict -overview_from_dict = Overview.from_dict(overview_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/sdk/python/src/docs/Principal.md b/sdk/python/src/docs/Principal.md deleted file mode 100644 index 0a6d399c..00000000 --- a/sdk/python/src/docs/Principal.md +++ /dev/null @@ -1,33 +0,0 @@ -# Principal - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**email** | **str** | | [optional] -**token** | **str** | | [optional] -**limitless** | **bool** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.principal import Principal - -# TODO update the JSON string below -json = "{}" -# create an instance of Principal from a JSON string -principal_instance = Principal.from_json(json) -# print the JSON string representation of the object -print(Principal.to_json()) - -# convert the object into a dict -principal_dict = principal_instance.to_dict() -# create an instance of Principal from a dict -principal_from_dict = Principal.from_dict(principal_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/sdk/python/src/docs/RegenerateAccountToken200Response.md b/sdk/python/src/docs/RegenerateAccountToken200Response.md deleted file mode 100644 index e86cc294..00000000 --- a/sdk/python/src/docs/RegenerateAccountToken200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# RegenerateAccountToken200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of RegenerateAccountToken200Response from a JSON string -regenerate_account_token200_response_instance = RegenerateAccountToken200Response.from_json(json) -# print the JSON string representation of the object -print(RegenerateAccountToken200Response.to_json()) - -# convert the object into a dict -regenerate_account_token200_response_dict = regenerate_account_token200_response_instance.to_dict() -# create an instance of RegenerateAccountToken200Response from a dict -regenerate_account_token200_response_from_dict = RegenerateAccountToken200Response.from_dict(regenerate_account_token200_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/sdk/python/src/docs/RegenerateAccountTokenRequest.md b/sdk/python/src/docs/RegenerateAccountTokenRequest.md deleted file mode 100644 index 113262a6..00000000 --- a/sdk/python/src/docs/RegenerateAccountTokenRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# RegenerateAccountTokenRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RegenerateAccountTokenRequest from a JSON string -regenerate_account_token_request_instance = RegenerateAccountTokenRequest.from_json(json) -# print the JSON string representation of the object -print(RegenerateAccountTokenRequest.to_json()) - -# convert the object into a dict -regenerate_account_token_request_dict = regenerate_account_token_request_instance.to_dict() -# create an instance of RegenerateAccountTokenRequest from a dict -regenerate_account_token_request_from_dict = RegenerateAccountTokenRequest.from_dict(regenerate_account_token_request_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/sdk/python/src/docs/RegisterRequest.md b/sdk/python/src/docs/RegisterRequest.md deleted file mode 100644 index 6e268aff..00000000 --- a/sdk/python/src/docs/RegisterRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# RegisterRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.register_request import RegisterRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RegisterRequest from a JSON string -register_request_instance = RegisterRequest.from_json(json) -# print the JSON string representation of the object -print(RegisterRequest.to_json()) - -# convert the object into a dict -register_request_dict = register_request_instance.to_dict() -# create an instance of RegisterRequest from a dict -register_request_from_dict = RegisterRequest.from_dict(register_request_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/sdk/python/src/docs/RemoveOrganizationMemberRequest.md b/sdk/python/src/docs/RemoveOrganizationMemberRequest.md deleted file mode 100644 index 75743291..00000000 --- a/sdk/python/src/docs/RemoveOrganizationMemberRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# RemoveOrganizationMemberRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RemoveOrganizationMemberRequest from a JSON string -remove_organization_member_request_instance = RemoveOrganizationMemberRequest.from_json(json) -# print the JSON string representation of the object -print(RemoveOrganizationMemberRequest.to_json()) - -# convert the object into a dict -remove_organization_member_request_dict = remove_organization_member_request_instance.to_dict() -# create an instance of RemoveOrganizationMemberRequest from a dict -remove_organization_member_request_from_dict = RemoveOrganizationMemberRequest.from_dict(remove_organization_member_request_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/sdk/python/src/docs/ResetPasswordRequest.md b/sdk/python/src/docs/ResetPasswordRequest.md deleted file mode 100644 index e91e841a..00000000 --- a/sdk/python/src/docs/ResetPasswordRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# ResetPasswordRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reset_token** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.reset_password_request import ResetPasswordRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ResetPasswordRequest from a JSON string -reset_password_request_instance = ResetPasswordRequest.from_json(json) -# print the JSON string representation of the object -print(ResetPasswordRequest.to_json()) - -# convert the object into a dict -reset_password_request_dict = reset_password_request_instance.to_dict() -# create an instance of ResetPasswordRequest from a dict -reset_password_request_from_dict = ResetPasswordRequest.from_dict(reset_password_request_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/sdk/python/src/docs/Share.md b/sdk/python/src/docs/Share.md deleted file mode 100644 index 4fbfc430..00000000 --- a/sdk/python/src/docs/Share.md +++ /dev/null @@ -1,40 +0,0 @@ -# Share - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**share_token** | **str** | | [optional] -**z_id** | **str** | | [optional] -**share_mode** | **str** | | [optional] -**backend_mode** | **str** | | [optional] -**frontend_selection** | **str** | | [optional] -**frontend_endpoint** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**reserved** | **bool** | | [optional] -**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] -**limited** | **bool** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.share import Share - -# TODO update the JSON string below -json = "{}" -# create an instance of Share from a JSON string -share_instance = Share.from_json(json) -# print the JSON string representation of the object -print(Share.to_json()) - -# convert the object into a dict -share_dict = share_instance.to_dict() -# create an instance of Share from a dict -share_from_dict = Share.from_dict(share_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/sdk/python/src/docs/ShareApi.md b/sdk/python/src/docs/ShareApi.md deleted file mode 100644 index 2831f1d2..00000000 --- a/sdk/python/src/docs/ShareApi.md +++ /dev/null @@ -1,473 +0,0 @@ -# zrok_api.ShareApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**access**](ShareApi.md#access) | **POST** /access | -[**share**](ShareApi.md#share) | **POST** /share | -[**unaccess**](ShareApi.md#unaccess) | **DELETE** /unaccess | -[**unshare**](ShareApi.md#unshare) | **DELETE** /unshare | -[**update_access**](ShareApi.md#update_access) | **PATCH** /access | -[**update_share**](ShareApi.md#update_share) | **PATCH** /share | - - -# **access** -> Access201Response access(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.AccessRequest() # AccessRequest | (optional) - - try: - api_response = api_instance.access(body=body) - print("The response of ShareApi->access:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ShareApi->access: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AccessRequest**](AccessRequest.md)| | [optional] - -### Return type - -[**Access201Response**](Access201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | access created | - | -**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) - -# **share** -> ShareResponse share(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.ShareRequest() # ShareRequest | (optional) - - try: - api_response = api_instance.share(body=body) - print("The response of ShareApi->share:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ShareApi->share: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ShareRequest**](ShareRequest.md)| | [optional] - -### Return type - -[**ShareResponse**](ShareResponse.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | share created | - | -**401** | unauthorized | - | -**404** | not found | - | -**409** | conflict | - | -**422** | unprocessable | - | -**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) - -# **unaccess** -> unaccess(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UnaccessRequest() # UnaccessRequest | (optional) - - try: - api_instance.unaccess(body=body) - except Exception as e: - print("Exception when calling ShareApi->unaccess: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UnaccessRequest**](UnaccessRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | access removed | - | -**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) - -# **unshare** -> unshare(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UnshareRequest() # UnshareRequest | (optional) - - try: - api_instance.unshare(body=body) - except Exception as e: - print("Exception when calling ShareApi->unshare: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UnshareRequest**](UnshareRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | share removed | - | -**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_access** -> update_access(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UpdateAccessRequest() # UpdateAccessRequest | (optional) - - try: - api_instance.update_access(body=body) - except Exception as e: - print("Exception when calling ShareApi->update_access: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UpdateAccessRequest**](UpdateAccessRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | access updated | - | -**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_share** -> update_share(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.update_share_request import UpdateShareRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UpdateShareRequest() # UpdateShareRequest | (optional) - - try: - api_instance.update_share(body=body) - except Exception as e: - print("Exception when calling ShareApi->update_share: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UpdateShareRequest**](UpdateShareRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | share updated | - | -**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/sdk/python/src/docs/ShareRequest.md b/sdk/python/src/docs/ShareRequest.md deleted file mode 100644 index eb92f07a..00000000 --- a/sdk/python/src/docs/ShareRequest.md +++ /dev/null @@ -1,42 +0,0 @@ -# ShareRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_mode** | **str** | | [optional] -**frontend_selection** | **List[str]** | | [optional] -**backend_mode** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**auth_scheme** | **str** | | [optional] -**auth_users** | [**List[AuthUser]**](AuthUser.md) | | [optional] -**oauth_provider** | **str** | | [optional] -**oauth_email_domains** | **List[str]** | | [optional] -**oauth_authorization_check_interval** | **str** | | [optional] -**reserved** | **bool** | | [optional] -**permission_mode** | **str** | | [optional] -**access_grants** | **List[str]** | | [optional] -**unique_name** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.share_request import ShareRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareRequest from a JSON string -share_request_instance = ShareRequest.from_json(json) -# print the JSON string representation of the object -print(ShareRequest.to_json()) - -# convert the object into a dict -share_request_dict = share_request_instance.to_dict() -# create an instance of ShareRequest from a dict -share_request_from_dict = ShareRequest.from_dict(share_request_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/sdk/python/src/docs/ShareResponse.md b/sdk/python/src/docs/ShareResponse.md deleted file mode 100644 index 9bbedd0c..00000000 --- a/sdk/python/src/docs/ShareResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# ShareResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_proxy_endpoints** | **List[str]** | | [optional] -**share_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.share_response import ShareResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareResponse from a JSON string -share_response_instance = ShareResponse.from_json(json) -# print the JSON string representation of the object -print(ShareResponse.to_json()) - -# convert the object into a dict -share_response_dict = share_response_instance.to_dict() -# create an instance of ShareResponse from a dict -share_response_from_dict = ShareResponse.from_dict(share_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/sdk/python/src/docs/SparkDataSample.md b/sdk/python/src/docs/SparkDataSample.md deleted file mode 100644 index 6479404c..00000000 --- a/sdk/python/src/docs/SparkDataSample.md +++ /dev/null @@ -1,30 +0,0 @@ -# SparkDataSample - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rx** | **float** | | [optional] -**tx** | **float** | | [optional] - -## Example - -```python -from zrok_api.models.spark_data_sample import SparkDataSample - -# TODO update the JSON string below -json = "{}" -# create an instance of SparkDataSample from a JSON string -spark_data_sample_instance = SparkDataSample.from_json(json) -# print the JSON string representation of the object -print(SparkDataSample.to_json()) - -# convert the object into a dict -spark_data_sample_dict = spark_data_sample_instance.to_dict() -# create an instance of SparkDataSample from a dict -spark_data_sample_from_dict = SparkDataSample.from_dict(spark_data_sample_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/sdk/python/src/docs/UnaccessRequest.md b/sdk/python/src/docs/UnaccessRequest.md deleted file mode 100644 index c7d57fd8..00000000 --- a/sdk/python/src/docs/UnaccessRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UnaccessRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.unaccess_request import UnaccessRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnaccessRequest from a JSON string -unaccess_request_instance = UnaccessRequest.from_json(json) -# print the JSON string representation of the object -print(UnaccessRequest.to_json()) - -# convert the object into a dict -unaccess_request_dict = unaccess_request_instance.to_dict() -# create an instance of UnaccessRequest from a dict -unaccess_request_from_dict = UnaccessRequest.from_dict(unaccess_request_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/sdk/python/src/docs/UnshareRequest.md b/sdk/python/src/docs/UnshareRequest.md deleted file mode 100644 index d376f008..00000000 --- a/sdk/python/src/docs/UnshareRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UnshareRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**reserved** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.unshare_request import UnshareRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnshareRequest from a JSON string -unshare_request_instance = UnshareRequest.from_json(json) -# print the JSON string representation of the object -print(UnshareRequest.to_json()) - -# convert the object into a dict -unshare_request_dict = unshare_request_instance.to_dict() -# create an instance of UnshareRequest from a dict -unshare_request_from_dict = UnshareRequest.from_dict(unshare_request_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/sdk/python/src/docs/UpdateAccessRequest.md b/sdk/python/src/docs/UpdateAccessRequest.md deleted file mode 100644 index 7d9027da..00000000 --- a/sdk/python/src/docs/UpdateAccessRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UpdateAccessRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.update_access_request import UpdateAccessRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateAccessRequest from a JSON string -update_access_request_instance = UpdateAccessRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateAccessRequest.to_json()) - -# convert the object into a dict -update_access_request_dict = update_access_request_instance.to_dict() -# create an instance of UpdateAccessRequest from a dict -update_access_request_from_dict = UpdateAccessRequest.from_dict(update_access_request_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/sdk/python/src/docs/UpdateFrontendRequest.md b/sdk/python/src/docs/UpdateFrontendRequest.md deleted file mode 100644 index 754bf4b6..00000000 --- a/sdk/python/src/docs/UpdateFrontendRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UpdateFrontendRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**public_name** | **str** | | [optional] -**url_template** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.update_frontend_request import UpdateFrontendRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateFrontendRequest from a JSON string -update_frontend_request_instance = UpdateFrontendRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateFrontendRequest.to_json()) - -# convert the object into a dict -update_frontend_request_dict = update_frontend_request_instance.to_dict() -# create an instance of UpdateFrontendRequest from a dict -update_frontend_request_from_dict = UpdateFrontendRequest.from_dict(update_frontend_request_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/sdk/python/src/docs/UpdateShareRequest.md b/sdk/python/src/docs/UpdateShareRequest.md deleted file mode 100644 index 8719ab10..00000000 --- a/sdk/python/src/docs/UpdateShareRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# UpdateShareRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**share_token** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**add_access_grants** | **List[str]** | | [optional] -**remove_access_grants** | **List[str]** | | [optional] - -## Example - -```python -from zrok_api.models.update_share_request import UpdateShareRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateShareRequest from a JSON string -update_share_request_instance = UpdateShareRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateShareRequest.to_json()) - -# convert the object into a dict -update_share_request_dict = update_share_request_instance.to_dict() -# create an instance of UpdateShareRequest from a dict -update_share_request_from_dict = UpdateShareRequest.from_dict(update_share_request_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/sdk/python/src/docs/Verify200Response.md b/sdk/python/src/docs/Verify200Response.md deleted file mode 100644 index 5ca1769d..00000000 --- a/sdk/python/src/docs/Verify200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# Verify200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.verify200_response import Verify200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of Verify200Response from a JSON string -verify200_response_instance = Verify200Response.from_json(json) -# print the JSON string representation of the object -print(Verify200Response.to_json()) - -# convert the object into a dict -verify200_response_dict = verify200_response_instance.to_dict() -# create an instance of Verify200Response from a dict -verify200_response_from_dict = Verify200Response.from_dict(verify200_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/sdk/python/src/docs/VerifyRequest.md b/sdk/python/src/docs/VerifyRequest.md deleted file mode 100644 index da6a0728..00000000 --- a/sdk/python/src/docs/VerifyRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# VerifyRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.verify_request import VerifyRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of VerifyRequest from a JSON string -verify_request_instance = VerifyRequest.from_json(json) -# print the JSON string representation of the object -print(VerifyRequest.to_json()) - -# convert the object into a dict -verify_request_dict = verify_request_instance.to_dict() -# create an instance of VerifyRequest from a dict -verify_request_from_dict = VerifyRequest.from_dict(verify_request_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/sdk/python/src/docs/VersionInventory200Response.md b/sdk/python/src/docs/VersionInventory200Response.md deleted file mode 100644 index 2c08de2c..00000000 --- a/sdk/python/src/docs/VersionInventory200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# VersionInventory200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**controller_version** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.version_inventory200_response import VersionInventory200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of VersionInventory200Response from a JSON string -version_inventory200_response_instance = VersionInventory200Response.from_json(json) -# print the JSON string representation of the object -print(VersionInventory200Response.to_json()) - -# convert the object into a dict -version_inventory200_response_dict = version_inventory200_response_instance.to_dict() -# create an instance of VersionInventory200Response from a dict -version_inventory200_response_from_dict = VersionInventory200Response.from_dict(version_inventory200_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/sdk/python/src/test/__init__.py b/sdk/python/src/test/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/sdk/python/src/test/test_access201_response.py b/sdk/python/src/test/test_access201_response.py deleted file mode 100644 index 9b698d1c..00000000 --- a/sdk/python/src/test/test_access201_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.access201_response import Access201Response - -class TestAccess201Response(unittest.TestCase): - """Access201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Access201Response: - """Test Access201Response - include_optional 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 `Access201Response` - """ - model = Access201Response() - if include_optional: - return Access201Response( - frontend_token = '', - backend_mode = '' - ) - else: - return Access201Response( - ) - """ - - def testAccess201Response(self): - """Test Access201Response""" - # 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/sdk/python/src/test/test_access_request.py b/sdk/python/src/test/test_access_request.py deleted file mode 100644 index 070903e9..00000000 --- a/sdk/python/src/test/test_access_request.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.access_request import AccessRequest - -class TestAccessRequest(unittest.TestCase): - """AccessRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccessRequest: - """Test AccessRequest - include_optional 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 `AccessRequest` - """ - model = AccessRequest() - if include_optional: - return AccessRequest( - env_zid = '', - share_token = '', - bind_address = '', - description = '' - ) - else: - return AccessRequest( - ) - """ - - def testAccessRequest(self): - """Test AccessRequest""" - # 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/sdk/python/src/test/test_account_api.py b/sdk/python/src/test/test_account_api.py deleted file mode 100644 index 419e1f1b..00000000 --- a/sdk/python/src/test/test_account_api.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.account_api import AccountApi - - -class TestAccountApi(unittest.TestCase): - """AccountApi unit test stubs""" - - def setUp(self) -> None: - self.api = AccountApi() - - def tearDown(self) -> None: - pass - - def test_change_password(self) -> None: - """Test case for change_password - - """ - pass - - def test_invite(self) -> None: - """Test case for invite - - """ - pass - - def test_login(self) -> None: - """Test case for login - - """ - pass - - def test_regenerate_account_token(self) -> None: - """Test case for regenerate_account_token - - """ - pass - - def test_register(self) -> None: - """Test case for register - - """ - pass - - def test_reset_password(self) -> None: - """Test case for reset_password - - """ - pass - - def test_reset_password_request(self) -> None: - """Test case for reset_password_request - - """ - pass - - def test_verify(self) -> None: - """Test case for verify - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/src/test/test_add_organization_member_request.py b/sdk/python/src/test/test_add_organization_member_request.py deleted file mode 100644 index 7a08de67..00000000 --- a/sdk/python/src/test/test_add_organization_member_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest - -class TestAddOrganizationMemberRequest(unittest.TestCase): - """AddOrganizationMemberRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AddOrganizationMemberRequest: - """Test AddOrganizationMemberRequest - include_optional 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 `AddOrganizationMemberRequest` - """ - model = AddOrganizationMemberRequest() - if include_optional: - return AddOrganizationMemberRequest( - organization_token = '', - email = '', - admin = True - ) - else: - return AddOrganizationMemberRequest( - ) - """ - - def testAddOrganizationMemberRequest(self): - """Test AddOrganizationMemberRequest""" - # 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/sdk/python/src/test/test_admin_api.py b/sdk/python/src/test/test_admin_api.py deleted file mode 100644 index 720e8832..00000000 --- a/sdk/python/src/test/test_admin_api.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.admin_api import AdminApi - - -class TestAdminApi(unittest.TestCase): - """AdminApi unit test stubs""" - - def setUp(self) -> None: - self.api = AdminApi() - - def tearDown(self) -> None: - pass - - def test_add_organization_member(self) -> None: - """Test case for add_organization_member - - """ - pass - - def test_create_account(self) -> None: - """Test case for create_account - - """ - pass - - def test_create_frontend(self) -> None: - """Test case for create_frontend - - """ - pass - - def test_create_identity(self) -> None: - """Test case for create_identity - - """ - pass - - def test_create_organization(self) -> None: - """Test case for create_organization - - """ - pass - - def test_delete_frontend(self) -> None: - """Test case for delete_frontend - - """ - pass - - def test_delete_organization(self) -> None: - """Test case for delete_organization - - """ - pass - - def test_grants(self) -> None: - """Test case for grants - - """ - pass - - def test_invite_token_generate(self) -> None: - """Test case for invite_token_generate - - """ - pass - - def test_list_frontends(self) -> None: - """Test case for list_frontends - - """ - pass - - def test_list_organization_members(self) -> None: - """Test case for list_organization_members - - """ - pass - - def test_list_organizations(self) -> None: - """Test case for list_organizations - - """ - pass - - def test_remove_organization_member(self) -> None: - """Test case for remove_organization_member - - """ - pass - - def test_update_frontend(self) -> None: - """Test case for update_frontend - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/src/test/test_auth_user.py b/sdk/python/src/test/test_auth_user.py deleted file mode 100644 index e5d70b26..00000000 --- a/sdk/python/src/test/test_auth_user.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.auth_user import AuthUser - -class TestAuthUser(unittest.TestCase): - """AuthUser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AuthUser: - """Test AuthUser - include_optional 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 `AuthUser` - """ - model = AuthUser() - if include_optional: - return AuthUser( - username = '', - password = '' - ) - else: - return AuthUser( - ) - """ - - def testAuthUser(self): - """Test AuthUser""" - # 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/sdk/python/src/test/test_change_password_request.py b/sdk/python/src/test/test_change_password_request.py deleted file mode 100644 index 592e8be1..00000000 --- a/sdk/python/src/test/test_change_password_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.change_password_request import ChangePasswordRequest - -class TestChangePasswordRequest(unittest.TestCase): - """ChangePasswordRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ChangePasswordRequest: - """Test ChangePasswordRequest - include_optional 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 `ChangePasswordRequest` - """ - model = ChangePasswordRequest() - if include_optional: - return ChangePasswordRequest( - email = '', - old_password = '', - new_password = '' - ) - else: - return ChangePasswordRequest( - ) - """ - - def testChangePasswordRequest(self): - """Test ChangePasswordRequest""" - # 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/sdk/python/src/test/test_client_version_check_request.py b/sdk/python/src/test/test_client_version_check_request.py deleted file mode 100644 index 169017d6..00000000 --- a/sdk/python/src/test/test_client_version_check_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest - -class TestClientVersionCheckRequest(unittest.TestCase): - """ClientVersionCheckRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClientVersionCheckRequest: - """Test ClientVersionCheckRequest - include_optional 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 `ClientVersionCheckRequest` - """ - model = ClientVersionCheckRequest() - if include_optional: - return ClientVersionCheckRequest( - client_version = '' - ) - else: - return ClientVersionCheckRequest( - ) - """ - - def testClientVersionCheckRequest(self): - """Test ClientVersionCheckRequest""" - # 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/sdk/python/src/test/test_configuration.py b/sdk/python/src/test/test_configuration.py deleted file mode 100644 index bf80210e..00000000 --- a/sdk/python/src/test/test_configuration.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.configuration import Configuration - -class TestConfiguration(unittest.TestCase): - """Configuration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Configuration: - """Test Configuration - include_optional 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 `Configuration` - """ - model = Configuration() - if include_optional: - return Configuration( - version = '', - tou_link = '', - invites_open = True, - requires_invite_token = True, - invite_token_contact = '' - ) - else: - return Configuration( - ) - """ - - def testConfiguration(self): - """Test Configuration""" - # 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/sdk/python/src/test/test_create_frontend201_response.py b/sdk/python/src/test/test_create_frontend201_response.py deleted file mode 100644 index 3f983a1a..00000000 --- a/sdk/python/src/test/test_create_frontend201_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_frontend201_response import CreateFrontend201Response - -class TestCreateFrontend201Response(unittest.TestCase): - """CreateFrontend201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateFrontend201Response: - """Test CreateFrontend201Response - include_optional 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 `CreateFrontend201Response` - """ - model = CreateFrontend201Response() - if include_optional: - return CreateFrontend201Response( - frontend_token = '' - ) - else: - return CreateFrontend201Response( - ) - """ - - def testCreateFrontend201Response(self): - """Test CreateFrontend201Response""" - # 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/sdk/python/src/test/test_create_frontend_request.py b/sdk/python/src/test/test_create_frontend_request.py deleted file mode 100644 index 8fc35754..00000000 --- a/sdk/python/src/test/test_create_frontend_request.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_frontend_request import CreateFrontendRequest - -class TestCreateFrontendRequest(unittest.TestCase): - """CreateFrontendRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateFrontendRequest: - """Test CreateFrontendRequest - include_optional 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 `CreateFrontendRequest` - """ - model = CreateFrontendRequest() - if include_optional: - return CreateFrontendRequest( - z_id = '', - url_template = '', - public_name = '', - permission_mode = 'open' - ) - else: - return CreateFrontendRequest( - ) - """ - - def testCreateFrontendRequest(self): - """Test CreateFrontendRequest""" - # 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/sdk/python/src/test/test_create_identity201_response.py b/sdk/python/src/test/test_create_identity201_response.py deleted file mode 100644 index 2a9c8f2b..00000000 --- a/sdk/python/src/test/test_create_identity201_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_identity201_response import CreateIdentity201Response - -class TestCreateIdentity201Response(unittest.TestCase): - """CreateIdentity201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateIdentity201Response: - """Test CreateIdentity201Response - include_optional 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 `CreateIdentity201Response` - """ - model = CreateIdentity201Response() - if include_optional: - return CreateIdentity201Response( - identity = '', - cfg = '' - ) - else: - return CreateIdentity201Response( - ) - """ - - def testCreateIdentity201Response(self): - """Test CreateIdentity201Response""" - # 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/sdk/python/src/test/test_create_identity_request.py b/sdk/python/src/test/test_create_identity_request.py deleted file mode 100644 index 9bf33031..00000000 --- a/sdk/python/src/test/test_create_identity_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_identity_request import CreateIdentityRequest - -class TestCreateIdentityRequest(unittest.TestCase): - """CreateIdentityRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateIdentityRequest: - """Test CreateIdentityRequest - include_optional 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 `CreateIdentityRequest` - """ - model = CreateIdentityRequest() - if include_optional: - return CreateIdentityRequest( - name = '' - ) - else: - return CreateIdentityRequest( - ) - """ - - def testCreateIdentityRequest(self): - """Test CreateIdentityRequest""" - # 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/sdk/python/src/test/test_create_organization201_response.py b/sdk/python/src/test/test_create_organization201_response.py deleted file mode 100644 index d4dc7c81..00000000 --- a/sdk/python/src/test/test_create_organization201_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_organization201_response import CreateOrganization201Response - -class TestCreateOrganization201Response(unittest.TestCase): - """CreateOrganization201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateOrganization201Response: - """Test CreateOrganization201Response - include_optional 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 `CreateOrganization201Response` - """ - model = CreateOrganization201Response() - if include_optional: - return CreateOrganization201Response( - organization_token = '' - ) - else: - return CreateOrganization201Response( - ) - """ - - def testCreateOrganization201Response(self): - """Test CreateOrganization201Response""" - # 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/sdk/python/src/test/test_create_organization_request.py b/sdk/python/src/test/test_create_organization_request.py deleted file mode 100644 index da880237..00000000 --- a/sdk/python/src/test/test_create_organization_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_organization_request import CreateOrganizationRequest - -class TestCreateOrganizationRequest(unittest.TestCase): - """CreateOrganizationRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateOrganizationRequest: - """Test CreateOrganizationRequest - include_optional 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 `CreateOrganizationRequest` - """ - model = CreateOrganizationRequest() - if include_optional: - return CreateOrganizationRequest( - description = '' - ) - else: - return CreateOrganizationRequest( - ) - """ - - def testCreateOrganizationRequest(self): - """Test CreateOrganizationRequest""" - # 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/sdk/python/src/test/test_disable_request.py b/sdk/python/src/test/test_disable_request.py deleted file mode 100644 index c4837b4b..00000000 --- a/sdk/python/src/test/test_disable_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.disable_request import DisableRequest - -class TestDisableRequest(unittest.TestCase): - """DisableRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DisableRequest: - """Test DisableRequest - include_optional 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 `DisableRequest` - """ - model = DisableRequest() - if include_optional: - return DisableRequest( - identity = '' - ) - else: - return DisableRequest( - ) - """ - - def testDisableRequest(self): - """Test DisableRequest""" - # 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/sdk/python/src/test/test_enable_request.py b/sdk/python/src/test/test_enable_request.py deleted file mode 100644 index 49689df4..00000000 --- a/sdk/python/src/test/test_enable_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.enable_request import EnableRequest - -class TestEnableRequest(unittest.TestCase): - """EnableRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnableRequest: - """Test EnableRequest - include_optional 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 `EnableRequest` - """ - model = EnableRequest() - if include_optional: - return EnableRequest( - description = '', - host = '' - ) - else: - return EnableRequest( - ) - """ - - def testEnableRequest(self): - """Test EnableRequest""" - # 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/sdk/python/src/test/test_environment.py b/sdk/python/src/test/test_environment.py deleted file mode 100644 index d2e28280..00000000 --- a/sdk/python/src/test/test_environment.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.environment import Environment - -class TestEnvironment(unittest.TestCase): - """Environment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Environment: - """Test Environment - include_optional 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 `Environment` - """ - model = Environment() - if include_optional: - return Environment( - description = '', - host = '', - address = '', - z_id = '', - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56 - ) - else: - return Environment( - ) - """ - - def testEnvironment(self): - """Test Environment""" - # 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/sdk/python/src/test/test_environment_and_resources.py b/sdk/python/src/test/test_environment_and_resources.py deleted file mode 100644 index 56cafdac..00000000 --- a/sdk/python/src/test/test_environment_and_resources.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.environment_and_resources import EnvironmentAndResources - -class TestEnvironmentAndResources(unittest.TestCase): - """EnvironmentAndResources unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnvironmentAndResources: - """Test EnvironmentAndResources - include_optional 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 `EnvironmentAndResources` - """ - model = EnvironmentAndResources() - if include_optional: - return EnvironmentAndResources( - environment = zrok_api.models.environment.environment( - description = '', - host = '', - address = '', - z_id = '', - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56, ), - frontends = [ - zrok_api.models.frontend.frontend( - id = 56, - frontend_token = '', - share_token = '', - backend_mode = '', - bind_address = '', - description = '', - z_id = '', - created_at = 56, - updated_at = 56, ) - ], - shares = [ - zrok_api.models.share.share( - share_token = '', - z_id = '', - share_mode = '', - backend_mode = '', - frontend_selection = '', - frontend_endpoint = '', - backend_proxy_endpoint = '', - reserved = True, - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56, ) - ] - ) - else: - return EnvironmentAndResources( - ) - """ - - def testEnvironmentAndResources(self): - """Test EnvironmentAndResources""" - # 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/sdk/python/src/test/test_environment_api.py b/sdk/python/src/test/test_environment_api.py deleted file mode 100644 index 83aeacd8..00000000 --- a/sdk/python/src/test/test_environment_api.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.environment_api import EnvironmentApi - - -class TestEnvironmentApi(unittest.TestCase): - """EnvironmentApi unit test stubs""" - - def setUp(self) -> None: - self.api = EnvironmentApi() - - def tearDown(self) -> None: - pass - - def test_disable(self) -> None: - """Test case for disable - - """ - pass - - def test_enable(self) -> None: - """Test case for enable - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/src/test/test_frontend.py b/sdk/python/src/test/test_frontend.py deleted file mode 100644 index eba715d9..00000000 --- a/sdk/python/src/test/test_frontend.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.frontend import Frontend - -class TestFrontend(unittest.TestCase): - """Frontend unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Frontend: - """Test Frontend - include_optional 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 `Frontend` - """ - model = Frontend() - if include_optional: - return Frontend( - id = 56, - frontend_token = '', - share_token = '', - backend_mode = '', - bind_address = '', - description = '', - z_id = '', - created_at = 56, - updated_at = 56 - ) - else: - return Frontend( - ) - """ - - def testFrontend(self): - """Test Frontend""" - # 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/sdk/python/src/test/test_get_sparklines200_response.py b/sdk/python/src/test/test_get_sparklines200_response.py deleted file mode 100644 index 8367cc34..00000000 --- a/sdk/python/src/test/test_get_sparklines200_response.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.get_sparklines200_response import GetSparklines200Response - -class TestGetSparklines200Response(unittest.TestCase): - """GetSparklines200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetSparklines200Response: - """Test GetSparklines200Response - include_optional 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 `GetSparklines200Response` - """ - model = GetSparklines200Response() - if include_optional: - return GetSparklines200Response( - sparklines = [ - zrok_api.models.metrics.metrics( - scope = '', - id = '', - period = 1.337, - samples = [ - zrok_api.models.metrics_sample.metricsSample( - rx = 1.337, - tx = 1.337, - timestamp = 1.337, ) - ], ) - ] - ) - else: - return GetSparklines200Response( - ) - """ - - def testGetSparklines200Response(self): - """Test GetSparklines200Response""" - # 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/sdk/python/src/test/test_get_sparklines_request.py b/sdk/python/src/test/test_get_sparklines_request.py deleted file mode 100644 index cd46979b..00000000 --- a/sdk/python/src/test/test_get_sparklines_request.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.get_sparklines_request import GetSparklinesRequest - -class TestGetSparklinesRequest(unittest.TestCase): - """GetSparklinesRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetSparklinesRequest: - """Test GetSparklinesRequest - include_optional 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 `GetSparklinesRequest` - """ - model = GetSparklinesRequest() - if include_optional: - return GetSparklinesRequest( - account = True, - environments = [ - '' - ], - shares = [ - '' - ] - ) - else: - return GetSparklinesRequest( - ) - """ - - def testGetSparklinesRequest(self): - """Test GetSparklinesRequest""" - # 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/sdk/python/src/test/test_invite_request.py b/sdk/python/src/test/test_invite_request.py deleted file mode 100644 index a181ad3b..00000000 --- a/sdk/python/src/test/test_invite_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.invite_request import InviteRequest - -class TestInviteRequest(unittest.TestCase): - """InviteRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InviteRequest: - """Test InviteRequest - include_optional 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 `InviteRequest` - """ - model = InviteRequest() - if include_optional: - return InviteRequest( - email = '', - invite_token = '' - ) - else: - return InviteRequest( - ) - """ - - def testInviteRequest(self): - """Test InviteRequest""" - # 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/sdk/python/src/test/test_invite_token_generate_request.py b/sdk/python/src/test/test_invite_token_generate_request.py deleted file mode 100644 index 1a8c2c10..00000000 --- a/sdk/python/src/test/test_invite_token_generate_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest - -class TestInviteTokenGenerateRequest(unittest.TestCase): - """InviteTokenGenerateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InviteTokenGenerateRequest: - """Test InviteTokenGenerateRequest - include_optional 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 `InviteTokenGenerateRequest` - """ - model = InviteTokenGenerateRequest() - if include_optional: - return InviteTokenGenerateRequest( - invite_tokens = [ - '' - ] - ) - else: - return InviteTokenGenerateRequest( - ) - """ - - def testInviteTokenGenerateRequest(self): - """Test InviteTokenGenerateRequest""" - # 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/sdk/python/src/test/test_list_frontends200_response_inner.py b/sdk/python/src/test/test_list_frontends200_response_inner.py deleted file mode 100644 index 2e21b24d..00000000 --- a/sdk/python/src/test/test_list_frontends200_response_inner.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner - -class TestListFrontends200ResponseInner(unittest.TestCase): - """ListFrontends200ResponseInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListFrontends200ResponseInner: - """Test ListFrontends200ResponseInner - include_optional 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 `ListFrontends200ResponseInner` - """ - model = ListFrontends200ResponseInner() - if include_optional: - return ListFrontends200ResponseInner( - frontend_token = '', - z_id = '', - url_template = '', - public_name = '', - created_at = 56, - updated_at = 56 - ) - else: - return ListFrontends200ResponseInner( - ) - """ - - def testListFrontends200ResponseInner(self): - """Test ListFrontends200ResponseInner""" - # 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/sdk/python/src/test/test_list_memberships200_response.py b/sdk/python/src/test/test_list_memberships200_response.py deleted file mode 100644 index d23ac2dd..00000000 --- a/sdk/python/src/test/test_list_memberships200_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_memberships200_response import ListMemberships200Response - -class TestListMemberships200Response(unittest.TestCase): - """ListMemberships200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListMemberships200Response: - """Test ListMemberships200Response - include_optional 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 `ListMemberships200Response` - """ - model = ListMemberships200Response() - if include_optional: - return ListMemberships200Response( - memberships = [ - zrok_api.models.list_memberships_200_response_memberships_inner.listMemberships_200_response_memberships_inner( - organization_token = '', - description = '', - admin = True, ) - ] - ) - else: - return ListMemberships200Response( - ) - """ - - def testListMemberships200Response(self): - """Test ListMemberships200Response""" - # 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/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py b/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py deleted file mode 100644 index 2f7cf7ff..00000000 --- a/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner - -class TestListMemberships200ResponseMembershipsInner(unittest.TestCase): - """ListMemberships200ResponseMembershipsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListMemberships200ResponseMembershipsInner: - """Test ListMemberships200ResponseMembershipsInner - include_optional 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 `ListMemberships200ResponseMembershipsInner` - """ - model = ListMemberships200ResponseMembershipsInner() - if include_optional: - return ListMemberships200ResponseMembershipsInner( - organization_token = '', - description = '', - admin = True - ) - else: - return ListMemberships200ResponseMembershipsInner( - ) - """ - - def testListMemberships200ResponseMembershipsInner(self): - """Test ListMemberships200ResponseMembershipsInner""" - # 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/sdk/python/src/test/test_list_organization_members200_response.py b/sdk/python/src/test/test_list_organization_members200_response.py deleted file mode 100644 index 8020c6c7..00000000 --- a/sdk/python/src/test/test_list_organization_members200_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response - -class TestListOrganizationMembers200Response(unittest.TestCase): - """ListOrganizationMembers200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizationMembers200Response: - """Test ListOrganizationMembers200Response - include_optional 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 `ListOrganizationMembers200Response` - """ - model = ListOrganizationMembers200Response() - if include_optional: - return ListOrganizationMembers200Response( - members = [ - zrok_api.models.list_organization_members_200_response_members_inner.listOrganizationMembers_200_response_members_inner( - email = '', - admin = True, ) - ] - ) - else: - return ListOrganizationMembers200Response( - ) - """ - - def testListOrganizationMembers200Response(self): - """Test ListOrganizationMembers200Response""" - # 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/sdk/python/src/test/test_list_organization_members200_response_members_inner.py b/sdk/python/src/test/test_list_organization_members200_response_members_inner.py deleted file mode 100644 index 28cea33f..00000000 --- a/sdk/python/src/test/test_list_organization_members200_response_members_inner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner - -class TestListOrganizationMembers200ResponseMembersInner(unittest.TestCase): - """ListOrganizationMembers200ResponseMembersInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizationMembers200ResponseMembersInner: - """Test ListOrganizationMembers200ResponseMembersInner - include_optional 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 `ListOrganizationMembers200ResponseMembersInner` - """ - model = ListOrganizationMembers200ResponseMembersInner() - if include_optional: - return ListOrganizationMembers200ResponseMembersInner( - email = '', - admin = True - ) - else: - return ListOrganizationMembers200ResponseMembersInner( - ) - """ - - def testListOrganizationMembers200ResponseMembersInner(self): - """Test ListOrganizationMembers200ResponseMembersInner""" - # 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/sdk/python/src/test/test_list_organizations200_response.py b/sdk/python/src/test/test_list_organizations200_response.py deleted file mode 100644 index 7133529e..00000000 --- a/sdk/python/src/test/test_list_organizations200_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organizations200_response import ListOrganizations200Response - -class TestListOrganizations200Response(unittest.TestCase): - """ListOrganizations200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizations200Response: - """Test ListOrganizations200Response - include_optional 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 `ListOrganizations200Response` - """ - model = ListOrganizations200Response() - if include_optional: - return ListOrganizations200Response( - organizations = [ - zrok_api.models.list_organizations_200_response_organizations_inner.listOrganizations_200_response_organizations_inner( - organization_token = '', - description = '', ) - ] - ) - else: - return ListOrganizations200Response( - ) - """ - - def testListOrganizations200Response(self): - """Test ListOrganizations200Response""" - # 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/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py b/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py deleted file mode 100644 index 6d857ae1..00000000 --- a/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner - -class TestListOrganizations200ResponseOrganizationsInner(unittest.TestCase): - """ListOrganizations200ResponseOrganizationsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizations200ResponseOrganizationsInner: - """Test ListOrganizations200ResponseOrganizationsInner - include_optional 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 `ListOrganizations200ResponseOrganizationsInner` - """ - model = ListOrganizations200ResponseOrganizationsInner() - if include_optional: - return ListOrganizations200ResponseOrganizationsInner( - organization_token = '', - description = '' - ) - else: - return ListOrganizations200ResponseOrganizationsInner( - ) - """ - - def testListOrganizations200ResponseOrganizationsInner(self): - """Test ListOrganizations200ResponseOrganizationsInner""" - # 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/sdk/python/src/test/test_login_request.py b/sdk/python/src/test/test_login_request.py deleted file mode 100644 index 1a4c2642..00000000 --- a/sdk/python/src/test/test_login_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.login_request import LoginRequest - -class TestLoginRequest(unittest.TestCase): - """LoginRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LoginRequest: - """Test LoginRequest - include_optional 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 `LoginRequest` - """ - model = LoginRequest() - if include_optional: - return LoginRequest( - email = '', - password = '' - ) - else: - return LoginRequest( - ) - """ - - def testLoginRequest(self): - """Test LoginRequest""" - # 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/sdk/python/src/test/test_metadata_api.py b/sdk/python/src/test/test_metadata_api.py deleted file mode 100644 index 2424ae4c..00000000 --- a/sdk/python/src/test/test_metadata_api.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.metadata_api import MetadataApi - - -class TestMetadataApi(unittest.TestCase): - """MetadataApi unit test stubs""" - - def setUp(self) -> None: - self.api = MetadataApi() - - def tearDown(self) -> None: - pass - - def test_client_version_check(self) -> None: - """Test case for client_version_check - - """ - pass - - def test_configuration(self) -> None: - """Test case for configuration - - """ - pass - - def test_get_account_detail(self) -> None: - """Test case for get_account_detail - - """ - pass - - def test_get_account_metrics(self) -> None: - """Test case for get_account_metrics - - """ - pass - - def test_get_environment_detail(self) -> None: - """Test case for get_environment_detail - - """ - pass - - def test_get_environment_metrics(self) -> None: - """Test case for get_environment_metrics - - """ - pass - - def test_get_frontend_detail(self) -> None: - """Test case for get_frontend_detail - - """ - pass - - def test_get_share_detail(self) -> None: - """Test case for get_share_detail - - """ - pass - - def test_get_share_metrics(self) -> None: - """Test case for get_share_metrics - - """ - pass - - def test_get_sparklines(self) -> None: - """Test case for get_sparklines - - """ - pass - - def test_list_memberships(self) -> None: - """Test case for list_memberships - - """ - pass - - def test_list_org_members(self) -> None: - """Test case for list_org_members - - """ - pass - - def test_org_account_overview(self) -> None: - """Test case for org_account_overview - - """ - pass - - def test_overview(self) -> None: - """Test case for overview - - """ - pass - - def test_version(self) -> None: - """Test case for version - - """ - pass - - def test_version_inventory(self) -> None: - """Test case for version_inventory - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/src/test/test_metrics.py b/sdk/python/src/test/test_metrics.py deleted file mode 100644 index 04179009..00000000 --- a/sdk/python/src/test/test_metrics.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.metrics import Metrics - -class TestMetrics(unittest.TestCase): - """Metrics unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Metrics: - """Test Metrics - include_optional 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 `Metrics` - """ - model = Metrics() - if include_optional: - return Metrics( - scope = '', - id = '', - period = 1.337, - samples = [ - zrok_api.models.metrics_sample.metricsSample( - rx = 1.337, - tx = 1.337, - timestamp = 1.337, ) - ] - ) - else: - return Metrics( - ) - """ - - def testMetrics(self): - """Test Metrics""" - # 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/sdk/python/src/test/test_metrics_sample.py b/sdk/python/src/test/test_metrics_sample.py deleted file mode 100644 index 0b58e38d..00000000 --- a/sdk/python/src/test/test_metrics_sample.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.metrics_sample import MetricsSample - -class TestMetricsSample(unittest.TestCase): - """MetricsSample unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MetricsSample: - """Test MetricsSample - include_optional 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 `MetricsSample` - """ - model = MetricsSample() - if include_optional: - return MetricsSample( - rx = 1.337, - tx = 1.337, - timestamp = 1.337 - ) - else: - return MetricsSample( - ) - """ - - def testMetricsSample(self): - """Test MetricsSample""" - # 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/sdk/python/src/test/test_overview.py b/sdk/python/src/test/test_overview.py deleted file mode 100644 index 804007cd..00000000 --- a/sdk/python/src/test/test_overview.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.overview import Overview - -class TestOverview(unittest.TestCase): - """Overview unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Overview: - """Test Overview - include_optional 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 `Overview` - """ - model = Overview() - if include_optional: - return Overview( - account_limited = True, - environments = [ - zrok_api.models.environment_and_resources.environmentAndResources( - environment = zrok_api.models.environment.environment( - description = '', - host = '', - address = '', - z_id = '', - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56, ), - frontends = [ - zrok_api.models.frontend.frontend( - id = 56, - frontend_token = '', - share_token = '', - backend_mode = '', - bind_address = '', - description = '', - z_id = '', - created_at = 56, - updated_at = 56, ) - ], - shares = [ - zrok_api.models.share.share( - share_token = '', - z_id = '', - share_mode = '', - backend_mode = '', - frontend_selection = '', - frontend_endpoint = '', - backend_proxy_endpoint = '', - reserved = True, - limited = True, - created_at = 56, - updated_at = 56, ) - ], ) - ] - ) - else: - return Overview( - ) - """ - - def testOverview(self): - """Test Overview""" - # 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/sdk/python/src/test/test_principal.py b/sdk/python/src/test/test_principal.py deleted file mode 100644 index f92c159c..00000000 --- a/sdk/python/src/test/test_principal.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.principal import Principal - -class TestPrincipal(unittest.TestCase): - """Principal unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Principal: - """Test Principal - include_optional 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 `Principal` - """ - model = Principal() - if include_optional: - return Principal( - id = 56, - email = '', - token = '', - limitless = True, - admin = True - ) - else: - return Principal( - ) - """ - - def testPrincipal(self): - """Test Principal""" - # 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/sdk/python/src/test/test_regenerate_account_token200_response.py b/sdk/python/src/test/test_regenerate_account_token200_response.py deleted file mode 100644 index a94c4678..00000000 --- a/sdk/python/src/test/test_regenerate_account_token200_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response - -class TestRegenerateAccountToken200Response(unittest.TestCase): - """RegenerateAccountToken200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RegenerateAccountToken200Response: - """Test RegenerateAccountToken200Response - include_optional 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 `RegenerateAccountToken200Response` - """ - model = RegenerateAccountToken200Response() - if include_optional: - return RegenerateAccountToken200Response( - account_token = '' - ) - else: - return RegenerateAccountToken200Response( - ) - """ - - def testRegenerateAccountToken200Response(self): - """Test RegenerateAccountToken200Response""" - # 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/sdk/python/src/test/test_regenerate_account_token_request.py b/sdk/python/src/test/test_regenerate_account_token_request.py deleted file mode 100644 index b6e0b4bd..00000000 --- a/sdk/python/src/test/test_regenerate_account_token_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest - -class TestRegenerateAccountTokenRequest(unittest.TestCase): - """RegenerateAccountTokenRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RegenerateAccountTokenRequest: - """Test RegenerateAccountTokenRequest - include_optional 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 `RegenerateAccountTokenRequest` - """ - model = RegenerateAccountTokenRequest() - if include_optional: - return RegenerateAccountTokenRequest( - email_address = '' - ) - else: - return RegenerateAccountTokenRequest( - ) - """ - - def testRegenerateAccountTokenRequest(self): - """Test RegenerateAccountTokenRequest""" - # 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/sdk/python/src/test/test_register_request.py b/sdk/python/src/test/test_register_request.py deleted file mode 100644 index e026b200..00000000 --- a/sdk/python/src/test/test_register_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.register_request import RegisterRequest - -class TestRegisterRequest(unittest.TestCase): - """RegisterRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RegisterRequest: - """Test RegisterRequest - include_optional 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 `RegisterRequest` - """ - model = RegisterRequest() - if include_optional: - return RegisterRequest( - register_token = '', - password = '' - ) - else: - return RegisterRequest( - ) - """ - - def testRegisterRequest(self): - """Test RegisterRequest""" - # 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/sdk/python/src/test/test_remove_organization_member_request.py b/sdk/python/src/test/test_remove_organization_member_request.py deleted file mode 100644 index abf89606..00000000 --- a/sdk/python/src/test/test_remove_organization_member_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest - -class TestRemoveOrganizationMemberRequest(unittest.TestCase): - """RemoveOrganizationMemberRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RemoveOrganizationMemberRequest: - """Test RemoveOrganizationMemberRequest - include_optional 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 `RemoveOrganizationMemberRequest` - """ - model = RemoveOrganizationMemberRequest() - if include_optional: - return RemoveOrganizationMemberRequest( - organization_token = '', - email = '' - ) - else: - return RemoveOrganizationMemberRequest( - ) - """ - - def testRemoveOrganizationMemberRequest(self): - """Test RemoveOrganizationMemberRequest""" - # 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/sdk/python/src/test/test_reset_password_request.py b/sdk/python/src/test/test_reset_password_request.py deleted file mode 100644 index 2c047502..00000000 --- a/sdk/python/src/test/test_reset_password_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.reset_password_request import ResetPasswordRequest - -class TestResetPasswordRequest(unittest.TestCase): - """ResetPasswordRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ResetPasswordRequest: - """Test ResetPasswordRequest - include_optional 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 `ResetPasswordRequest` - """ - model = ResetPasswordRequest() - if include_optional: - return ResetPasswordRequest( - reset_token = '', - password = '' - ) - else: - return ResetPasswordRequest( - ) - """ - - def testResetPasswordRequest(self): - """Test ResetPasswordRequest""" - # 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/sdk/python/src/test/test_share.py b/sdk/python/src/test/test_share.py deleted file mode 100644 index ed498dc0..00000000 --- a/sdk/python/src/test/test_share.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.share import Share - -class TestShare(unittest.TestCase): - """Share unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Share: - """Test Share - include_optional 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 `Share` - """ - model = Share() - if include_optional: - return Share( - share_token = '', - z_id = '', - share_mode = '', - backend_mode = '', - frontend_selection = '', - frontend_endpoint = '', - backend_proxy_endpoint = '', - reserved = True, - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56 - ) - else: - return Share( - ) - """ - - def testShare(self): - """Test Share""" - # 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/sdk/python/src/test/test_share_api.py b/sdk/python/src/test/test_share_api.py deleted file mode 100644 index a22ef8bf..00000000 --- a/sdk/python/src/test/test_share_api.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.share_api import ShareApi - - -class TestShareApi(unittest.TestCase): - """ShareApi unit test stubs""" - - def setUp(self) -> None: - self.api = ShareApi() - - def tearDown(self) -> None: - pass - - def test_access(self) -> None: - """Test case for access - - """ - pass - - def test_share(self) -> None: - """Test case for share - - """ - pass - - def test_unaccess(self) -> None: - """Test case for unaccess - - """ - pass - - def test_unshare(self) -> None: - """Test case for unshare - - """ - pass - - def test_update_access(self) -> None: - """Test case for update_access - - """ - pass - - def test_update_share(self) -> None: - """Test case for update_share - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/src/test/test_share_request.py b/sdk/python/src/test/test_share_request.py deleted file mode 100644 index c543ae26..00000000 --- a/sdk/python/src/test/test_share_request.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.share_request import ShareRequest - -class TestShareRequest(unittest.TestCase): - """ShareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareRequest: - """Test ShareRequest - include_optional 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 `ShareRequest` - """ - model = ShareRequest() - if include_optional: - return ShareRequest( - env_zid = '', - share_mode = 'public', - frontend_selection = [ - '' - ], - backend_mode = 'proxy', - backend_proxy_endpoint = '', - auth_scheme = '', - auth_users = [ - zrok_api.models.auth_user.authUser( - username = '', - password = '', ) - ], - oauth_provider = 'github', - oauth_email_domains = [ - '' - ], - oauth_authorization_check_interval = '', - reserved = True, - permission_mode = 'open', - access_grants = [ - '' - ], - unique_name = '' - ) - else: - return ShareRequest( - ) - """ - - def testShareRequest(self): - """Test ShareRequest""" - # 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/sdk/python/src/test/test_share_response.py b/sdk/python/src/test/test_share_response.py deleted file mode 100644 index 46bb5af5..00000000 --- a/sdk/python/src/test/test_share_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.share_response import ShareResponse - -class TestShareResponse(unittest.TestCase): - """ShareResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareResponse: - """Test ShareResponse - include_optional 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 `ShareResponse` - """ - model = ShareResponse() - if include_optional: - return ShareResponse( - frontend_proxy_endpoints = [ - '' - ], - share_token = '' - ) - else: - return ShareResponse( - ) - """ - - def testShareResponse(self): - """Test ShareResponse""" - # 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/sdk/python/src/test/test_spark_data_sample.py b/sdk/python/src/test/test_spark_data_sample.py deleted file mode 100644 index 421d5dcd..00000000 --- a/sdk/python/src/test/test_spark_data_sample.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.spark_data_sample import SparkDataSample - -class TestSparkDataSample(unittest.TestCase): - """SparkDataSample unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SparkDataSample: - """Test SparkDataSample - include_optional 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 `SparkDataSample` - """ - model = SparkDataSample() - if include_optional: - return SparkDataSample( - rx = 1.337, - tx = 1.337 - ) - else: - return SparkDataSample( - ) - """ - - def testSparkDataSample(self): - """Test SparkDataSample""" - # 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/sdk/python/src/test/test_unaccess_request.py b/sdk/python/src/test/test_unaccess_request.py deleted file mode 100644 index ade50dff..00000000 --- a/sdk/python/src/test/test_unaccess_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.unaccess_request import UnaccessRequest - -class TestUnaccessRequest(unittest.TestCase): - """UnaccessRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnaccessRequest: - """Test UnaccessRequest - include_optional 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 `UnaccessRequest` - """ - model = UnaccessRequest() - if include_optional: - return UnaccessRequest( - frontend_token = '', - env_zid = '', - share_token = '' - ) - else: - return UnaccessRequest( - ) - """ - - def testUnaccessRequest(self): - """Test UnaccessRequest""" - # 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/sdk/python/src/test/test_unshare_request.py b/sdk/python/src/test/test_unshare_request.py deleted file mode 100644 index f0eccf47..00000000 --- a/sdk/python/src/test/test_unshare_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.unshare_request import UnshareRequest - -class TestUnshareRequest(unittest.TestCase): - """UnshareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnshareRequest: - """Test UnshareRequest - include_optional 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 `UnshareRequest` - """ - model = UnshareRequest() - if include_optional: - return UnshareRequest( - env_zid = '', - share_token = '', - reserved = True - ) - else: - return UnshareRequest( - ) - """ - - def testUnshareRequest(self): - """Test UnshareRequest""" - # 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/sdk/python/src/test/test_update_access_request.py b/sdk/python/src/test/test_update_access_request.py deleted file mode 100644 index 02c028bf..00000000 --- a/sdk/python/src/test/test_update_access_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.update_access_request import UpdateAccessRequest - -class TestUpdateAccessRequest(unittest.TestCase): - """UpdateAccessRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateAccessRequest: - """Test UpdateAccessRequest - include_optional 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 `UpdateAccessRequest` - """ - model = UpdateAccessRequest() - if include_optional: - return UpdateAccessRequest( - frontend_token = '', - bind_address = '', - description = '' - ) - else: - return UpdateAccessRequest( - ) - """ - - def testUpdateAccessRequest(self): - """Test UpdateAccessRequest""" - # 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/sdk/python/src/test/test_update_frontend_request.py b/sdk/python/src/test/test_update_frontend_request.py deleted file mode 100644 index 9546bbac..00000000 --- a/sdk/python/src/test/test_update_frontend_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.update_frontend_request import UpdateFrontendRequest - -class TestUpdateFrontendRequest(unittest.TestCase): - """UpdateFrontendRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateFrontendRequest: - """Test UpdateFrontendRequest - include_optional 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 `UpdateFrontendRequest` - """ - model = UpdateFrontendRequest() - if include_optional: - return UpdateFrontendRequest( - frontend_token = '', - public_name = '', - url_template = '' - ) - else: - return UpdateFrontendRequest( - ) - """ - - def testUpdateFrontendRequest(self): - """Test UpdateFrontendRequest""" - # 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/sdk/python/src/test/test_update_share_request.py b/sdk/python/src/test/test_update_share_request.py deleted file mode 100644 index 1d8df185..00000000 --- a/sdk/python/src/test/test_update_share_request.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.update_share_request import UpdateShareRequest - -class TestUpdateShareRequest(unittest.TestCase): - """UpdateShareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateShareRequest: - """Test UpdateShareRequest - include_optional 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 `UpdateShareRequest` - """ - model = UpdateShareRequest() - if include_optional: - return UpdateShareRequest( - share_token = '', - backend_proxy_endpoint = '', - add_access_grants = [ - '' - ], - remove_access_grants = [ - '' - ] - ) - else: - return UpdateShareRequest( - ) - """ - - def testUpdateShareRequest(self): - """Test UpdateShareRequest""" - # 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/sdk/python/src/test/test_verify200_response.py b/sdk/python/src/test/test_verify200_response.py deleted file mode 100644 index bf257b65..00000000 --- a/sdk/python/src/test/test_verify200_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.verify200_response import Verify200Response - -class TestVerify200Response(unittest.TestCase): - """Verify200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Verify200Response: - """Test Verify200Response - include_optional 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 `Verify200Response` - """ - model = Verify200Response() - if include_optional: - return Verify200Response( - email = '' - ) - else: - return Verify200Response( - ) - """ - - def testVerify200Response(self): - """Test Verify200Response""" - # 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/sdk/python/src/test/test_verify_request.py b/sdk/python/src/test/test_verify_request.py deleted file mode 100644 index c6f45d94..00000000 --- a/sdk/python/src/test/test_verify_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.verify_request import VerifyRequest - -class TestVerifyRequest(unittest.TestCase): - """VerifyRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VerifyRequest: - """Test VerifyRequest - include_optional 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 `VerifyRequest` - """ - model = VerifyRequest() - if include_optional: - return VerifyRequest( - register_token = '' - ) - else: - return VerifyRequest( - ) - """ - - def testVerifyRequest(self): - """Test VerifyRequest""" - # 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/sdk/python/src/test/test_version_inventory200_response.py b/sdk/python/src/test/test_version_inventory200_response.py deleted file mode 100644 index 7343fd1f..00000000 --- a/sdk/python/src/test/test_version_inventory200_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.version_inventory200_response import VersionInventory200Response - -class TestVersionInventory200Response(unittest.TestCase): - """VersionInventory200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VersionInventory200Response: - """Test VersionInventory200Response - include_optional 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 `VersionInventory200Response` - """ - model = VersionInventory200Response() - if include_optional: - return VersionInventory200Response( - controller_version = '' - ) - else: - return VersionInventory200Response( - ) - """ - - def testVersionInventory200Response(self): - """Test VersionInventory200Response""" - # 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/sdk/python/src/zrok_api/__init__.py b/sdk/python/src/zrok_api/__init__.py deleted file mode 100644 index bf54fba9..00000000 --- a/sdk/python/src/zrok_api/__init__.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "1.0.0" - -# import apis into sdk package -from zrok_api.api.account_api import AccountApi -from zrok_api.api.admin_api import AdminApi -from zrok_api.api.environment_api import EnvironmentApi -from zrok_api.api.metadata_api import MetadataApi -from zrok_api.api.share_api import ShareApi - -# import ApiClient -from zrok_api.api_response import ApiResponse -from zrok_api.api_client import ApiClient -from zrok_api.configuration import Configuration -from zrok_api.exceptions import OpenApiException -from zrok_api.exceptions import ApiTypeError -from zrok_api.exceptions import ApiValueError -from zrok_api.exceptions import ApiKeyError -from zrok_api.exceptions import ApiAttributeError -from zrok_api.exceptions import ApiException - -# import models into sdk package -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.models.configuration import Configuration -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.models.disable_request import DisableRequest -from zrok_api.models.enable_request import EnableRequest -from zrok_api.models.environment import Environment -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.frontend import Frontend -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.models.invite_request import InviteRequest -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.metrics import Metrics -from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.overview import Overview -from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.models.register_request import RegisterRequest -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.models.share import Share -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.models.update_share_request import UpdateShareRequest -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest -from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/src/zrok_api/api/__init__.py b/sdk/python/src/zrok_api/api/__init__.py deleted file mode 100644 index 714f0a37..00000000 --- a/sdk/python/src/zrok_api/api/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# flake8: noqa - -# import apis into api package -from zrok_api.api.account_api import AccountApi -from zrok_api.api.admin_api import AdminApi -from zrok_api.api.environment_api import EnvironmentApi -from zrok_api.api.metadata_api import MetadataApi -from zrok_api.api.share_api import ShareApi - diff --git a/sdk/python/src/zrok_api/api/account_api.py b/sdk/python/src/zrok_api/api/account_api.py deleted file mode 100644 index d6a93a82..00000000 --- a/sdk/python/src/zrok_api/api/account_api.py +++ /dev/null @@ -1,2261 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 StrictStr -from typing import Optional -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.models.invite_request import InviteRequest -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.models.register_request import RegisterRequest -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class AccountApi: - """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 change_password( - self, - body: Optional[ChangePasswordRequest] = 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, - ) -> None: - """change_password - - - :param body: - :type body: ChangePasswordRequest - :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._change_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '422': "str", - '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 change_password_with_http_info( - self, - body: Optional[ChangePasswordRequest] = 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[None]: - """change_password - - - :param body: - :type body: ChangePasswordRequest - :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._change_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '422': "str", - '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 change_password_without_preload_content( - self, - body: Optional[ChangePasswordRequest] = 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: - """change_password - - - :param body: - :type body: ChangePasswordRequest - :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._change_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '422': "str", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _change_password_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/changePassword', - 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 invite( - self, - body: Optional[InviteRequest] = 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, - ) -> None: - """invite - - - :param body: - :type body: InviteRequest - :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._invite_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': "str", - '401': None, - '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 invite_with_http_info( - self, - body: Optional[InviteRequest] = 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[None]: - """invite - - - :param body: - :type body: InviteRequest - :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._invite_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': "str", - '401': None, - '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 invite_without_preload_content( - self, - body: Optional[InviteRequest] = 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: - """invite - - - :param body: - :type body: InviteRequest - :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._invite_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': "str", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _invite_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/invite', - 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 login( - self, - body: Optional[LoginRequest] = 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, - ) -> str: - """login - - - :param body: - :type body: LoginRequest - :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._login_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': 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 login_with_http_info( - self, - body: Optional[LoginRequest] = 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[str]: - """login - - - :param body: - :type body: LoginRequest - :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._login_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': 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 login_without_preload_content( - self, - body: Optional[LoginRequest] = 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: - """login - - - :param body: - :type body: LoginRequest - :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._login_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _login_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/login', - 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 regenerate_account_token( - self, - body: Optional[RegenerateAccountTokenRequest] = 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, - ) -> RegenerateAccountToken200Response: - """regenerate_account_token - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._regenerate_account_token_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '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 regenerate_account_token_with_http_info( - self, - body: Optional[RegenerateAccountTokenRequest] = 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[RegenerateAccountToken200Response]: - """regenerate_account_token - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._regenerate_account_token_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '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 regenerate_account_token_without_preload_content( - self, - body: Optional[RegenerateAccountTokenRequest] = 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: - """regenerate_account_token - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._regenerate_account_token_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _regenerate_account_token_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/regenerateAccountToken', - 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 register( - self, - body: Optional[RegisterRequest] = 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, - ) -> RegenerateAccountToken200Response: - """register - - - :param body: - :type body: RegisterRequest - :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._register_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '422': "str", - '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 register_with_http_info( - self, - body: Optional[RegisterRequest] = 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[RegenerateAccountToken200Response]: - """register - - - :param body: - :type body: RegisterRequest - :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._register_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '422': "str", - '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 register_without_preload_content( - self, - body: Optional[RegisterRequest] = 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: - """register - - - :param body: - :type body: RegisterRequest - :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._register_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '422': "str", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _register_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/register', - 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 reset_password( - self, - body: Optional[ResetPasswordRequest] = 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, - ) -> None: - """reset_password - - - :param body: - :type body: ResetPasswordRequest - :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._reset_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '404': None, - '422': "str", - '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 reset_password_with_http_info( - self, - body: Optional[ResetPasswordRequest] = 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[None]: - """reset_password - - - :param body: - :type body: ResetPasswordRequest - :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._reset_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '404': None, - '422': "str", - '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 reset_password_without_preload_content( - self, - body: Optional[ResetPasswordRequest] = 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: - """reset_password - - - :param body: - :type body: ResetPasswordRequest - :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._reset_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '404': None, - '422': "str", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _reset_password_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/resetPassword', - 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 reset_password_request( - self, - body: Optional[RegenerateAccountTokenRequest] = 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, - ) -> None: - """reset_password_request - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._reset_password_request_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '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 reset_password_request_with_http_info( - self, - body: Optional[RegenerateAccountTokenRequest] = 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[None]: - """reset_password_request - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._reset_password_request_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '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 reset_password_request_without_preload_content( - self, - body: Optional[RegenerateAccountTokenRequest] = 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: - """reset_password_request - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._reset_password_request_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _reset_password_request_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/resetPasswordRequest', - 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 verify( - self, - body: Optional[VerifyRequest] = 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, - ) -> Verify200Response: - """verify - - - :param body: - :type body: VerifyRequest - :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._verify_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Verify200Response", - '404': None, - '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 verify_with_http_info( - self, - body: Optional[VerifyRequest] = 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[Verify200Response]: - """verify - - - :param body: - :type body: VerifyRequest - :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._verify_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Verify200Response", - '404': None, - '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 verify_without_preload_content( - self, - body: Optional[VerifyRequest] = 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: - """verify - - - :param body: - :type body: VerifyRequest - :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._verify_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Verify200Response", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _verify_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/verify', - 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/sdk/python/src/zrok_api/api/admin_api.py b/sdk/python/src/zrok_api/api/admin_api.py deleted file mode 100644 index 6e0952fe..00000000 --- a/sdk/python/src/zrok_api/api/admin_api.py +++ /dev/null @@ -1,3855 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import List, Optional -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.models.verify200_response import Verify200Response - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class AdminApi: - """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_organization_member( - self, - body: Optional[AddOrganizationMemberRequest] = 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, - ) -> None: - """add_organization_member - - - :param body: - :type body: AddOrganizationMemberRequest - :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_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '401': None, - '404': None, - '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_organization_member_with_http_info( - self, - body: Optional[AddOrganizationMemberRequest] = 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[None]: - """add_organization_member - - - :param body: - :type body: AddOrganizationMemberRequest - :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_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '401': None, - '404': None, - '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_organization_member_without_preload_content( - self, - body: Optional[AddOrganizationMemberRequest] = 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: - """add_organization_member - - - :param body: - :type body: AddOrganizationMemberRequest - :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_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _add_organization_member_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization/add', - 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_account( - self, - body: Optional[LoginRequest] = 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, - ) -> RegenerateAccountToken200Response: - """create_account - - - :param body: - :type body: LoginRequest - :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_account_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "RegenerateAccountToken200Response", - '401': None, - '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_account_with_http_info( - self, - body: Optional[LoginRequest] = 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[RegenerateAccountToken200Response]: - """create_account - - - :param body: - :type body: LoginRequest - :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_account_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "RegenerateAccountToken200Response", - '401': None, - '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_account_without_preload_content( - self, - body: Optional[LoginRequest] = 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: - """create_account - - - :param body: - :type body: LoginRequest - :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_account_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "RegenerateAccountToken200Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_account_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/account', - 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_frontend( - self, - body: Optional[CreateFrontendRequest] = 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, - ) -> CreateFrontend201Response: - """create_frontend - - - :param body: - :type body: CreateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateFrontend201Response", - '400': None, - '401': None, - '404': None, - '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_frontend_with_http_info( - self, - body: Optional[CreateFrontendRequest] = 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[CreateFrontend201Response]: - """create_frontend - - - :param body: - :type body: CreateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateFrontend201Response", - '400': None, - '401': None, - '404': None, - '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_frontend_without_preload_content( - self, - body: Optional[CreateFrontendRequest] = 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: - """create_frontend - - - :param body: - :type body: CreateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateFrontend201Response", - '400': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_frontend_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/frontend', - 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_identity( - self, - body: Optional[CreateIdentityRequest] = 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, - ) -> CreateIdentity201Response: - """create_identity - - - :param body: - :type body: CreateIdentityRequest - :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_identity_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '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_identity_with_http_info( - self, - body: Optional[CreateIdentityRequest] = 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[CreateIdentity201Response]: - """create_identity - - - :param body: - :type body: CreateIdentityRequest - :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_identity_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '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_identity_without_preload_content( - self, - body: Optional[CreateIdentityRequest] = 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: - """create_identity - - - :param body: - :type body: CreateIdentityRequest - :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_identity_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_identity_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/identity', - 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_organization( - self, - body: Optional[CreateOrganizationRequest] = 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, - ) -> CreateOrganization201Response: - """create_organization - - - :param body: - :type body: CreateOrganizationRequest - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateOrganization201Response", - '401': None, - '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_organization_with_http_info( - self, - body: Optional[CreateOrganizationRequest] = 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[CreateOrganization201Response]: - """create_organization - - - :param body: - :type body: CreateOrganizationRequest - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateOrganization201Response", - '401': None, - '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_organization_without_preload_content( - self, - body: Optional[CreateOrganizationRequest] = 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: - """create_organization - - - :param body: - :type body: CreateOrganizationRequest - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateOrganization201Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_organization_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization', - 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_frontend( - self, - body: Optional[CreateFrontend201Response] = 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, - ) -> None: - """delete_frontend - - - :param body: - :type body: CreateFrontend201Response - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_with_http_info( - self, - body: Optional[CreateFrontend201Response] = 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[None]: - """delete_frontend - - - :param body: - :type body: CreateFrontend201Response - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_without_preload_content( - self, - body: Optional[CreateFrontend201Response] = 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: - """delete_frontend - - - :param body: - :type body: CreateFrontend201Response - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_frontend_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/frontend', - 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_organization( - self, - body: Optional[CreateOrganization201Response] = 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, - ) -> None: - """delete_organization - - - :param body: - :type body: CreateOrganization201Response - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_organization_with_http_info( - self, - body: Optional[CreateOrganization201Response] = 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[None]: - """delete_organization - - - :param body: - :type body: CreateOrganization201Response - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_organization_without_preload_content( - self, - body: Optional[CreateOrganization201Response] = 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: - """delete_organization - - - :param body: - :type body: CreateOrganization201Response - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_organization_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/organization', - 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 grants( - self, - body: Optional[Verify200Response] = 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, - ) -> None: - """grants - - - :param body: - :type body: Verify200Response - :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._grants_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 grants_with_http_info( - self, - body: Optional[Verify200Response] = 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[None]: - """grants - - - :param body: - :type body: Verify200Response - :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._grants_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 grants_without_preload_content( - self, - body: Optional[Verify200Response] = 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: - """grants - - - :param body: - :type body: Verify200Response - :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._grants_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _grants_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/grants', - 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 invite_token_generate( - self, - body: Optional[InviteTokenGenerateRequest] = 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, - ) -> None: - """invite_token_generate - - - :param body: - :type body: InviteTokenGenerateRequest - :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._invite_token_generate_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '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 invite_token_generate_with_http_info( - self, - body: Optional[InviteTokenGenerateRequest] = 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[None]: - """invite_token_generate - - - :param body: - :type body: InviteTokenGenerateRequest - :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._invite_token_generate_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '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 invite_token_generate_without_preload_content( - self, - body: Optional[InviteTokenGenerateRequest] = 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: - """invite_token_generate - - - :param body: - :type body: InviteTokenGenerateRequest - :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._invite_token_generate_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _invite_token_generate_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/invite/token/generate', - 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_frontends( - 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, - ) -> List[ListFrontends200ResponseInner]: - """list_frontends - - - :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_frontends_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFrontends200ResponseInner]", - '401': None, - '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_frontends_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[List[ListFrontends200ResponseInner]]: - """list_frontends - - - :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_frontends_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFrontends200ResponseInner]", - '401': None, - '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_frontends_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: - """list_frontends - - - :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_frontends_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFrontends200ResponseInner]", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_frontends_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/frontends', - 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_organization_members( - self, - body: Optional[CreateOrganization201Response] = 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, - ) -> ListOrganizationMembers200Response: - """list_organization_members - - - :param body: - :type body: CreateOrganization201Response - :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_organization_members_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '401': None, - '404': None, - '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_organization_members_with_http_info( - self, - body: Optional[CreateOrganization201Response] = 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[ListOrganizationMembers200Response]: - """list_organization_members - - - :param body: - :type body: CreateOrganization201Response - :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_organization_members_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '401': None, - '404': None, - '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_organization_members_without_preload_content( - self, - body: Optional[CreateOrganization201Response] = 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_organization_members - - - :param body: - :type body: CreateOrganization201Response - :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_organization_members_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_organization_members_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization/list', - 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_organizations( - 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, - ) -> ListOrganizations200Response: - """list_organizations - - - :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_organizations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizations200Response", - '401': None, - '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_organizations_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[ListOrganizations200Response]: - """list_organizations - - - :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_organizations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizations200Response", - '401': None, - '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_organizations_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: - """list_organizations - - - :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_organizations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizations200Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_organizations_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/organizations', - 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 remove_organization_member( - self, - body: Optional[RemoveOrganizationMemberRequest] = 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, - ) -> None: - """remove_organization_member - - - :param body: - :type body: RemoveOrganizationMemberRequest - :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._remove_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 remove_organization_member_with_http_info( - self, - body: Optional[RemoveOrganizationMemberRequest] = 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[None]: - """remove_organization_member - - - :param body: - :type body: RemoveOrganizationMemberRequest - :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._remove_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 remove_organization_member_without_preload_content( - self, - body: Optional[RemoveOrganizationMemberRequest] = 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: - """remove_organization_member - - - :param body: - :type body: RemoveOrganizationMemberRequest - :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._remove_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _remove_organization_member_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization/remove', - 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_frontend( - self, - body: Optional[UpdateFrontendRequest] = 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, - ) -> None: - """update_frontend - - - :param body: - :type body: UpdateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_with_http_info( - self, - body: Optional[UpdateFrontendRequest] = 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[None]: - """update_frontend - - - :param body: - :type body: UpdateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_without_preload_content( - self, - body: Optional[UpdateFrontendRequest] = 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: - """update_frontend - - - :param body: - :type body: UpdateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_frontend_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/frontend', - 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/sdk/python/src/zrok_api/api/environment_api.py b/sdk/python/src/zrok_api/api/environment_api.py deleted file mode 100644 index 4495d736..00000000 --- a/sdk/python/src/zrok_api/api/environment_api.py +++ /dev/null @@ -1,589 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.disable_request import DisableRequest -from zrok_api.models.enable_request import EnableRequest - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class EnvironmentApi: - """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 disable( - self, - body: Optional[DisableRequest] = 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, - ) -> None: - """disable - - - :param body: - :type body: DisableRequest - :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._disable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '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 disable_with_http_info( - self, - body: Optional[DisableRequest] = 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[None]: - """disable - - - :param body: - :type body: DisableRequest - :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._disable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '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 disable_without_preload_content( - self, - body: Optional[DisableRequest] = 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: - """disable - - - :param body: - :type body: DisableRequest - :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._disable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _disable_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/disable', - 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 enable( - self, - body: Optional[EnableRequest] = 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, - ) -> CreateIdentity201Response: - """enable - - - :param body: - :type body: EnableRequest - :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._enable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '404': None, - '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 enable_with_http_info( - self, - body: Optional[EnableRequest] = 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[CreateIdentity201Response]: - """enable - - - :param body: - :type body: EnableRequest - :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._enable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '404': None, - '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 enable_without_preload_content( - self, - body: Optional[EnableRequest] = 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: - """enable - - - :param body: - :type body: EnableRequest - :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._enable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _enable_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/enable', - 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/sdk/python/src/zrok_api/api/metadata_api.py b/sdk/python/src/zrok_api/api/metadata_api.py deleted file mode 100644 index ae780e05..00000000 --- a/sdk/python/src/zrok_api/api/metadata_api.py +++ /dev/null @@ -1,4242 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import List, Optional -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.models.configuration import Configuration -from zrok_api.models.environment import Environment -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.frontend import Frontend -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.metrics import Metrics -from zrok_api.models.overview import Overview -from zrok_api.models.share import Share -from zrok_api.models.version_inventory200_response import VersionInventory200Response - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class MetadataApi: - """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 client_version_check( - self, - body: Optional[ClientVersionCheckRequest] = 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, - ) -> None: - """client_version_check - - - :param body: - :type body: ClientVersionCheckRequest - :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._client_version_check_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - 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 client_version_check_with_http_info( - self, - body: Optional[ClientVersionCheckRequest] = 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[None]: - """client_version_check - - - :param body: - :type body: ClientVersionCheckRequest - :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._client_version_check_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - 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 client_version_check_without_preload_content( - self, - body: Optional[ClientVersionCheckRequest] = 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: - """client_version_check - - - :param body: - :type body: ClientVersionCheckRequest - :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._client_version_check_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _client_version_check_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/clientVersionCheck', - 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 configuration( - 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, - ) -> Configuration: - """configuration - - - :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._configuration_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Configuration", - } - 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 configuration_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[Configuration]: - """configuration - - - :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._configuration_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Configuration", - } - 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 configuration_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: - """configuration - - - :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._configuration_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Configuration", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _configuration_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/configuration', - 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 get_account_detail( - 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, - ) -> List[Environment]: - """get_account_detail - - - :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_account_detail_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Environment]", - '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_account_detail_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[List[Environment]]: - """get_account_detail - - - :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_account_detail_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Environment]", - '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_account_detail_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_account_detail - - - :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_account_detail_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Environment]", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_account_detail_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/account', - 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 get_account_metrics( - self, - 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, - ) -> Metrics: - """get_account_metrics - - - :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._get_account_metrics_serialize( - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '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_account_metrics_with_http_info( - self, - 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[Metrics]: - """get_account_metrics - - - :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._get_account_metrics_serialize( - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '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_account_metrics_without_preload_content( - self, - 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: - """get_account_metrics - - - :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._get_account_metrics_serialize( - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_account_metrics_serialize( - self, - 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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/metrics/account', - 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 get_environment_detail( - self, - env_zid: StrictStr, - _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, - ) -> EnvironmentAndResources: - """get_environment_detail - - - :param env_zid: (required) - :type env_zid: 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._get_environment_detail_serialize( - env_zid=env_zid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentAndResources", - '401': None, - '404': None, - '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_environment_detail_with_http_info( - self, - env_zid: StrictStr, - _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[EnvironmentAndResources]: - """get_environment_detail - - - :param env_zid: (required) - :type env_zid: 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._get_environment_detail_serialize( - env_zid=env_zid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentAndResources", - '401': None, - '404': None, - '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_environment_detail_without_preload_content( - self, - env_zid: StrictStr, - _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_environment_detail - - - :param env_zid: (required) - :type env_zid: 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._get_environment_detail_serialize( - env_zid=env_zid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentAndResources", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_environment_detail_serialize( - self, - env_zid, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env_zid is not None: - _path_params['envZId'] = env_zid - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/environment/{envZId}', - 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 get_environment_metrics( - self, - env_id: StrictStr, - 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, - ) -> Metrics: - """get_environment_metrics - - - :param env_id: (required) - :type env_id: str - :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._get_environment_metrics_serialize( - env_id=env_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': "Metrics", - '400': None, - '401': None, - '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_environment_metrics_with_http_info( - self, - env_id: StrictStr, - 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[Metrics]: - """get_environment_metrics - - - :param env_id: (required) - :type env_id: str - :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._get_environment_metrics_serialize( - env_id=env_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': "Metrics", - '400': None, - '401': None, - '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_environment_metrics_without_preload_content( - self, - env_id: StrictStr, - 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: - """get_environment_metrics - - - :param env_id: (required) - :type env_id: str - :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._get_environment_metrics_serialize( - env_id=env_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': "Metrics", - '400': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_environment_metrics_serialize( - self, - env_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env_id is not None: - _path_params['envId'] = env_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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/metrics/environment/{envId}', - 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 get_frontend_detail( - self, - frontend_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, - ) -> Frontend: - """get_frontend_detail - - - :param frontend_id: (required) - :type frontend_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._get_frontend_detail_serialize( - frontend_id=frontend_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Frontend", - '401': None, - '404': None, - '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_frontend_detail_with_http_info( - self, - frontend_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[Frontend]: - """get_frontend_detail - - - :param frontend_id: (required) - :type frontend_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._get_frontend_detail_serialize( - frontend_id=frontend_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Frontend", - '401': None, - '404': None, - '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_frontend_detail_without_preload_content( - self, - frontend_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: - """get_frontend_detail - - - :param frontend_id: (required) - :type frontend_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._get_frontend_detail_serialize( - frontend_id=frontend_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Frontend", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_frontend_detail_serialize( - self, - frontend_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if frontend_id is not None: - _path_params['frontendId'] = frontend_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/frontend/{frontendId}', - 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 get_share_detail( - self, - share_token: StrictStr, - _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, - ) -> Share: - """get_share_detail - - - :param share_token: (required) - :type share_token: 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._get_share_detail_serialize( - share_token=share_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Share", - '401': None, - '404': None, - '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_share_detail_with_http_info( - self, - share_token: StrictStr, - _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[Share]: - """get_share_detail - - - :param share_token: (required) - :type share_token: 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._get_share_detail_serialize( - share_token=share_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Share", - '401': None, - '404': None, - '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_share_detail_without_preload_content( - self, - share_token: StrictStr, - _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_share_detail - - - :param share_token: (required) - :type share_token: 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._get_share_detail_serialize( - share_token=share_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Share", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_share_detail_serialize( - self, - share_token, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if share_token is not None: - _path_params['shareToken'] = share_token - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/share/{shareToken}', - 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 get_share_metrics( - self, - share_token: StrictStr, - 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, - ) -> Metrics: - """get_share_metrics - - - :param share_token: (required) - :type share_token: str - :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._get_share_metrics_serialize( - share_token=share_token, - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '401': None, - '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_share_metrics_with_http_info( - self, - share_token: StrictStr, - 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[Metrics]: - """get_share_metrics - - - :param share_token: (required) - :type share_token: str - :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._get_share_metrics_serialize( - share_token=share_token, - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '401': None, - '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_share_metrics_without_preload_content( - self, - share_token: StrictStr, - 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: - """get_share_metrics - - - :param share_token: (required) - :type share_token: str - :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._get_share_metrics_serialize( - share_token=share_token, - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_share_metrics_serialize( - self, - share_token, - 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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if share_token is not None: - _path_params['shareToken'] = share_token - # 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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/metrics/share/{shareToken}', - 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 get_sparklines( - self, - body: Optional[GetSparklinesRequest] = 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, - ) -> GetSparklines200Response: - """get_sparklines - - - :param body: - :type body: GetSparklinesRequest - :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_sparklines_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSparklines200Response", - '401': None, - '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_sparklines_with_http_info( - self, - body: Optional[GetSparklinesRequest] = 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[GetSparklines200Response]: - """get_sparklines - - - :param body: - :type body: GetSparklinesRequest - :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_sparklines_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSparklines200Response", - '401': None, - '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_sparklines_without_preload_content( - self, - body: Optional[GetSparklinesRequest] = 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: - """get_sparklines - - - :param body: - :type body: GetSparklinesRequest - :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_sparklines_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSparklines200Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_sparklines_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/sparklines', - 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_memberships( - 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, - ) -> ListMemberships200Response: - """list_memberships - - - :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_memberships_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMemberships200Response", - '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_memberships_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[ListMemberships200Response]: - """list_memberships - - - :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_memberships_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMemberships200Response", - '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_memberships_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: - """list_memberships - - - :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_memberships_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMemberships200Response", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_memberships_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/memberships', - 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_org_members( - self, - organization_token: StrictStr, - _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, - ) -> ListOrganizationMembers200Response: - """list_org_members - - - :param organization_token: (required) - :type organization_token: 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._list_org_members_serialize( - organization_token=organization_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '404': None, - '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_org_members_with_http_info( - self, - organization_token: StrictStr, - _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[ListOrganizationMembers200Response]: - """list_org_members - - - :param organization_token: (required) - :type organization_token: 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._list_org_members_serialize( - organization_token=organization_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '404': None, - '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_org_members_without_preload_content( - self, - organization_token: StrictStr, - _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_org_members - - - :param organization_token: (required) - :type organization_token: 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._list_org_members_serialize( - organization_token=organization_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_org_members_serialize( - self, - organization_token, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if organization_token is not None: - _path_params['organizationToken'] = organization_token - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/members/{organizationToken}', - 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 org_account_overview( - self, - organization_token: StrictStr, - account_email: StrictStr, - _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, - ) -> Overview: - """org_account_overview - - - :param organization_token: (required) - :type organization_token: str - :param account_email: (required) - :type account_email: 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._org_account_overview_serialize( - organization_token=organization_token, - account_email=account_email, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '404': None, - '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 org_account_overview_with_http_info( - self, - organization_token: StrictStr, - account_email: StrictStr, - _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[Overview]: - """org_account_overview - - - :param organization_token: (required) - :type organization_token: str - :param account_email: (required) - :type account_email: 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._org_account_overview_serialize( - organization_token=organization_token, - account_email=account_email, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '404': None, - '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 org_account_overview_without_preload_content( - self, - organization_token: StrictStr, - account_email: StrictStr, - _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: - """org_account_overview - - - :param organization_token: (required) - :type organization_token: str - :param account_email: (required) - :type account_email: 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._org_account_overview_serialize( - organization_token=organization_token, - account_email=account_email, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _org_account_overview_serialize( - self, - organization_token, - account_email, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if organization_token is not None: - _path_params['organizationToken'] = organization_token - if account_email is not None: - _path_params['accountEmail'] = account_email - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/overview/{organizationToken}/{accountEmail}', - 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 overview( - 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, - ) -> Overview: - """overview - - - :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._overview_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '500': "str", - } - 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 overview_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[Overview]: - """overview - - - :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._overview_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '500': "str", - } - 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 overview_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: - """overview - - - :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._overview_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _overview_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/overview', - 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 version( - 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, - ) -> str: - """version - - - :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._version_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - 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 version_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[str]: - """version - - - :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._version_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - 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 version_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: - """version - - - :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._version_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _version_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/version', - 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 version_inventory( - 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, - ) -> VersionInventory200Response: - """version_inventory - - - :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._version_inventory_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionInventory200Response", - } - 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 version_inventory_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[VersionInventory200Response]: - """version_inventory - - - :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._version_inventory_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionInventory200Response", - } - 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 version_inventory_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: - """version_inventory - - - :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._version_inventory_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionInventory200Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _version_inventory_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/versions', - 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/sdk/python/src/zrok_api/api/share_api.py b/sdk/python/src/zrok_api/api/share_api.py deleted file mode 100644 index 626035ee..00000000 --- a/sdk/python/src/zrok_api/api/share_api.py +++ /dev/null @@ -1,1712 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.models.update_share_request import UpdateShareRequest - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class ShareApi: - """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 access( - self, - body: Optional[AccessRequest] = 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, - ) -> Access201Response: - """access - - - :param body: - :type body: AccessRequest - :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._access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "Access201Response", - '401': None, - '404': None, - '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 access_with_http_info( - self, - body: Optional[AccessRequest] = 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[Access201Response]: - """access - - - :param body: - :type body: AccessRequest - :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._access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "Access201Response", - '401': None, - '404': None, - '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 access_without_preload_content( - self, - body: Optional[AccessRequest] = 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: - """access - - - :param body: - :type body: AccessRequest - :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._access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "Access201Response", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _access_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/access', - 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 share( - self, - body: Optional[ShareRequest] = 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, - ) -> ShareResponse: - """share - - - :param body: - :type body: ShareRequest - :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._share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareResponse", - '401': None, - '404': None, - '409': None, - '422': None, - '500': "str", - } - 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 share_with_http_info( - self, - body: Optional[ShareRequest] = 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[ShareResponse]: - """share - - - :param body: - :type body: ShareRequest - :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._share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareResponse", - '401': None, - '404': None, - '409': None, - '422': None, - '500': "str", - } - 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 share_without_preload_content( - self, - body: Optional[ShareRequest] = 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: - """share - - - :param body: - :type body: ShareRequest - :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._share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareResponse", - '401': None, - '404': None, - '409': None, - '422': None, - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _share_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/share', - 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 unaccess( - self, - body: Optional[UnaccessRequest] = 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, - ) -> None: - """unaccess - - - :param body: - :type body: UnaccessRequest - :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._unaccess_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 unaccess_with_http_info( - self, - body: Optional[UnaccessRequest] = 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[None]: - """unaccess - - - :param body: - :type body: UnaccessRequest - :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._unaccess_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 unaccess_without_preload_content( - self, - body: Optional[UnaccessRequest] = 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: - """unaccess - - - :param body: - :type body: UnaccessRequest - :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._unaccess_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _unaccess_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/unaccess', - 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 unshare( - self, - body: Optional[UnshareRequest] = 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, - ) -> None: - """unshare - - - :param body: - :type body: UnshareRequest - :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._unshare_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': "str", - } - 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 unshare_with_http_info( - self, - body: Optional[UnshareRequest] = 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[None]: - """unshare - - - :param body: - :type body: UnshareRequest - :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._unshare_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': "str", - } - 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 unshare_without_preload_content( - self, - body: Optional[UnshareRequest] = 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: - """unshare - - - :param body: - :type body: UnshareRequest - :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._unshare_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _unshare_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/unshare', - 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_access( - self, - body: Optional[UpdateAccessRequest] = 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, - ) -> None: - """update_access - - - :param body: - :type body: UpdateAccessRequest - :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_access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_access_with_http_info( - self, - body: Optional[UpdateAccessRequest] = 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[None]: - """update_access - - - :param body: - :type body: UpdateAccessRequest - :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_access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_access_without_preload_content( - self, - body: Optional[UpdateAccessRequest] = 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: - """update_access - - - :param body: - :type body: UpdateAccessRequest - :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_access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_access_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/access', - 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_share( - self, - body: Optional[UpdateShareRequest] = 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, - ) -> None: - """update_share - - - :param body: - :type body: UpdateShareRequest - :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_share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '404': None, - '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_share_with_http_info( - self, - body: Optional[UpdateShareRequest] = 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[None]: - """update_share - - - :param body: - :type body: UpdateShareRequest - :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_share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '404': None, - '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_share_without_preload_content( - self, - body: Optional[UpdateShareRequest] = 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: - """update_share - - - :param body: - :type body: UpdateShareRequest - :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_share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_share_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/share', - 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/sdk/python/src/zrok_api/api_client.py b/sdk/python/src/zrok_api/api_client.py deleted file mode 100644 index 7b417812..00000000 --- a/sdk/python/src/zrok_api/api_client.py +++ /dev/null @@ -1,797 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import datetime -from dateutil.parser import parse -from enum import Enum -import decimal -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union -from pydantic import SecretStr - -from zrok_api.configuration import Configuration -from zrok_api.api_response import ApiResponse, T as ApiResponseT -import zrok_api.models -from zrok_api import rest -from zrok_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - -RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> RequestSerialized: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - if files: - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None or self.configuration.ignore_operation_servers: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - raise e - - return response_data - - def response_deserialize( - self, - response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None - ) -> ApiResponse[ApiResponseT]: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - msg = "RESTResponse.read() must be called before passing it to response_deserialize()" - assert response_data.data is not None, msg - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - # deserialize response data - response_text = None - return_data = None - try: - if response_type == "bytearray": - return_data = response_data.data - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - elif response_type is not None: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type, content_type) - finally: - if not 200 <= response_data.status <= 299: - raise ApiException.from_response( - http_resp=response_data, - body=response_text, - data=return_data, - ) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is SecretStr, return obj.get_secret_value() - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is decimal.Decimal return string representation. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, Enum): - return obj.value - elif isinstance(obj, SecretStr): - return obj.get_secret_value() - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - elif isinstance(obj, decimal.Decimal): - return str(obj) - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): - obj_dict = obj.to_dict() - else: - obj_dict = obj.__dict__ - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - :param content_type: content type of response. - - :return: deserialized object. - """ - - # fetch data from response object - if content_type is None: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): - if response_text == "": - data = "" - else: - data = json.loads(response_text) - elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): - data = response_text - else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) - assert m is not None, "Malformed List type definition" - sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) - assert m is not None, "Malformed Dict type definition" - sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(zrok_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - elif klass == decimal.Decimal: - return decimal.Decimal(data) - elif issubclass(klass, Enum): - return self.__deserialize_enum(data, klass) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, quote(str(value))) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(map(str, item)) for item in new_params]) - - def files_parameters( - self, - files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], - ): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - for k, v in files.items(): - if isinstance(v, str): - with open(v, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - elif isinstance(v, bytes): - filename = k - filedata = v - elif isinstance(v, tuple): - filename, filedata = v - elif isinstance(v, list): - for file_param in v: - params.extend(self.files_parameters({k: file_param})) - continue - else: - raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) - assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __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. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/sdk/python/src/zrok_api/api_response.py b/sdk/python/src/zrok_api/api_response.py deleted file mode 100644 index 9bc7c11f..00000000 --- a/sdk/python/src/zrok_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Optional, Generic, Mapping, TypeVar -from pydantic import Field, StrictInt, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/sdk/python/src/zrok_api/configuration.py b/sdk/python/src/zrok_api/configuration.py deleted file mode 100644 index d504babc..00000000 --- a/sdk/python/src/zrok_api/configuration.py +++ /dev/null @@ -1,602 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import http.client as httplib -import logging -from logging import FileHandler -import multiprocessing -import sys -from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from typing_extensions import NotRequired, Self - -import urllib3 - - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -ServerVariablesT = Dict[str, str] - -GenericAuthSetting = TypedDict( - "GenericAuthSetting", - { - "type": str, - "in": str, - "key": str, - "value": str, - }, -) - - -OAuth2AuthSetting = TypedDict( - "OAuth2AuthSetting", - { - "type": Literal["oauth2"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -APIKeyAuthSetting = TypedDict( - "APIKeyAuthSetting", - { - "type": Literal["api_key"], - "in": str, - "key": str, - "value": Optional[str], - }, -) - - -BasicAuthSetting = TypedDict( - "BasicAuthSetting", - { - "type": Literal["basic"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": Optional[str], - }, -) - - -BearerFormatAuthSetting = TypedDict( - "BearerFormatAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "format": Literal["JWT"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -BearerAuthSetting = TypedDict( - "BearerAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -HTTPSignatureAuthSetting = TypedDict( - "HTTPSignatureAuthSetting", - { - "type": Literal["http-signature"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": None, - }, -) - - -AuthSettings = TypedDict( - "AuthSettings", - { - "key": APIKeyAuthSetting, - }, - total=False, -) - - -class HostSettingVariable(TypedDict): - description: str - default_value: str - enum_values: List[str] - - -class HostSetting(TypedDict): - url: str - description: str - variables: NotRequired[Dict[str, HostSettingVariable]] - - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: Number of retries for API requests. - :param ca_cert_data: verify the peer using concatenated CA certificate data - in PEM (str) or DER (bytes) format. - - :Example: - - API Key Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - cookieAuth: # name for the security scheme - type: apiKey - in: cookie - name: JSESSIONID # cookie name - - You can programmatically set the cookie: - -conf = zrok_api.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} -) - - The following cookie will be added to the HTTP request: - Cookie: JSESSIONID abc123 - """ - - _default: ClassVar[Optional[Self]] = None - - def __init__( - self, - host: Optional[str]=None, - api_key: Optional[Dict[str, str]]=None, - api_key_prefix: Optional[Dict[str, str]]=None, - username: Optional[str]=None, - password: Optional[str]=None, - access_token: Optional[str]=None, - server_index: Optional[int]=None, - server_variables: Optional[ServerVariablesT]=None, - server_operation_index: Optional[Dict[int, int]]=None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, - ignore_operation_servers: bool=False, - ssl_ca_cert: Optional[str]=None, - retries: Optional[int] = None, - ca_cert_data: Optional[Union[str, bytes]] = None, - *, - debug: Optional[bool] = None, - ) -> None: - """Constructor - """ - self._base_path = "/api/v1" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.ignore_operation_servers = ignore_operation_servers - """Ignore operation servers - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("zrok_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler: Optional[FileHandler] = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - if debug is not None: - self.debug = debug - else: - self.__debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.ca_cert_data = ca_cert_data - """Set this to verify the peer using PEM (str) or DER (bytes) - certificate data. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy: Optional[str] = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = retries - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name: str, value: Any) -> None: - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default: Optional[Self]) -> None: - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls) -> Self: - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls) -> Self: - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = cls() - return cls._default - - @property - def logger_file(self) -> Optional[str]: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value: Optional[str]) -> None: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self) -> bool: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value: bool) -> None: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self) -> str: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value: str) -> None: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - return None - - def get_basic_auth_token(self) -> Optional[str]: - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self)-> AuthSettings: - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth: AuthSettings = {} - if 'key' in self.api_key: - auth['key'] = { - 'type': 'api_key', - 'in': 'header', - 'key': 'x-token', - 'value': self.get_api_key_with_prefix( - 'key', - ), - } - return auth - - def to_debug_report(self) -> str: - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self) -> List[HostSetting]: - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "/api/v1", - 'description': "No description provided", - } - ] - - def get_host_from_settings( - self, - index: Optional[int], - variables: Optional[ServerVariablesT]=None, - servers: Optional[List[HostSetting]]=None, - ) -> str: - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self) -> str: - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value: str) -> None: - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/sdk/python/src/zrok_api/exceptions.py b/sdk/python/src/zrok_api/exceptions.py deleted file mode 100644 index 1b37d862..00000000 --- a/sdk/python/src/zrok_api/exceptions.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -from typing import Any, Optional -from typing_extensions import Self - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__( - self, - status=None, - reason=None, - http_resp=None, - *, - body: Optional[str] = None, - data: Optional[Any] = None, - ) -> None: - self.status = status - self.reason = reason - self.body = body - self.data = data - self.headers = None - - if http_resp: - if self.status is None: - self.status = http_resp.status - if self.reason is None: - self.reason = http_resp.reason - if self.body is None: - try: - self.body = http_resp.data.decode('utf-8') - except Exception: - pass - self.headers = http_resp.getheaders() - - @classmethod - def from_response( - cls, - *, - http_resp, - body: Optional[str], - data: Optional[Any], - ) -> Self: - if http_resp.status == 400: - raise BadRequestException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 401: - raise UnauthorizedException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 403: - raise ForbiddenException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 404: - raise NotFoundException(http_resp=http_resp, body=body, data=data) - - # Added new conditions for 409 and 422 - if http_resp.status == 409: - raise ConflictException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 422: - raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) - - if 500 <= http_resp.status <= 599: - raise ServiceException(http_resp=http_resp, body=body, data=data) - raise ApiException(http_resp=http_resp, body=body, data=data) - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.data or self.body: - error_message += "HTTP response body: {0}\n".format(self.data or self.body) - - return error_message - - -class BadRequestException(ApiException): - pass - - -class NotFoundException(ApiException): - pass - - -class UnauthorizedException(ApiException): - pass - - -class ForbiddenException(ApiException): - pass - - -class ServiceException(ApiException): - pass - - -class ConflictException(ApiException): - """Exception for HTTP 409 Conflict.""" - pass - - -class UnprocessableEntityException(ApiException): - """Exception for HTTP 422 Unprocessable Entity.""" - pass - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/sdk/python/src/zrok_api/models/__init__.py b/sdk/python/src/zrok_api/models/__init__.py deleted file mode 100644 index c4f5e3c4..00000000 --- a/sdk/python/src/zrok_api/models/__init__.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.models.configuration import Configuration -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.models.disable_request import DisableRequest -from zrok_api.models.enable_request import EnableRequest -from zrok_api.models.environment import Environment -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.frontend import Frontend -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.models.invite_request import InviteRequest -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.metrics import Metrics -from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.overview import Overview -from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.models.register_request import RegisterRequest -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.models.share import Share -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.models.update_share_request import UpdateShareRequest -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest -from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/src/zrok_api/models/access201_response.py b/sdk/python/src/zrok_api/models/access201_response.py deleted file mode 100644 index 6058082c..00000000 --- a/sdk/python/src/zrok_api/models/access201_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class Access201Response(BaseModel): - """ - Access201Response - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - __properties: ClassVar[List[str]] = ["frontendToken", "backendMode"] - - 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 Access201Response 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 Access201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "backendMode": obj.get("backendMode") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/access_request.py b/sdk/python/src/zrok_api/models/access_request.py deleted file mode 100644 index 18eb9837..00000000 --- a/sdk/python/src/zrok_api/models/access_request.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class AccessRequest(BaseModel): - """ - AccessRequest - """ # noqa: E501 - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["envZId", "shareToken", "bindAddress", "description"] - - 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 AccessRequest 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 AccessRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "envZId": obj.get("envZId"), - "shareToken": obj.get("shareToken"), - "bindAddress": obj.get("bindAddress"), - "description": obj.get("description") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/add_organization_member_request.py b/sdk/python/src/zrok_api/models/add_organization_member_request.py deleted file mode 100644 index d6db9e38..00000000 --- a/sdk/python/src/zrok_api/models/add_organization_member_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class AddOrganizationMemberRequest(BaseModel): - """ - AddOrganizationMemberRequest - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - email: Optional[StrictStr] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["organizationToken", "email", "admin"] - - 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 AddOrganizationMemberRequest 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 AddOrganizationMemberRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "email": obj.get("email"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/auth_user.py b/sdk/python/src/zrok_api/models/auth_user.py deleted file mode 100644 index b8e1718d..00000000 --- a/sdk/python/src/zrok_api/models/auth_user.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 AuthUser(BaseModel): - """ - AuthUser - """ # noqa: E501 - username: Optional[StrictStr] = None - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["username", "password"] - - 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 AuthUser 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 AuthUser from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "username": obj.get("username"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/change_password_request.py b/sdk/python/src/zrok_api/models/change_password_request.py deleted file mode 100644 index dcbdafb3..00000000 --- a/sdk/python/src/zrok_api/models/change_password_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ChangePasswordRequest(BaseModel): - """ - ChangePasswordRequest - """ # noqa: E501 - email: Optional[StrictStr] = None - old_password: Optional[StrictStr] = Field(default=None, alias="oldPassword") - new_password: Optional[StrictStr] = Field(default=None, alias="newPassword") - __properties: ClassVar[List[str]] = ["email", "oldPassword", "newPassword"] - - 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 ChangePasswordRequest 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 ChangePasswordRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "oldPassword": obj.get("oldPassword"), - "newPassword": obj.get("newPassword") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/client_version_check_request.py b/sdk/python/src/zrok_api/models/client_version_check_request.py deleted file mode 100644 index 813e57ac..00000000 --- a/sdk/python/src/zrok_api/models/client_version_check_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ClientVersionCheckRequest(BaseModel): - """ - ClientVersionCheckRequest - """ # noqa: E501 - client_version: Optional[StrictStr] = Field(default=None, alias="clientVersion") - __properties: ClassVar[List[str]] = ["clientVersion"] - - 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 ClientVersionCheckRequest 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 ClientVersionCheckRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "clientVersion": obj.get("clientVersion") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/configuration.py b/sdk/python/src/zrok_api/models/configuration.py deleted file mode 100644 index ed5ece38..00000000 --- a/sdk/python/src/zrok_api/models/configuration.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class Configuration(BaseModel): - """ - Configuration - """ # noqa: E501 - version: Optional[StrictStr] = None - tou_link: Optional[StrictStr] = Field(default=None, alias="touLink") - invites_open: Optional[StrictBool] = Field(default=None, alias="invitesOpen") - requires_invite_token: Optional[StrictBool] = Field(default=None, alias="requiresInviteToken") - invite_token_contact: Optional[StrictStr] = Field(default=None, alias="inviteTokenContact") - __properties: ClassVar[List[str]] = ["version", "touLink", "invitesOpen", "requiresInviteToken", "inviteTokenContact"] - - 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 Configuration 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 Configuration from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "version": obj.get("version"), - "touLink": obj.get("touLink"), - "invitesOpen": obj.get("invitesOpen"), - "requiresInviteToken": obj.get("requiresInviteToken"), - "inviteTokenContact": obj.get("inviteTokenContact") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/create_frontend201_response.py b/sdk/python/src/zrok_api/models/create_frontend201_response.py deleted file mode 100644 index 61fc364c..00000000 --- a/sdk/python/src/zrok_api/models/create_frontend201_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CreateFrontend201Response(BaseModel): - """ - CreateFrontend201Response - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - __properties: ClassVar[List[str]] = ["frontendToken"] - - 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 CreateFrontend201Response 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 CreateFrontend201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/create_frontend_request.py b/sdk/python/src/zrok_api/models/create_frontend_request.py deleted file mode 100644 index 5f7072e8..00000000 --- a/sdk/python/src/zrok_api/models/create_frontend_request.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CreateFrontendRequest(BaseModel): - """ - CreateFrontendRequest - """ # noqa: E501 - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - url_template: Optional[StrictStr] = None - public_name: Optional[StrictStr] = None - permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") - __properties: ClassVar[List[str]] = ["zId", "url_template", "public_name", "permissionMode"] - - @field_validator('permission_mode') - def permission_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['open', 'closed']): - raise ValueError("must be one of enum values ('open', 'closed')") - return value - - 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 CreateFrontendRequest 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 CreateFrontendRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "zId": obj.get("zId"), - "url_template": obj.get("url_template"), - "public_name": obj.get("public_name"), - "permissionMode": obj.get("permissionMode") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/create_identity201_response.py b/sdk/python/src/zrok_api/models/create_identity201_response.py deleted file mode 100644 index f2811bbf..00000000 --- a/sdk/python/src/zrok_api/models/create_identity201_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 CreateIdentity201Response(BaseModel): - """ - CreateIdentity201Response - """ # noqa: E501 - identity: Optional[StrictStr] = None - cfg: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["identity", "cfg"] - - 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 CreateIdentity201Response 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 CreateIdentity201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "identity": obj.get("identity"), - "cfg": obj.get("cfg") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/create_identity_request.py b/sdk/python/src/zrok_api/models/create_identity_request.py deleted file mode 100644 index 9f21d0a8..00000000 --- a/sdk/python/src/zrok_api/models/create_identity_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 CreateIdentityRequest(BaseModel): - """ - CreateIdentityRequest - """ # noqa: E501 - name: Optional[StrictStr] = None - __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 CreateIdentityRequest 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 CreateIdentityRequest 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/sdk/python/src/zrok_api/models/create_organization201_response.py b/sdk/python/src/zrok_api/models/create_organization201_response.py deleted file mode 100644 index 431bf57a..00000000 --- a/sdk/python/src/zrok_api/models/create_organization201_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CreateOrganization201Response(BaseModel): - """ - CreateOrganization201Response - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - __properties: ClassVar[List[str]] = ["organizationToken"] - - 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 CreateOrganization201Response 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 CreateOrganization201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/create_organization_request.py b/sdk/python/src/zrok_api/models/create_organization_request.py deleted file mode 100644 index de5d6572..00000000 --- a/sdk/python/src/zrok_api/models/create_organization_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 CreateOrganizationRequest(BaseModel): - """ - CreateOrganizationRequest - """ # noqa: E501 - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["description"] - - 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 CreateOrganizationRequest 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 CreateOrganizationRequest 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") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/disable_request.py b/sdk/python/src/zrok_api/models/disable_request.py deleted file mode 100644 index a6c30a01..00000000 --- a/sdk/python/src/zrok_api/models/disable_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 DisableRequest(BaseModel): - """ - DisableRequest - """ # noqa: E501 - identity: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["identity"] - - 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 DisableRequest 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 DisableRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "identity": obj.get("identity") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/enable_request.py b/sdk/python/src/zrok_api/models/enable_request.py deleted file mode 100644 index ad54886c..00000000 --- a/sdk/python/src/zrok_api/models/enable_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 EnableRequest(BaseModel): - """ - EnableRequest - """ # noqa: E501 - description: Optional[StrictStr] = None - host: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["description", "host"] - - 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 EnableRequest 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 EnableRequest 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"), - "host": obj.get("host") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/environment.py b/sdk/python/src/zrok_api/models/environment.py deleted file mode 100644 index 063ff59e..00000000 --- a/sdk/python/src/zrok_api/models/environment.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.spark_data_sample import SparkDataSample -from typing import Optional, Set -from typing_extensions import Self - -class Environment(BaseModel): - """ - Environment - """ # noqa: E501 - description: Optional[StrictStr] = None - host: Optional[StrictStr] = None - address: Optional[StrictStr] = None - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - activity: Optional[List[SparkDataSample]] = None - limited: Optional[StrictBool] = None - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["description", "host", "address", "zId", "activity", "limited", "createdAt", "updatedAt"] - - 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 Environment 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 activity (list) - _items = [] - if self.activity: - for _item_activity in self.activity: - if _item_activity: - _items.append(_item_activity.to_dict()) - _dict['activity'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Environment 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"), - "host": obj.get("host"), - "address": obj.get("address"), - "zId": obj.get("zId"), - "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, - "limited": obj.get("limited"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/environment_and_resources.py b/sdk/python/src/zrok_api/models/environment_and_resources.py deleted file mode 100644 index 65e4f257..00000000 --- a/sdk/python/src/zrok_api/models/environment_and_resources.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.environment import Environment -from zrok_api.models.frontend import Frontend -from zrok_api.models.share import Share -from typing import Optional, Set -from typing_extensions import Self - -class EnvironmentAndResources(BaseModel): - """ - EnvironmentAndResources - """ # noqa: E501 - environment: Optional[Environment] = None - frontends: Optional[List[Frontend]] = None - shares: Optional[List[Share]] = None - __properties: ClassVar[List[str]] = ["environment", "frontends", "shares"] - - 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 EnvironmentAndResources 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 frontends (list) - _items = [] - if self.frontends: - for _item_frontends in self.frontends: - if _item_frontends: - _items.append(_item_frontends.to_dict()) - _dict['frontends'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shares (list) - _items = [] - if self.shares: - for _item_shares in self.shares: - if _item_shares: - _items.append(_item_shares.to_dict()) - _dict['shares'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EnvironmentAndResources from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "environment": Environment.from_dict(obj["environment"]) if obj.get("environment") is not None else None, - "frontends": [Frontend.from_dict(_item) for _item in obj["frontends"]] if obj.get("frontends") is not None else None, - "shares": [Share.from_dict(_item) for _item in obj["shares"]] if obj.get("shares") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/frontend.py b/sdk/python/src/zrok_api/models/frontend.py deleted file mode 100644 index ae3c4c5d..00000000 --- a/sdk/python/src/zrok_api/models/frontend.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class Frontend(BaseModel): - """ - Frontend - """ # noqa: E501 - id: Optional[StrictInt] = None - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") - description: Optional[StrictStr] = None - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "frontendToken", "shareToken", "backendMode", "bindAddress", "description", "zId", "createdAt", "updatedAt"] - - 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 Frontend 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 Frontend 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"), - "frontendToken": obj.get("frontendToken"), - "shareToken": obj.get("shareToken"), - "backendMode": obj.get("backendMode"), - "bindAddress": obj.get("bindAddress"), - "description": obj.get("description"), - "zId": obj.get("zId"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/get_sparklines200_response.py b/sdk/python/src/zrok_api/models/get_sparklines200_response.py deleted file mode 100644 index 177b0efa..00000000 --- a/sdk/python/src/zrok_api/models/get_sparklines200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics import Metrics -from typing import Optional, Set -from typing_extensions import Self - -class GetSparklines200Response(BaseModel): - """ - GetSparklines200Response - """ # noqa: E501 - sparklines: Optional[List[Metrics]] = None - __properties: ClassVar[List[str]] = ["sparklines"] - - 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 GetSparklines200Response 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 sparklines (list) - _items = [] - if self.sparklines: - for _item_sparklines in self.sparklines: - if _item_sparklines: - _items.append(_item_sparklines.to_dict()) - _dict['sparklines'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetSparklines200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "sparklines": [Metrics.from_dict(_item) for _item in obj["sparklines"]] if obj.get("sparklines") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/get_sparklines_request.py b/sdk/python/src/zrok_api/models/get_sparklines_request.py deleted file mode 100644 index d9bef43d..00000000 --- a/sdk/python/src/zrok_api/models/get_sparklines_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 GetSparklinesRequest(BaseModel): - """ - GetSparklinesRequest - """ # noqa: E501 - account: Optional[StrictBool] = None - environments: Optional[List[StrictStr]] = None - shares: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["account", "environments", "shares"] - - 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 GetSparklinesRequest 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 GetSparklinesRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "account": obj.get("account"), - "environments": obj.get("environments"), - "shares": obj.get("shares") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/invite_request.py b/sdk/python/src/zrok_api/models/invite_request.py deleted file mode 100644 index 1c5bcc76..00000000 --- a/sdk/python/src/zrok_api/models/invite_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class InviteRequest(BaseModel): - """ - InviteRequest - """ # noqa: E501 - email: Optional[StrictStr] = None - invite_token: Optional[StrictStr] = Field(default=None, alias="inviteToken") - __properties: ClassVar[List[str]] = ["email", "inviteToken"] - - 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 InviteRequest 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 InviteRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "inviteToken": obj.get("inviteToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/invite_token_generate_request.py b/sdk/python/src/zrok_api/models/invite_token_generate_request.py deleted file mode 100644 index dd876de6..00000000 --- a/sdk/python/src/zrok_api/models/invite_token_generate_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class InviteTokenGenerateRequest(BaseModel): - """ - InviteTokenGenerateRequest - """ # noqa: E501 - invite_tokens: Optional[List[StrictStr]] = Field(default=None, alias="inviteTokens") - __properties: ClassVar[List[str]] = ["inviteTokens"] - - 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 InviteTokenGenerateRequest 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 InviteTokenGenerateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "inviteTokens": obj.get("inviteTokens") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py b/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py deleted file mode 100644 index ff9d1bb4..00000000 --- a/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ListFrontends200ResponseInner(BaseModel): - """ - ListFrontends200ResponseInner - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") - public_name: Optional[StrictStr] = Field(default=None, alias="publicName") - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["frontendToken", "zId", "urlTemplate", "publicName", "createdAt", "updatedAt"] - - 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 ListFrontends200ResponseInner 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 ListFrontends200ResponseInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "zId": obj.get("zId"), - "urlTemplate": obj.get("urlTemplate"), - "publicName": obj.get("publicName"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_memberships200_response.py b/sdk/python/src/zrok_api/models/list_memberships200_response.py deleted file mode 100644 index f3db8fa7..00000000 --- a/sdk/python/src/zrok_api/models/list_memberships200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner -from typing import Optional, Set -from typing_extensions import Self - -class ListMemberships200Response(BaseModel): - """ - ListMemberships200Response - """ # noqa: E501 - memberships: Optional[List[ListMemberships200ResponseMembershipsInner]] = None - __properties: ClassVar[List[str]] = ["memberships"] - - 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 ListMemberships200Response 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 memberships (list) - _items = [] - if self.memberships: - for _item_memberships in self.memberships: - if _item_memberships: - _items.append(_item_memberships.to_dict()) - _dict['memberships'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListMemberships200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "memberships": [ListMemberships200ResponseMembershipsInner.from_dict(_item) for _item in obj["memberships"]] if obj.get("memberships") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py b/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py deleted file mode 100644 index e39b07b8..00000000 --- a/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class ListMemberships200ResponseMembershipsInner(BaseModel): - """ - ListMemberships200ResponseMembershipsInner - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - description: Optional[StrictStr] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["organizationToken", "description", "admin"] - - 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 ListMemberships200ResponseMembershipsInner 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 ListMemberships200ResponseMembershipsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "description": obj.get("description"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_organization_members200_response.py b/sdk/python/src/zrok_api/models/list_organization_members200_response.py deleted file mode 100644 index 6058124c..00000000 --- a/sdk/python/src/zrok_api/models/list_organization_members200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner -from typing import Optional, Set -from typing_extensions import Self - -class ListOrganizationMembers200Response(BaseModel): - """ - ListOrganizationMembers200Response - """ # noqa: E501 - members: Optional[List[ListOrganizationMembers200ResponseMembersInner]] = None - __properties: ClassVar[List[str]] = ["members"] - - 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 ListOrganizationMembers200Response 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 members (list) - _items = [] - if self.members: - for _item_members in self.members: - if _item_members: - _items.append(_item_members.to_dict()) - _dict['members'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListOrganizationMembers200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "members": [ListOrganizationMembers200ResponseMembersInner.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py b/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py deleted file mode 100644 index 0266e878..00000000 --- a/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 ListOrganizationMembers200ResponseMembersInner(BaseModel): - """ - ListOrganizationMembers200ResponseMembersInner - """ # noqa: E501 - email: Optional[StrictStr] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["email", "admin"] - - 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 ListOrganizationMembers200ResponseMembersInner 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 ListOrganizationMembers200ResponseMembersInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_organizations200_response.py b/sdk/python/src/zrok_api/models/list_organizations200_response.py deleted file mode 100644 index 03fe63da..00000000 --- a/sdk/python/src/zrok_api/models/list_organizations200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner -from typing import Optional, Set -from typing_extensions import Self - -class ListOrganizations200Response(BaseModel): - """ - ListOrganizations200Response - """ # noqa: E501 - organizations: Optional[List[ListOrganizations200ResponseOrganizationsInner]] = None - __properties: ClassVar[List[str]] = ["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 ListOrganizations200Response 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_organizations in self.organizations: - if _item_organizations: - _items.append(_item_organizations.to_dict()) - _dict['organizations'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListOrganizations200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizations": [ListOrganizations200ResponseOrganizationsInner.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py b/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py deleted file mode 100644 index 463e142a..00000000 --- a/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ListOrganizations200ResponseOrganizationsInner(BaseModel): - """ - ListOrganizations200ResponseOrganizationsInner - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["organizationToken", "description"] - - 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 ListOrganizations200ResponseOrganizationsInner 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 ListOrganizations200ResponseOrganizationsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "description": obj.get("description") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/login_request.py b/sdk/python/src/zrok_api/models/login_request.py deleted file mode 100644 index 6ef640ea..00000000 --- a/sdk/python/src/zrok_api/models/login_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 LoginRequest(BaseModel): - """ - LoginRequest - """ # noqa: E501 - email: Optional[StrictStr] = None - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["email", "password"] - - 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 LoginRequest 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 LoginRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/metrics.py b/sdk/python/src/zrok_api/models/metrics.py deleted file mode 100644 index 40db696c..00000000 --- a/sdk/python/src/zrok_api/models/metrics.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics_sample import MetricsSample -from typing import Optional, Set -from typing_extensions import Self - -class Metrics(BaseModel): - """ - Metrics - """ # noqa: E501 - scope: Optional[StrictStr] = None - id: Optional[StrictStr] = None - period: Optional[Union[StrictFloat, StrictInt]] = None - samples: Optional[List[MetricsSample]] = None - __properties: ClassVar[List[str]] = ["scope", "id", "period", "samples"] - - 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 Metrics 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 samples (list) - _items = [] - if self.samples: - for _item_samples in self.samples: - if _item_samples: - _items.append(_item_samples.to_dict()) - _dict['samples'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Metrics from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "scope": obj.get("scope"), - "id": obj.get("id"), - "period": obj.get("period"), - "samples": [MetricsSample.from_dict(_item) for _item in obj["samples"]] if obj.get("samples") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/metrics_sample.py b/sdk/python/src/zrok_api/models/metrics_sample.py deleted file mode 100644 index 678d0c1e..00000000 --- a/sdk/python/src/zrok_api/models/metrics_sample.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self - -class MetricsSample(BaseModel): - """ - MetricsSample - """ # noqa: E501 - rx: Optional[Union[StrictFloat, StrictInt]] = None - tx: Optional[Union[StrictFloat, StrictInt]] = None - timestamp: Optional[Union[StrictFloat, StrictInt]] = None - __properties: ClassVar[List[str]] = ["rx", "tx", "timestamp"] - - 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 MetricsSample 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 MetricsSample from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "rx": obj.get("rx"), - "tx": obj.get("tx"), - "timestamp": obj.get("timestamp") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/overview.py b/sdk/python/src/zrok_api/models/overview.py deleted file mode 100644 index 2feb65cc..00000000 --- a/sdk/python/src/zrok_api/models/overview.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from typing import Optional, Set -from typing_extensions import Self - -class Overview(BaseModel): - """ - Overview - """ # noqa: E501 - account_limited: Optional[StrictBool] = Field(default=None, alias="accountLimited") - environments: Optional[List[EnvironmentAndResources]] = None - __properties: ClassVar[List[str]] = ["accountLimited", "environments"] - - 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 Overview 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 environments (list) - _items = [] - if self.environments: - for _item_environments in self.environments: - if _item_environments: - _items.append(_item_environments.to_dict()) - _dict['environments'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Overview from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "accountLimited": obj.get("accountLimited"), - "environments": [EnvironmentAndResources.from_dict(_item) for _item in obj["environments"]] if obj.get("environments") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/principal.py b/sdk/python/src/zrok_api/models/principal.py deleted file mode 100644 index 6ff9f756..00000000 --- a/sdk/python/src/zrok_api/models/principal.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 Principal(BaseModel): - """ - Principal - """ # noqa: E501 - id: Optional[StrictInt] = None - email: Optional[StrictStr] = None - token: Optional[StrictStr] = None - limitless: Optional[StrictBool] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["id", "email", "token", "limitless", "admin"] - - 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 Principal 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 Principal 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"), - "email": obj.get("email"), - "token": obj.get("token"), - "limitless": obj.get("limitless"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py b/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py deleted file mode 100644 index ccaf7ff4..00000000 --- a/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RegenerateAccountToken200Response(BaseModel): - """ - RegenerateAccountToken200Response - """ # noqa: E501 - account_token: Optional[StrictStr] = Field(default=None, alias="accountToken") - __properties: ClassVar[List[str]] = ["accountToken"] - - 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 RegenerateAccountToken200Response 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 RegenerateAccountToken200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "accountToken": obj.get("accountToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/regenerate_account_token_request.py b/sdk/python/src/zrok_api/models/regenerate_account_token_request.py deleted file mode 100644 index 32f2029f..00000000 --- a/sdk/python/src/zrok_api/models/regenerate_account_token_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RegenerateAccountTokenRequest(BaseModel): - """ - RegenerateAccountTokenRequest - """ # noqa: E501 - email_address: Optional[StrictStr] = Field(default=None, alias="emailAddress") - __properties: ClassVar[List[str]] = ["emailAddress"] - - 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 RegenerateAccountTokenRequest 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 RegenerateAccountTokenRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "emailAddress": obj.get("emailAddress") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/register_request.py b/sdk/python/src/zrok_api/models/register_request.py deleted file mode 100644 index f2bf90bd..00000000 --- a/sdk/python/src/zrok_api/models/register_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RegisterRequest(BaseModel): - """ - RegisterRequest - """ # noqa: E501 - register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["registerToken", "password"] - - 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 RegisterRequest 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 RegisterRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "registerToken": obj.get("registerToken"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/remove_organization_member_request.py b/sdk/python/src/zrok_api/models/remove_organization_member_request.py deleted file mode 100644 index 28b6bd25..00000000 --- a/sdk/python/src/zrok_api/models/remove_organization_member_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RemoveOrganizationMemberRequest(BaseModel): - """ - RemoveOrganizationMemberRequest - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - email: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["organizationToken", "email"] - - 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 RemoveOrganizationMemberRequest 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 RemoveOrganizationMemberRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "email": obj.get("email") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/reset_password_request.py b/sdk/python/src/zrok_api/models/reset_password_request.py deleted file mode 100644 index a81c4bd3..00000000 --- a/sdk/python/src/zrok_api/models/reset_password_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ResetPasswordRequest(BaseModel): - """ - ResetPasswordRequest - """ # noqa: E501 - reset_token: Optional[StrictStr] = Field(default=None, alias="resetToken") - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["resetToken", "password"] - - 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 ResetPasswordRequest 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 ResetPasswordRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "resetToken": obj.get("resetToken"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/share.py b/sdk/python/src/zrok_api/models/share.py deleted file mode 100644 index aaf72fb8..00000000 --- a/sdk/python/src/zrok_api/models/share.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.spark_data_sample import SparkDataSample -from typing import Optional, Set -from typing_extensions import Self - -class Share(BaseModel): - """ - Share - """ # noqa: E501 - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - frontend_selection: Optional[StrictStr] = Field(default=None, alias="frontendSelection") - frontend_endpoint: Optional[StrictStr] = Field(default=None, alias="frontendEndpoint") - backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") - reserved: Optional[StrictBool] = None - activity: Optional[List[SparkDataSample]] = None - limited: Optional[StrictBool] = None - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["shareToken", "zId", "shareMode", "backendMode", "frontendSelection", "frontendEndpoint", "backendProxyEndpoint", "reserved", "activity", "limited", "createdAt", "updatedAt"] - - 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 Share 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 activity (list) - _items = [] - if self.activity: - for _item_activity in self.activity: - if _item_activity: - _items.append(_item_activity.to_dict()) - _dict['activity'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Share from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "shareToken": obj.get("shareToken"), - "zId": obj.get("zId"), - "shareMode": obj.get("shareMode"), - "backendMode": obj.get("backendMode"), - "frontendSelection": obj.get("frontendSelection"), - "frontendEndpoint": obj.get("frontendEndpoint"), - "backendProxyEndpoint": obj.get("backendProxyEndpoint"), - "reserved": obj.get("reserved"), - "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, - "limited": obj.get("limited"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/share_request.py b/sdk/python/src/zrok_api/models/share_request.py deleted file mode 100644 index 7ea8d828..00000000 --- a/sdk/python/src/zrok_api/models/share_request.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.auth_user import AuthUser -from typing import Optional, Set -from typing_extensions import Self - -class ShareRequest(BaseModel): - """ - ShareRequest - """ # noqa: E501 - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") - frontend_selection: Optional[List[StrictStr]] = Field(default=None, alias="frontendSelection") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") - auth_scheme: Optional[StrictStr] = Field(default=None, alias="authScheme") - auth_users: Optional[List[AuthUser]] = Field(default=None, alias="authUsers") - oauth_provider: Optional[StrictStr] = Field(default=None, alias="oauthProvider") - oauth_email_domains: Optional[List[StrictStr]] = Field(default=None, alias="oauthEmailDomains") - oauth_authorization_check_interval: Optional[StrictStr] = Field(default=None, alias="oauthAuthorizationCheckInterval") - reserved: Optional[StrictBool] = None - permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") - access_grants: Optional[List[StrictStr]] = Field(default=None, alias="accessGrants") - unique_name: Optional[StrictStr] = Field(default=None, alias="uniqueName") - __properties: ClassVar[List[str]] = ["envZId", "shareMode", "frontendSelection", "backendMode", "backendProxyEndpoint", "authScheme", "authUsers", "oauthProvider", "oauthEmailDomains", "oauthAuthorizationCheckInterval", "reserved", "permissionMode", "accessGrants", "uniqueName"] - - @field_validator('share_mode') - def share_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['public', 'private']): - raise ValueError("must be one of enum values ('public', 'private')") - return value - - @field_validator('backend_mode') - def backend_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn']): - raise ValueError("must be one of enum values ('proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn')") - return value - - @field_validator('oauth_provider') - def oauth_provider_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['github', 'google']): - raise ValueError("must be one of enum values ('github', 'google')") - return value - - @field_validator('permission_mode') - def permission_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['open', 'closed']): - raise ValueError("must be one of enum values ('open', 'closed')") - return value - - 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 ShareRequest 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 auth_users (list) - _items = [] - if self.auth_users: - for _item_auth_users in self.auth_users: - if _item_auth_users: - _items.append(_item_auth_users.to_dict()) - _dict['authUsers'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ShareRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "envZId": obj.get("envZId"), - "shareMode": obj.get("shareMode"), - "frontendSelection": obj.get("frontendSelection"), - "backendMode": obj.get("backendMode"), - "backendProxyEndpoint": obj.get("backendProxyEndpoint"), - "authScheme": obj.get("authScheme"), - "authUsers": [AuthUser.from_dict(_item) for _item in obj["authUsers"]] if obj.get("authUsers") is not None else None, - "oauthProvider": obj.get("oauthProvider"), - "oauthEmailDomains": obj.get("oauthEmailDomains"), - "oauthAuthorizationCheckInterval": obj.get("oauthAuthorizationCheckInterval"), - "reserved": obj.get("reserved"), - "permissionMode": obj.get("permissionMode"), - "accessGrants": obj.get("accessGrants"), - "uniqueName": obj.get("uniqueName") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/share_response.py b/sdk/python/src/zrok_api/models/share_response.py deleted file mode 100644 index 8fa25d60..00000000 --- a/sdk/python/src/zrok_api/models/share_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ShareResponse(BaseModel): - """ - ShareResponse - """ # noqa: E501 - frontend_proxy_endpoints: Optional[List[StrictStr]] = Field(default=None, alias="frontendProxyEndpoints") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - __properties: ClassVar[List[str]] = ["frontendProxyEndpoints", "shareToken"] - - 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 ShareResponse 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 ShareResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendProxyEndpoints": obj.get("frontendProxyEndpoints"), - "shareToken": obj.get("shareToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/spark_data_sample.py b/sdk/python/src/zrok_api/models/spark_data_sample.py deleted file mode 100644 index 23c4ef51..00000000 --- a/sdk/python/src/zrok_api/models/spark_data_sample.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self - -class SparkDataSample(BaseModel): - """ - SparkDataSample - """ # noqa: E501 - rx: Optional[Union[StrictFloat, StrictInt]] = None - tx: Optional[Union[StrictFloat, StrictInt]] = None - __properties: ClassVar[List[str]] = ["rx", "tx"] - - 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 SparkDataSample 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 SparkDataSample from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "rx": obj.get("rx"), - "tx": obj.get("tx") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/unaccess_request.py b/sdk/python/src/zrok_api/models/unaccess_request.py deleted file mode 100644 index 19a3f5df..00000000 --- a/sdk/python/src/zrok_api/models/unaccess_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UnaccessRequest(BaseModel): - """ - UnaccessRequest - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - __properties: ClassVar[List[str]] = ["frontendToken", "envZId", "shareToken"] - - 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 UnaccessRequest 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 UnaccessRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "envZId": obj.get("envZId"), - "shareToken": obj.get("shareToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/unshare_request.py b/sdk/python/src/zrok_api/models/unshare_request.py deleted file mode 100644 index 3ff557e1..00000000 --- a/sdk/python/src/zrok_api/models/unshare_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class UnshareRequest(BaseModel): - """ - UnshareRequest - """ # noqa: E501 - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - reserved: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["envZId", "shareToken", "reserved"] - - 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 UnshareRequest 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 UnshareRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "envZId": obj.get("envZId"), - "shareToken": obj.get("shareToken"), - "reserved": obj.get("reserved") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/update_access_request.py b/sdk/python/src/zrok_api/models/update_access_request.py deleted file mode 100644 index a27f9623..00000000 --- a/sdk/python/src/zrok_api/models/update_access_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UpdateAccessRequest(BaseModel): - """ - UpdateAccessRequest - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["frontendToken", "bindAddress", "description"] - - 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 UpdateAccessRequest 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 UpdateAccessRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "bindAddress": obj.get("bindAddress"), - "description": obj.get("description") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/update_frontend_request.py b/sdk/python/src/zrok_api/models/update_frontend_request.py deleted file mode 100644 index 52916296..00000000 --- a/sdk/python/src/zrok_api/models/update_frontend_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UpdateFrontendRequest(BaseModel): - """ - UpdateFrontendRequest - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - public_name: Optional[StrictStr] = Field(default=None, alias="publicName") - url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") - __properties: ClassVar[List[str]] = ["frontendToken", "publicName", "urlTemplate"] - - 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 UpdateFrontendRequest 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 UpdateFrontendRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "publicName": obj.get("publicName"), - "urlTemplate": obj.get("urlTemplate") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/update_share_request.py b/sdk/python/src/zrok_api/models/update_share_request.py deleted file mode 100644 index 9e3de749..00000000 --- a/sdk/python/src/zrok_api/models/update_share_request.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UpdateShareRequest(BaseModel): - """ - UpdateShareRequest - """ # noqa: E501 - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") - add_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="addAccessGrants") - remove_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="removeAccessGrants") - __properties: ClassVar[List[str]] = ["shareToken", "backendProxyEndpoint", "addAccessGrants", "removeAccessGrants"] - - 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 UpdateShareRequest 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 UpdateShareRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "shareToken": obj.get("shareToken"), - "backendProxyEndpoint": obj.get("backendProxyEndpoint"), - "addAccessGrants": obj.get("addAccessGrants"), - "removeAccessGrants": obj.get("removeAccessGrants") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/verify200_response.py b/sdk/python/src/zrok_api/models/verify200_response.py deleted file mode 100644 index 4709d646..00000000 --- a/sdk/python/src/zrok_api/models/verify200_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 Verify200Response(BaseModel): - """ - Verify200Response - """ # noqa: E501 - email: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["email"] - - 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 Verify200Response 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 Verify200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/verify_request.py b/sdk/python/src/zrok_api/models/verify_request.py deleted file mode 100644 index 76def799..00000000 --- a/sdk/python/src/zrok_api/models/verify_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class VerifyRequest(BaseModel): - """ - VerifyRequest - """ # noqa: E501 - register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") - __properties: ClassVar[List[str]] = ["registerToken"] - - 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 VerifyRequest 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 VerifyRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "registerToken": obj.get("registerToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/version_inventory200_response.py b/sdk/python/src/zrok_api/models/version_inventory200_response.py deleted file mode 100644 index 8cbf4288..00000000 --- a/sdk/python/src/zrok_api/models/version_inventory200_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class VersionInventory200Response(BaseModel): - """ - VersionInventory200Response - """ # noqa: E501 - controller_version: Optional[StrictStr] = Field(default=None, alias="controllerVersion") - __properties: ClassVar[List[str]] = ["controllerVersion"] - - 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 VersionInventory200Response 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 VersionInventory200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "controllerVersion": obj.get("controllerVersion") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/py.typed b/sdk/python/src/zrok_api/py.typed deleted file mode 100644 index e69de29b..00000000 diff --git a/sdk/python/src/zrok_api/rest.py b/sdk/python/src/zrok_api/rest.py deleted file mode 100644 index f09faee7..00000000 --- a/sdk/python/src/zrok_api/rest.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from zrok_api.exceptions import ApiException, ApiValueError - -SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} -RESTResponseType = urllib3.HTTPResponse - - -def is_socks_proxy_url(url): - if url is None: - return False - split_section = url.split("://") - if len(split_section) < 2: - return False - else: - return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES - - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - pool_args = { - "cert_reqs": cert_reqs, - "ca_certs": configuration.ssl_ca_cert, - "cert_file": configuration.cert_file, - "key_file": configuration.key_file, - "ca_cert_data": configuration.ca_cert_data, - } - if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options - - if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize - - # https pool manager - self.pool_manager: urllib3.PoolManager - - if configuration.proxy: - if is_socks_proxy_url(configuration.proxy): - from urllib3.contrib.socks import SOCKSProxyManager - pool_args["proxy_url"] = configuration.proxy - pool_args["headers"] = configuration.proxy_headers - self.pool_manager = SOCKSProxyManager(**pool_args) - else: - pool_args["proxy_url"] = configuration.proxy - pool_args["proxy_headers"] = configuration.proxy_headers - self.pool_manager = urllib3.ProxyManager(**pool_args) - else: - self.pool_manager = urllib3.PoolManager(**pool_args) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than JSON when `body` argument is - # provided in serialized form. - elif isinstance(body, str) or isinstance(body, bytes): - r = self.pool_manager.request( - method, - url, - body=body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): - request_body = "true" if body else "false" - r = self.pool_manager.request( - method, - url, - body=request_body, - preload_content=False, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) From ef10caa21fd691f8d316d56d81c45b8e0c69d41d Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 19:53:04 -0500 Subject: [PATCH 38/56] lint and re-arm the flake8 test --- .flake8 | 1 - .github/workflows/build-wheels.yml | 4 ++-- .github/workflows/ci-build.yml | 7 ++++--- .gitignore | 9 ++++----- sdk/python/src/zrok/environment/root.py | 6 +++--- sdk/python/src/zrok/share.py | 16 ++++++++-------- 6 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.flake8 b/.flake8 index 0c60e1e3..2ddf68b7 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,5 @@ [flake8] max-line-length = 120 exclude = - ./sdk/python/sdk/**, ./build/** diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 84fa323c..381e5d3b 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -27,7 +27,7 @@ jobs: needs: enforce_stable_semver defaults: run: - working-directory: sdk/python/sdk/zrok + working-directory: sdk/python/src strategy: fail-fast: false matrix: @@ -62,7 +62,7 @@ jobs: if: startsWith(matrix.spec.name, 'linux') with: name: zrok_sdk_${{ matrix.spec.target }} - path: ${{ github.workspace }}/sdk/python/sdk/zrok/dist/* + path: dist/* publish-testpypi: runs-on: ubuntu-20.04 diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 098d79a9..d947327a 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -72,7 +72,7 @@ jobs: - name: python lint shell: bash - run: flake8 sdk/python/sdk/zrok + run: flake8 sdk/python/src - name: solve GOBIN id: solve_go_bin @@ -91,6 +91,9 @@ jobs: pytest: runs-on: ubuntu-24.04 + defaults: + run: + working-directory: sdk/python/src strategy: matrix: python-version: ["3.10", "3.11", "3.12", "3.13"] @@ -105,7 +108,6 @@ jobs: - name: Install dependencies shell: bash - working-directory: sdk/python/src/ run: | set -o pipefail @@ -118,7 +120,6 @@ jobs: - name: Test with pytest shell: bash - working-directory: sdk/python/src/ run: | set -o pipefail diff --git a/.gitignore b/.gitignore index 8f53b79d..46267f3f 100644 --- a/.gitignore +++ b/.gitignore @@ -16,8 +16,6 @@ node_modules/ .docusaurus .cache-loader -sdk/python/sdk/build/ - # Misc .DS_Store .env.local @@ -39,6 +37,7 @@ yarn-error.log* sdk/nodejs/sdk/dist # py module artifacts -*.egg-info/ -__pycache__/ -.coverage +/sdk/python/src/**/*.egg-info/ +/sdk/python/src/**/__pycache__/ +/.coverage +/sdk/python/src/dist/ diff --git a/sdk/python/src/zrok/environment/root.py b/sdk/python/src/zrok/environment/root.py index 8fb97af6..6db7d2f6 100644 --- a/sdk/python/src/zrok/environment/root.py +++ b/sdk/python/src/zrok/environment/root.py @@ -48,16 +48,16 @@ class Root: cfg = Configuration() cfg.host = apiEndpoint[0] + "/api/v1" - + # Update: Configure authentication token # The token needs to be set with 'key' instead of 'x-token' # This matches the securityDefinitions in the OpenAPI spec cfg.api_key["key"] = self.env.Token - + # Create the API client with the configured authentication auth_client = zrok.ApiClient(configuration=cfg) self.client_version_check(auth_client) - + return auth_client def ApiEndpoint(self) -> ApiEndpoint: diff --git a/sdk/python/src/zrok/share.py b/sdk/python/src/zrok/share.py index 509e234d..f3c4a915 100644 --- a/sdk/python/src/zrok/share.py +++ b/sdk/python/src/zrok/share.py @@ -1,4 +1,3 @@ -from zrok import model from zrok_api.api import ShareApi from zrok.environment.root import Root from zrok_api.models.auth_user import AuthUser @@ -58,7 +57,7 @@ def CreateShare(root: Root, request: model.ShareRequest) -> model.Share: zrok = root.Client() except Exception as e: raise Exception("error getting zrok client", e) - + try: # Use share_with_http_info to get access to the HTTP info and handle custom response format share_api = ShareApi(zrok) @@ -66,18 +65,18 @@ def CreateShare(root: Root, request: model.ShareRequest) -> model.Share: custom_headers = { 'Accept': 'application/json, application/zrok.v1+json' } - + response_data = share_api.share_with_http_info( body=out, _headers=custom_headers ) - + # Parse response if hasattr(response_data, 'data') and response_data.data is not None: res = response_data.data else: raise Exception("invalid response from server") - + except ApiException as e: # If it's a content type error, try to parse the raw JSON if "Unsupported content type: application/zrok.v1+json" in str(e) and hasattr(e, 'body'): @@ -85,11 +84,12 @@ def CreateShare(root: Root, request: model.ShareRequest) -> model.Share: # Parse the response body directly res_dict = json.loads(e.body) # Create a response object with the expected fields + class ShareResponse: def __init__(self, share_token, frontend_proxy_endpoints): self.share_token = share_token self.frontend_proxy_endpoints = frontend_proxy_endpoints - + res = ShareResponse( share_token=res_dict.get('shareToken', ''), frontend_proxy_endpoints=res_dict.get('frontendProxyEndpoints', []) @@ -149,7 +149,7 @@ def DeleteShare(root: Root, shr: model.Share): custom_headers = { 'Accept': 'application/json, application/zrok.v1+json' } - + # Use unshare_with_http_info to get access to the HTTP info share_api.unshare_with_http_info( body=req, @@ -182,7 +182,7 @@ def ReleaseReservedShare(root: Root, shr: model.Share): custom_headers = { 'Accept': 'application/json, application/zrok.v1+json' } - + # Use unshare_with_http_info to get access to the HTTP info share_api.unshare_with_http_info( body=req, From da739ef8e7eda7aeb3d5677e6cc55fb12eaf98e3 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 18:50:33 -0500 Subject: [PATCH 39/56] temporarily commit the generated py client --- sdk/python/src/.gitignore | 66 + sdk/python/src/README.md | 215 + sdk/python/src/docs/Access201Response.md | 30 + sdk/python/src/docs/AccessRequest.md | 32 + sdk/python/src/docs/AccountApi.md | 557 +++ .../src/docs/AddOrganizationMemberRequest.md | 31 + sdk/python/src/docs/AdminApi.md | 1079 +++++ sdk/python/src/docs/AuthUser.md | 30 + sdk/python/src/docs/ChangePasswordRequest.md | 31 + .../src/docs/ClientVersionCheckRequest.md | 29 + sdk/python/src/docs/Configuration.md | 33 + .../src/docs/CreateFrontend201Response.md | 29 + sdk/python/src/docs/CreateFrontendRequest.md | 32 + .../src/docs/CreateIdentity201Response.md | 30 + sdk/python/src/docs/CreateIdentityRequest.md | 29 + .../src/docs/CreateOrganization201Response.md | 29 + .../src/docs/CreateOrganizationRequest.md | 29 + sdk/python/src/docs/DisableRequest.md | 29 + sdk/python/src/docs/EnableRequest.md | 30 + sdk/python/src/docs/Environment.md | 36 + .../src/docs/EnvironmentAndResources.md | 31 + sdk/python/src/docs/EnvironmentApi.md | 162 + sdk/python/src/docs/Frontend.md | 37 + .../src/docs/GetSparklines200Response.md | 29 + sdk/python/src/docs/GetSparklinesRequest.md | 31 + sdk/python/src/docs/InviteRequest.md | 30 + .../src/docs/InviteTokenGenerateRequest.md | 29 + .../src/docs/ListFrontends200ResponseInner.md | 34 + .../src/docs/ListMemberships200Response.md | 29 + ...tMemberships200ResponseMembershipsInner.md | 31 + .../ListOrganizationMembers200Response.md | 29 + ...anizationMembers200ResponseMembersInner.md | 30 + .../src/docs/ListOrganizations200Response.md | 29 + ...anizations200ResponseOrganizationsInner.md | 30 + sdk/python/src/docs/LoginRequest.md | 30 + sdk/python/src/docs/MetadataApi.md | 1171 +++++ sdk/python/src/docs/Metrics.md | 32 + sdk/python/src/docs/MetricsSample.md | 31 + sdk/python/src/docs/Overview.md | 30 + sdk/python/src/docs/Principal.md | 33 + .../docs/RegenerateAccountToken200Response.md | 29 + .../src/docs/RegenerateAccountTokenRequest.md | 29 + sdk/python/src/docs/RegisterRequest.md | 30 + .../docs/RemoveOrganizationMemberRequest.md | 30 + sdk/python/src/docs/ResetPasswordRequest.md | 30 + sdk/python/src/docs/Share.md | 40 + sdk/python/src/docs/ShareApi.md | 473 ++ sdk/python/src/docs/ShareRequest.md | 42 + sdk/python/src/docs/ShareResponse.md | 30 + sdk/python/src/docs/SparkDataSample.md | 30 + sdk/python/src/docs/UnaccessRequest.md | 31 + sdk/python/src/docs/UnshareRequest.md | 31 + sdk/python/src/docs/UpdateAccessRequest.md | 31 + sdk/python/src/docs/UpdateFrontendRequest.md | 31 + sdk/python/src/docs/UpdateShareRequest.md | 32 + sdk/python/src/docs/Verify200Response.md | 29 + sdk/python/src/docs/VerifyRequest.md | 29 + .../src/docs/VersionInventory200Response.md | 29 + sdk/python/src/test/__init__.py | 0 .../src/test/test_access201_response.py | 52 + sdk/python/src/test/test_access_request.py | 54 + sdk/python/src/test/test_account_api.py | 79 + .../test_add_organization_member_request.py | 53 + sdk/python/src/test/test_admin_api.py | 115 + sdk/python/src/test/test_auth_user.py | 52 + .../src/test/test_change_password_request.py | 53 + .../test/test_client_version_check_request.py | 51 + sdk/python/src/test/test_configuration.py | 55 + .../test/test_create_frontend201_response.py | 51 + .../src/test/test_create_frontend_request.py | 54 + .../test/test_create_identity201_response.py | 52 + .../src/test/test_create_identity_request.py | 51 + .../test_create_organization201_response.py | 51 + .../test/test_create_organization_request.py | 51 + sdk/python/src/test/test_disable_request.py | 51 + sdk/python/src/test/test_enable_request.py | 52 + sdk/python/src/test/test_environment.py | 62 + .../test/test_environment_and_resources.py | 94 + sdk/python/src/test/test_environment_api.py | 43 + sdk/python/src/test/test_frontend.py | 59 + .../test/test_get_sparklines200_response.py | 62 + .../src/test/test_get_sparklines_request.py | 57 + sdk/python/src/test/test_invite_request.py | 52 + .../test_invite_token_generate_request.py | 53 + .../test_list_frontends200_response_inner.py | 56 + .../test/test_list_memberships200_response.py | 56 + ...mberships200_response_memberships_inner.py | 53 + ...t_list_organization_members200_response.py | 55 + ...ation_members200_response_members_inner.py | 52 + .../test_list_organizations200_response.py | 55 + ...zations200_response_organizations_inner.py | 52 + sdk/python/src/test/test_login_request.py | 52 + sdk/python/src/test/test_metadata_api.py | 127 + sdk/python/src/test/test_metrics.py | 59 + sdk/python/src/test/test_metrics_sample.py | 53 + sdk/python/src/test/test_overview.py | 93 + sdk/python/src/test/test_principal.py | 55 + ...st_regenerate_account_token200_response.py | 51 + .../test_regenerate_account_token_request.py | 51 + sdk/python/src/test/test_register_request.py | 52 + ...test_remove_organization_member_request.py | 52 + .../src/test/test_reset_password_request.py | 52 + sdk/python/src/test/test_share.py | 66 + sdk/python/src/test/test_share_api.py | 67 + sdk/python/src/test/test_share_request.py | 74 + sdk/python/src/test/test_share_response.py | 54 + sdk/python/src/test/test_spark_data_sample.py | 52 + sdk/python/src/test/test_unaccess_request.py | 53 + sdk/python/src/test/test_unshare_request.py | 53 + .../src/test/test_update_access_request.py | 53 + .../src/test/test_update_frontend_request.py | 53 + .../src/test/test_update_share_request.py | 58 + .../src/test/test_verify200_response.py | 51 + sdk/python/src/test/test_verify_request.py | 51 + .../test_version_inventory200_response.py | 51 + sdk/python/src/zrok_api/__init__.py | 88 + sdk/python/src/zrok_api/api/__init__.py | 9 + sdk/python/src/zrok_api/api/account_api.py | 2261 +++++++++ sdk/python/src/zrok_api/api/admin_api.py | 3855 +++++++++++++++ .../src/zrok_api/api/environment_api.py | 589 +++ sdk/python/src/zrok_api/api/metadata_api.py | 4242 +++++++++++++++++ sdk/python/src/zrok_api/api/share_api.py | 1712 +++++++ sdk/python/src/zrok_api/api_client.py | 797 ++++ sdk/python/src/zrok_api/api_response.py | 21 + sdk/python/src/zrok_api/configuration.py | 602 +++ sdk/python/src/zrok_api/exceptions.py | 216 + sdk/python/src/zrok_api/models/__init__.py | 67 + .../src/zrok_api/models/access201_response.py | 89 + .../src/zrok_api/models/access_request.py | 93 + .../models/add_organization_member_request.py | 91 + sdk/python/src/zrok_api/models/auth_user.py | 89 + .../models/change_password_request.py | 91 + .../models/client_version_check_request.py | 87 + .../src/zrok_api/models/configuration.py | 95 + .../models/create_frontend201_response.py | 87 + .../models/create_frontend_request.py | 103 + .../models/create_identity201_response.py | 89 + .../models/create_identity_request.py | 87 + .../models/create_organization201_response.py | 87 + .../models/create_organization_request.py | 87 + .../src/zrok_api/models/disable_request.py | 87 + .../src/zrok_api/models/enable_request.py | 89 + sdk/python/src/zrok_api/models/environment.py | 109 + .../models/environment_and_resources.py | 111 + sdk/python/src/zrok_api/models/frontend.py | 103 + .../models/get_sparklines200_response.py | 95 + .../zrok_api/models/get_sparklines_request.py | 91 + .../src/zrok_api/models/invite_request.py | 89 + .../models/invite_token_generate_request.py | 87 + .../list_frontends200_response_inner.py | 97 + .../models/list_memberships200_response.py | 95 + ...mberships200_response_memberships_inner.py | 91 + .../list_organization_members200_response.py | 95 + ...ation_members200_response_members_inner.py | 89 + .../models/list_organizations200_response.py | 95 + ...zations200_response_organizations_inner.py | 89 + .../src/zrok_api/models/login_request.py | 89 + sdk/python/src/zrok_api/models/metrics.py | 101 + .../src/zrok_api/models/metrics_sample.py | 91 + sdk/python/src/zrok_api/models/overview.py | 97 + sdk/python/src/zrok_api/models/principal.py | 95 + .../regenerate_account_token200_response.py | 87 + .../regenerate_account_token_request.py | 87 + .../src/zrok_api/models/register_request.py | 89 + .../remove_organization_member_request.py | 89 + .../zrok_api/models/reset_password_request.py | 89 + sdk/python/src/zrok_api/models/share.py | 117 + .../src/zrok_api/models/share_request.py | 161 + .../src/zrok_api/models/share_response.py | 89 + .../src/zrok_api/models/spark_data_sample.py | 89 + .../src/zrok_api/models/unaccess_request.py | 91 + .../src/zrok_api/models/unshare_request.py | 91 + .../zrok_api/models/update_access_request.py | 91 + .../models/update_frontend_request.py | 91 + .../zrok_api/models/update_share_request.py | 93 + .../src/zrok_api/models/verify200_response.py | 87 + .../src/zrok_api/models/verify_request.py | 87 + .../models/version_inventory200_response.py | 87 + sdk/python/src/zrok_api/py.typed | 0 sdk/python/src/zrok_api/rest.py | 258 + 180 files changed, 28063 insertions(+) create mode 100644 sdk/python/src/.gitignore create mode 100644 sdk/python/src/README.md create mode 100644 sdk/python/src/docs/Access201Response.md create mode 100644 sdk/python/src/docs/AccessRequest.md create mode 100644 sdk/python/src/docs/AccountApi.md create mode 100644 sdk/python/src/docs/AddOrganizationMemberRequest.md create mode 100644 sdk/python/src/docs/AdminApi.md create mode 100644 sdk/python/src/docs/AuthUser.md create mode 100644 sdk/python/src/docs/ChangePasswordRequest.md create mode 100644 sdk/python/src/docs/ClientVersionCheckRequest.md create mode 100644 sdk/python/src/docs/Configuration.md create mode 100644 sdk/python/src/docs/CreateFrontend201Response.md create mode 100644 sdk/python/src/docs/CreateFrontendRequest.md create mode 100644 sdk/python/src/docs/CreateIdentity201Response.md create mode 100644 sdk/python/src/docs/CreateIdentityRequest.md create mode 100644 sdk/python/src/docs/CreateOrganization201Response.md create mode 100644 sdk/python/src/docs/CreateOrganizationRequest.md create mode 100644 sdk/python/src/docs/DisableRequest.md create mode 100644 sdk/python/src/docs/EnableRequest.md create mode 100644 sdk/python/src/docs/Environment.md create mode 100644 sdk/python/src/docs/EnvironmentAndResources.md create mode 100644 sdk/python/src/docs/EnvironmentApi.md create mode 100644 sdk/python/src/docs/Frontend.md create mode 100644 sdk/python/src/docs/GetSparklines200Response.md create mode 100644 sdk/python/src/docs/GetSparklinesRequest.md create mode 100644 sdk/python/src/docs/InviteRequest.md create mode 100644 sdk/python/src/docs/InviteTokenGenerateRequest.md create mode 100644 sdk/python/src/docs/ListFrontends200ResponseInner.md create mode 100644 sdk/python/src/docs/ListMemberships200Response.md create mode 100644 sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md create mode 100644 sdk/python/src/docs/ListOrganizationMembers200Response.md create mode 100644 sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md create mode 100644 sdk/python/src/docs/ListOrganizations200Response.md create mode 100644 sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md create mode 100644 sdk/python/src/docs/LoginRequest.md create mode 100644 sdk/python/src/docs/MetadataApi.md create mode 100644 sdk/python/src/docs/Metrics.md create mode 100644 sdk/python/src/docs/MetricsSample.md create mode 100644 sdk/python/src/docs/Overview.md create mode 100644 sdk/python/src/docs/Principal.md create mode 100644 sdk/python/src/docs/RegenerateAccountToken200Response.md create mode 100644 sdk/python/src/docs/RegenerateAccountTokenRequest.md create mode 100644 sdk/python/src/docs/RegisterRequest.md create mode 100644 sdk/python/src/docs/RemoveOrganizationMemberRequest.md create mode 100644 sdk/python/src/docs/ResetPasswordRequest.md create mode 100644 sdk/python/src/docs/Share.md create mode 100644 sdk/python/src/docs/ShareApi.md create mode 100644 sdk/python/src/docs/ShareRequest.md create mode 100644 sdk/python/src/docs/ShareResponse.md create mode 100644 sdk/python/src/docs/SparkDataSample.md create mode 100644 sdk/python/src/docs/UnaccessRequest.md create mode 100644 sdk/python/src/docs/UnshareRequest.md create mode 100644 sdk/python/src/docs/UpdateAccessRequest.md create mode 100644 sdk/python/src/docs/UpdateFrontendRequest.md create mode 100644 sdk/python/src/docs/UpdateShareRequest.md create mode 100644 sdk/python/src/docs/Verify200Response.md create mode 100644 sdk/python/src/docs/VerifyRequest.md create mode 100644 sdk/python/src/docs/VersionInventory200Response.md create mode 100644 sdk/python/src/test/__init__.py create mode 100644 sdk/python/src/test/test_access201_response.py create mode 100644 sdk/python/src/test/test_access_request.py create mode 100644 sdk/python/src/test/test_account_api.py create mode 100644 sdk/python/src/test/test_add_organization_member_request.py create mode 100644 sdk/python/src/test/test_admin_api.py create mode 100644 sdk/python/src/test/test_auth_user.py create mode 100644 sdk/python/src/test/test_change_password_request.py create mode 100644 sdk/python/src/test/test_client_version_check_request.py create mode 100644 sdk/python/src/test/test_configuration.py create mode 100644 sdk/python/src/test/test_create_frontend201_response.py create mode 100644 sdk/python/src/test/test_create_frontend_request.py create mode 100644 sdk/python/src/test/test_create_identity201_response.py create mode 100644 sdk/python/src/test/test_create_identity_request.py create mode 100644 sdk/python/src/test/test_create_organization201_response.py create mode 100644 sdk/python/src/test/test_create_organization_request.py create mode 100644 sdk/python/src/test/test_disable_request.py create mode 100644 sdk/python/src/test/test_enable_request.py create mode 100644 sdk/python/src/test/test_environment.py create mode 100644 sdk/python/src/test/test_environment_and_resources.py create mode 100644 sdk/python/src/test/test_environment_api.py create mode 100644 sdk/python/src/test/test_frontend.py create mode 100644 sdk/python/src/test/test_get_sparklines200_response.py create mode 100644 sdk/python/src/test/test_get_sparklines_request.py create mode 100644 sdk/python/src/test/test_invite_request.py create mode 100644 sdk/python/src/test/test_invite_token_generate_request.py create mode 100644 sdk/python/src/test/test_list_frontends200_response_inner.py create mode 100644 sdk/python/src/test/test_list_memberships200_response.py create mode 100644 sdk/python/src/test/test_list_memberships200_response_memberships_inner.py create mode 100644 sdk/python/src/test/test_list_organization_members200_response.py create mode 100644 sdk/python/src/test/test_list_organization_members200_response_members_inner.py create mode 100644 sdk/python/src/test/test_list_organizations200_response.py create mode 100644 sdk/python/src/test/test_list_organizations200_response_organizations_inner.py create mode 100644 sdk/python/src/test/test_login_request.py create mode 100644 sdk/python/src/test/test_metadata_api.py create mode 100644 sdk/python/src/test/test_metrics.py create mode 100644 sdk/python/src/test/test_metrics_sample.py create mode 100644 sdk/python/src/test/test_overview.py create mode 100644 sdk/python/src/test/test_principal.py create mode 100644 sdk/python/src/test/test_regenerate_account_token200_response.py create mode 100644 sdk/python/src/test/test_regenerate_account_token_request.py create mode 100644 sdk/python/src/test/test_register_request.py create mode 100644 sdk/python/src/test/test_remove_organization_member_request.py create mode 100644 sdk/python/src/test/test_reset_password_request.py create mode 100644 sdk/python/src/test/test_share.py create mode 100644 sdk/python/src/test/test_share_api.py create mode 100644 sdk/python/src/test/test_share_request.py create mode 100644 sdk/python/src/test/test_share_response.py create mode 100644 sdk/python/src/test/test_spark_data_sample.py create mode 100644 sdk/python/src/test/test_unaccess_request.py create mode 100644 sdk/python/src/test/test_unshare_request.py create mode 100644 sdk/python/src/test/test_update_access_request.py create mode 100644 sdk/python/src/test/test_update_frontend_request.py create mode 100644 sdk/python/src/test/test_update_share_request.py create mode 100644 sdk/python/src/test/test_verify200_response.py create mode 100644 sdk/python/src/test/test_verify_request.py create mode 100644 sdk/python/src/test/test_version_inventory200_response.py create mode 100644 sdk/python/src/zrok_api/__init__.py create mode 100644 sdk/python/src/zrok_api/api/__init__.py create mode 100644 sdk/python/src/zrok_api/api/account_api.py create mode 100644 sdk/python/src/zrok_api/api/admin_api.py create mode 100644 sdk/python/src/zrok_api/api/environment_api.py create mode 100644 sdk/python/src/zrok_api/api/metadata_api.py create mode 100644 sdk/python/src/zrok_api/api/share_api.py create mode 100644 sdk/python/src/zrok_api/api_client.py create mode 100644 sdk/python/src/zrok_api/api_response.py create mode 100644 sdk/python/src/zrok_api/configuration.py create mode 100644 sdk/python/src/zrok_api/exceptions.py create mode 100644 sdk/python/src/zrok_api/models/__init__.py create mode 100644 sdk/python/src/zrok_api/models/access201_response.py create mode 100644 sdk/python/src/zrok_api/models/access_request.py create mode 100644 sdk/python/src/zrok_api/models/add_organization_member_request.py create mode 100644 sdk/python/src/zrok_api/models/auth_user.py create mode 100644 sdk/python/src/zrok_api/models/change_password_request.py create mode 100644 sdk/python/src/zrok_api/models/client_version_check_request.py create mode 100644 sdk/python/src/zrok_api/models/configuration.py create mode 100644 sdk/python/src/zrok_api/models/create_frontend201_response.py create mode 100644 sdk/python/src/zrok_api/models/create_frontend_request.py create mode 100644 sdk/python/src/zrok_api/models/create_identity201_response.py create mode 100644 sdk/python/src/zrok_api/models/create_identity_request.py create mode 100644 sdk/python/src/zrok_api/models/create_organization201_response.py create mode 100644 sdk/python/src/zrok_api/models/create_organization_request.py create mode 100644 sdk/python/src/zrok_api/models/disable_request.py create mode 100644 sdk/python/src/zrok_api/models/enable_request.py create mode 100644 sdk/python/src/zrok_api/models/environment.py create mode 100644 sdk/python/src/zrok_api/models/environment_and_resources.py create mode 100644 sdk/python/src/zrok_api/models/frontend.py create mode 100644 sdk/python/src/zrok_api/models/get_sparklines200_response.py create mode 100644 sdk/python/src/zrok_api/models/get_sparklines_request.py create mode 100644 sdk/python/src/zrok_api/models/invite_request.py create mode 100644 sdk/python/src/zrok_api/models/invite_token_generate_request.py create mode 100644 sdk/python/src/zrok_api/models/list_frontends200_response_inner.py create mode 100644 sdk/python/src/zrok_api/models/list_memberships200_response.py create mode 100644 sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py create mode 100644 sdk/python/src/zrok_api/models/list_organization_members200_response.py create mode 100644 sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py create mode 100644 sdk/python/src/zrok_api/models/list_organizations200_response.py create mode 100644 sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py create mode 100644 sdk/python/src/zrok_api/models/login_request.py create mode 100644 sdk/python/src/zrok_api/models/metrics.py create mode 100644 sdk/python/src/zrok_api/models/metrics_sample.py create mode 100644 sdk/python/src/zrok_api/models/overview.py create mode 100644 sdk/python/src/zrok_api/models/principal.py create mode 100644 sdk/python/src/zrok_api/models/regenerate_account_token200_response.py create mode 100644 sdk/python/src/zrok_api/models/regenerate_account_token_request.py create mode 100644 sdk/python/src/zrok_api/models/register_request.py create mode 100644 sdk/python/src/zrok_api/models/remove_organization_member_request.py create mode 100644 sdk/python/src/zrok_api/models/reset_password_request.py create mode 100644 sdk/python/src/zrok_api/models/share.py create mode 100644 sdk/python/src/zrok_api/models/share_request.py create mode 100644 sdk/python/src/zrok_api/models/share_response.py create mode 100644 sdk/python/src/zrok_api/models/spark_data_sample.py create mode 100644 sdk/python/src/zrok_api/models/unaccess_request.py create mode 100644 sdk/python/src/zrok_api/models/unshare_request.py create mode 100644 sdk/python/src/zrok_api/models/update_access_request.py create mode 100644 sdk/python/src/zrok_api/models/update_frontend_request.py create mode 100644 sdk/python/src/zrok_api/models/update_share_request.py create mode 100644 sdk/python/src/zrok_api/models/verify200_response.py create mode 100644 sdk/python/src/zrok_api/models/verify_request.py create mode 100644 sdk/python/src/zrok_api/models/version_inventory200_response.py create mode 100644 sdk/python/src/zrok_api/py.typed create mode 100644 sdk/python/src/zrok_api/rest.py diff --git a/sdk/python/src/.gitignore b/sdk/python/src/.gitignore new file mode 100644 index 00000000..43995bd4 --- /dev/null +++ b/sdk/python/src/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/sdk/python/src/README.md b/sdk/python/src/README.md new file mode 100644 index 00000000..25ad2fe6 --- /dev/null +++ b/sdk/python/src/README.md @@ -0,0 +1,215 @@ +# zrok +zrok client access + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Package version: 1.0.0 +- Generator version: 7.12.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen + +## Requirements. + +Python 3.8+ + +## Installation & Usage +### pip install + +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 +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import zrok_api +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import zrok_api +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) + + try: + api_instance.change_password(body=body) + except ApiException as e: + print("Exception when calling AccountApi->change_password: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to */api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccountApi* | [**change_password**](docs/AccountApi.md#change_password) | **POST** /changePassword | +*AccountApi* | [**invite**](docs/AccountApi.md#invite) | **POST** /invite | +*AccountApi* | [**login**](docs/AccountApi.md#login) | **POST** /login | +*AccountApi* | [**regenerate_account_token**](docs/AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | +*AccountApi* | [**register**](docs/AccountApi.md#register) | **POST** /register | +*AccountApi* | [**reset_password**](docs/AccountApi.md#reset_password) | **POST** /resetPassword | +*AccountApi* | [**reset_password_request**](docs/AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | +*AccountApi* | [**verify**](docs/AccountApi.md#verify) | **POST** /verify | +*AdminApi* | [**add_organization_member**](docs/AdminApi.md#add_organization_member) | **POST** /organization/add | +*AdminApi* | [**create_account**](docs/AdminApi.md#create_account) | **POST** /account | +*AdminApi* | [**create_frontend**](docs/AdminApi.md#create_frontend) | **POST** /frontend | +*AdminApi* | [**create_identity**](docs/AdminApi.md#create_identity) | **POST** /identity | +*AdminApi* | [**create_organization**](docs/AdminApi.md#create_organization) | **POST** /organization | +*AdminApi* | [**delete_frontend**](docs/AdminApi.md#delete_frontend) | **DELETE** /frontend | +*AdminApi* | [**delete_organization**](docs/AdminApi.md#delete_organization) | **DELETE** /organization | +*AdminApi* | [**grants**](docs/AdminApi.md#grants) | **POST** /grants | +*AdminApi* | [**invite_token_generate**](docs/AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | +*AdminApi* | [**list_frontends**](docs/AdminApi.md#list_frontends) | **GET** /frontends | +*AdminApi* | [**list_organization_members**](docs/AdminApi.md#list_organization_members) | **POST** /organization/list | +*AdminApi* | [**list_organizations**](docs/AdminApi.md#list_organizations) | **GET** /organizations | +*AdminApi* | [**remove_organization_member**](docs/AdminApi.md#remove_organization_member) | **POST** /organization/remove | +*AdminApi* | [**update_frontend**](docs/AdminApi.md#update_frontend) | **PATCH** /frontend | +*EnvironmentApi* | [**disable**](docs/EnvironmentApi.md#disable) | **POST** /disable | +*EnvironmentApi* | [**enable**](docs/EnvironmentApi.md#enable) | **POST** /enable | +*MetadataApi* | [**client_version_check**](docs/MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | +*MetadataApi* | [**configuration**](docs/MetadataApi.md#configuration) | **GET** /configuration | +*MetadataApi* | [**get_account_detail**](docs/MetadataApi.md#get_account_detail) | **GET** /detail/account | +*MetadataApi* | [**get_account_metrics**](docs/MetadataApi.md#get_account_metrics) | **GET** /metrics/account | +*MetadataApi* | [**get_environment_detail**](docs/MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | +*MetadataApi* | [**get_environment_metrics**](docs/MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | +*MetadataApi* | [**get_frontend_detail**](docs/MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | +*MetadataApi* | [**get_share_detail**](docs/MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | +*MetadataApi* | [**get_share_metrics**](docs/MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | +*MetadataApi* | [**get_sparklines**](docs/MetadataApi.md#get_sparklines) | **POST** /sparklines | +*MetadataApi* | [**list_memberships**](docs/MetadataApi.md#list_memberships) | **GET** /memberships | +*MetadataApi* | [**list_org_members**](docs/MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | +*MetadataApi* | [**org_account_overview**](docs/MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | +*MetadataApi* | [**overview**](docs/MetadataApi.md#overview) | **GET** /overview | +*MetadataApi* | [**version**](docs/MetadataApi.md#version) | **GET** /version | +*MetadataApi* | [**version_inventory**](docs/MetadataApi.md#version_inventory) | **GET** /versions | +*ShareApi* | [**access**](docs/ShareApi.md#access) | **POST** /access | +*ShareApi* | [**share**](docs/ShareApi.md#share) | **POST** /share | +*ShareApi* | [**unaccess**](docs/ShareApi.md#unaccess) | **DELETE** /unaccess | +*ShareApi* | [**unshare**](docs/ShareApi.md#unshare) | **DELETE** /unshare | +*ShareApi* | [**update_access**](docs/ShareApi.md#update_access) | **PATCH** /access | +*ShareApi* | [**update_share**](docs/ShareApi.md#update_share) | **PATCH** /share | + + +## Documentation For Models + + - [Access201Response](docs/Access201Response.md) + - [AccessRequest](docs/AccessRequest.md) + - [AddOrganizationMemberRequest](docs/AddOrganizationMemberRequest.md) + - [AuthUser](docs/AuthUser.md) + - [ChangePasswordRequest](docs/ChangePasswordRequest.md) + - [ClientVersionCheckRequest](docs/ClientVersionCheckRequest.md) + - [Configuration](docs/Configuration.md) + - [CreateFrontend201Response](docs/CreateFrontend201Response.md) + - [CreateFrontendRequest](docs/CreateFrontendRequest.md) + - [CreateIdentity201Response](docs/CreateIdentity201Response.md) + - [CreateIdentityRequest](docs/CreateIdentityRequest.md) + - [CreateOrganization201Response](docs/CreateOrganization201Response.md) + - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md) + - [DisableRequest](docs/DisableRequest.md) + - [EnableRequest](docs/EnableRequest.md) + - [Environment](docs/Environment.md) + - [EnvironmentAndResources](docs/EnvironmentAndResources.md) + - [Frontend](docs/Frontend.md) + - [GetSparklines200Response](docs/GetSparklines200Response.md) + - [GetSparklinesRequest](docs/GetSparklinesRequest.md) + - [InviteRequest](docs/InviteRequest.md) + - [InviteTokenGenerateRequest](docs/InviteTokenGenerateRequest.md) + - [ListFrontends200ResponseInner](docs/ListFrontends200ResponseInner.md) + - [ListMemberships200Response](docs/ListMemberships200Response.md) + - [ListMemberships200ResponseMembershipsInner](docs/ListMemberships200ResponseMembershipsInner.md) + - [ListOrganizationMembers200Response](docs/ListOrganizationMembers200Response.md) + - [ListOrganizationMembers200ResponseMembersInner](docs/ListOrganizationMembers200ResponseMembersInner.md) + - [ListOrganizations200Response](docs/ListOrganizations200Response.md) + - [ListOrganizations200ResponseOrganizationsInner](docs/ListOrganizations200ResponseOrganizationsInner.md) + - [LoginRequest](docs/LoginRequest.md) + - [Metrics](docs/Metrics.md) + - [MetricsSample](docs/MetricsSample.md) + - [Overview](docs/Overview.md) + - [Principal](docs/Principal.md) + - [RegenerateAccountToken200Response](docs/RegenerateAccountToken200Response.md) + - [RegenerateAccountTokenRequest](docs/RegenerateAccountTokenRequest.md) + - [RegisterRequest](docs/RegisterRequest.md) + - [RemoveOrganizationMemberRequest](docs/RemoveOrganizationMemberRequest.md) + - [ResetPasswordRequest](docs/ResetPasswordRequest.md) + - [Share](docs/Share.md) + - [ShareRequest](docs/ShareRequest.md) + - [ShareResponse](docs/ShareResponse.md) + - [SparkDataSample](docs/SparkDataSample.md) + - [UnaccessRequest](docs/UnaccessRequest.md) + - [UnshareRequest](docs/UnshareRequest.md) + - [UpdateAccessRequest](docs/UpdateAccessRequest.md) + - [UpdateFrontendRequest](docs/UpdateFrontendRequest.md) + - [UpdateShareRequest](docs/UpdateShareRequest.md) + - [Verify200Response](docs/Verify200Response.md) + - [VerifyRequest](docs/VerifyRequest.md) + - [VersionInventory200Response](docs/VersionInventory200Response.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### key + +- **Type**: API key +- **API key parameter name**: x-token +- **Location**: HTTP header + + +## Author + + + + diff --git a/sdk/python/src/docs/Access201Response.md b/sdk/python/src/docs/Access201Response.md new file mode 100644 index 00000000..bc12a97a --- /dev/null +++ b/sdk/python/src/docs/Access201Response.md @@ -0,0 +1,30 @@ +# Access201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**backend_mode** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.access201_response import Access201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of Access201Response from a JSON string +access201_response_instance = Access201Response.from_json(json) +# print the JSON string representation of the object +print(Access201Response.to_json()) + +# convert the object into a dict +access201_response_dict = access201_response_instance.to_dict() +# create an instance of Access201Response from a dict +access201_response_from_dict = Access201Response.from_dict(access201_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/sdk/python/src/docs/AccessRequest.md b/sdk/python/src/docs/AccessRequest.md new file mode 100644 index 00000000..288b82ae --- /dev/null +++ b/sdk/python/src/docs/AccessRequest.md @@ -0,0 +1,32 @@ +# AccessRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] +**bind_address** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.access_request import AccessRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AccessRequest from a JSON string +access_request_instance = AccessRequest.from_json(json) +# print the JSON string representation of the object +print(AccessRequest.to_json()) + +# convert the object into a dict +access_request_dict = access_request_instance.to_dict() +# create an instance of AccessRequest from a dict +access_request_from_dict = AccessRequest.from_dict(access_request_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/sdk/python/src/docs/AccountApi.md b/sdk/python/src/docs/AccountApi.md new file mode 100644 index 00000000..cb6a3e97 --- /dev/null +++ b/sdk/python/src/docs/AccountApi.md @@ -0,0 +1,557 @@ +# zrok_api.AccountApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**change_password**](AccountApi.md#change_password) | **POST** /changePassword | +[**invite**](AccountApi.md#invite) | **POST** /invite | +[**login**](AccountApi.md#login) | **POST** /login | +[**regenerate_account_token**](AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | +[**register**](AccountApi.md#register) | **POST** /register | +[**reset_password**](AccountApi.md#reset_password) | **POST** /resetPassword | +[**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | +[**verify**](AccountApi.md#verify) | **POST** /verify | + + +# **change_password** +> change_password(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.change_password_request import ChangePasswordRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) + + try: + api_instance.change_password(body=body) + except Exception as e: + print("Exception when calling AccountApi->change_password: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ChangePasswordRequest**](ChangePasswordRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | password changed | - | +**400** | password not changed | - | +**401** | unauthorized | - | +**422** | password validation failure | - | +**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) + +# **invite** +> invite(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.invite_request import InviteRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.InviteRequest() # InviteRequest | (optional) + + try: + api_instance.invite(body=body) + except Exception as e: + print("Exception when calling AccountApi->invite: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**InviteRequest**](InviteRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | invitation created | - | +**400** | invitation not created (already exists) | - | +**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) + +# **login** +> str login(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.login_request import LoginRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.LoginRequest() # LoginRequest | (optional) + + try: + api_response = api_instance.login(body=body) + print("The response of AccountApi->login:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->login: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**LoginRequest**](LoginRequest.md)| | [optional] + +### Return type + +**str** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | login successful | - | +**401** | invalid login | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **regenerate_account_token** +> RegenerateAccountToken200Response regenerate_account_token(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) + + try: + api_response = api_instance.regenerate_account_token(body=body) + print("The response of AccountApi->regenerate_account_token:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] + +### Return type + +[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | regenerate account token | - | +**404** | account 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) + +# **register** +> RegenerateAccountToken200Response register(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.register_request import RegisterRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.RegisterRequest() # RegisterRequest | (optional) + + try: + api_response = api_instance.register(body=body) + print("The response of AccountApi->register:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->register: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**RegisterRequest**](RegisterRequest.md)| | [optional] + +### Return type + +[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | account created | - | +**404** | request not found | - | +**422** | password validation failure | - | +**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) + +# **reset_password** +> reset_password(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.reset_password_request import ResetPasswordRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.ResetPasswordRequest() # ResetPasswordRequest | (optional) + + try: + api_instance.reset_password(body=body) + except Exception as e: + print("Exception when calling AccountApi->reset_password: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ResetPasswordRequest**](ResetPasswordRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | password reset | - | +**404** | request not found | - | +**422** | password validation failure | - | +**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) + +# **reset_password_request** +> reset_password_request(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) + + try: + api_instance.reset_password_request(body=body) + except Exception as e: + print("Exception when calling AccountApi->reset_password_request: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | reset password request created | - | +**400** | reset password request not created | - | +**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) + +# **verify** +> Verify200Response verify(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AccountApi(api_client) + body = zrok_api.VerifyRequest() # VerifyRequest | (optional) + + try: + api_response = api_instance.verify(body=body) + print("The response of AccountApi->verify:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountApi->verify: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**VerifyRequest**](VerifyRequest.md)| | [optional] + +### Return type + +[**Verify200Response**](Verify200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | registration token ready | - | +**404** | registration token 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/sdk/python/src/docs/AddOrganizationMemberRequest.md b/sdk/python/src/docs/AddOrganizationMemberRequest.md new file mode 100644 index 00000000..c866784a --- /dev/null +++ b/sdk/python/src/docs/AddOrganizationMemberRequest.md @@ -0,0 +1,31 @@ +# AddOrganizationMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**email** | **str** | | [optional] +**admin** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AddOrganizationMemberRequest from a JSON string +add_organization_member_request_instance = AddOrganizationMemberRequest.from_json(json) +# print the JSON string representation of the object +print(AddOrganizationMemberRequest.to_json()) + +# convert the object into a dict +add_organization_member_request_dict = add_organization_member_request_instance.to_dict() +# create an instance of AddOrganizationMemberRequest from a dict +add_organization_member_request_from_dict = AddOrganizationMemberRequest.from_dict(add_organization_member_request_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/sdk/python/src/docs/AdminApi.md b/sdk/python/src/docs/AdminApi.md new file mode 100644 index 00000000..7eec6028 --- /dev/null +++ b/sdk/python/src/docs/AdminApi.md @@ -0,0 +1,1079 @@ +# zrok_api.AdminApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_organization_member**](AdminApi.md#add_organization_member) | **POST** /organization/add | +[**create_account**](AdminApi.md#create_account) | **POST** /account | +[**create_frontend**](AdminApi.md#create_frontend) | **POST** /frontend | +[**create_identity**](AdminApi.md#create_identity) | **POST** /identity | +[**create_organization**](AdminApi.md#create_organization) | **POST** /organization | +[**delete_frontend**](AdminApi.md#delete_frontend) | **DELETE** /frontend | +[**delete_organization**](AdminApi.md#delete_organization) | **DELETE** /organization | +[**grants**](AdminApi.md#grants) | **POST** /grants | +[**invite_token_generate**](AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | +[**list_frontends**](AdminApi.md#list_frontends) | **GET** /frontends | +[**list_organization_members**](AdminApi.md#list_organization_members) | **POST** /organization/list | +[**list_organizations**](AdminApi.md#list_organizations) | **GET** /organizations | +[**remove_organization_member**](AdminApi.md#remove_organization_member) | **POST** /organization/remove | +[**update_frontend**](AdminApi.md#update_frontend) | **PATCH** /frontend | + + +# **add_organization_member** +> add_organization_member(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.AddOrganizationMemberRequest() # AddOrganizationMemberRequest | (optional) + + try: + api_instance.add_organization_member(body=body) + except Exception as e: + print("Exception when calling AdminApi->add_organization_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**AddOrganizationMemberRequest**](AddOrganizationMemberRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | member added | - | +**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_account** +> RegenerateAccountToken200Response create_account(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.LoginRequest() # LoginRequest | (optional) + + try: + api_response = api_instance.create_account(body=body) + print("The response of AdminApi->create_account:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_account: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**LoginRequest**](LoginRequest.md)| | [optional] + +### Return type + +[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | created | - | +**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) + +# **create_frontend** +> CreateFrontend201Response create_frontend(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateFrontendRequest() # CreateFrontendRequest | (optional) + + try: + api_response = api_instance.create_frontend(body=body) + print("The response of AdminApi->create_frontend:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_frontend: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateFrontendRequest**](CreateFrontendRequest.md)| | [optional] + +### Return type + +[**CreateFrontend201Response**](CreateFrontend201Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | frontend created | - | +**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_identity** +> CreateIdentity201Response create_identity(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateIdentityRequest() # CreateIdentityRequest | (optional) + + try: + api_response = api_instance.create_identity(body=body) + print("The response of AdminApi->create_identity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_identity: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateIdentityRequest**](CreateIdentityRequest.md)| | [optional] + +### Return type + +[**CreateIdentity201Response**](CreateIdentity201Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | created | - | +**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) + +# **create_organization** +> CreateOrganization201Response create_organization(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateOrganizationRequest() # CreateOrganizationRequest | (optional) + + try: + api_response = api_instance.create_organization(body=body) + print("The response of AdminApi->create_organization:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->create_organization: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md)| | [optional] + +### Return type + +[**CreateOrganization201Response**](CreateOrganization201Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | organization created | - | +**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) + +# **delete_frontend** +> delete_frontend(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateFrontend201Response() # CreateFrontend201Response | (optional) + + try: + api_instance.delete_frontend(body=body) + except Exception as e: + print("Exception when calling AdminApi->delete_frontend: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateFrontend201Response**](CreateFrontend201Response.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | frontend deleted | - | +**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) + +# **delete_organization** +> delete_organization(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) + + try: + api_instance.delete_organization(body=body) + except Exception as e: + print("Exception when calling AdminApi->delete_organization: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | organization deleted | - | +**401** | unauthorized | - | +**404** | organization 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) + +# **grants** +> grants(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.Verify200Response() # Verify200Response | (optional) + + try: + api_instance.grants(body=body) + except Exception as e: + print("Exception when calling AdminApi->grants: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Verify200Response**](Verify200Response.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) + +# **invite_token_generate** +> invite_token_generate(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.InviteTokenGenerateRequest() # InviteTokenGenerateRequest | (optional) + + try: + api_instance.invite_token_generate(body=body) + except Exception as e: + print("Exception when calling AdminApi->invite_token_generate: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**InviteTokenGenerateRequest**](InviteTokenGenerateRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | invite tokens created | - | +**400** | invite tokens not created | - | +**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) + +# **list_frontends** +> List[ListFrontends200ResponseInner] list_frontends() + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + + try: + api_response = api_instance.list_frontends() + print("The response of AdminApi->list_frontends:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->list_frontends: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[ListFrontends200ResponseInner]**](ListFrontends200ResponseInner.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) + +# **list_organization_members** +> ListOrganizationMembers200Response list_organization_members(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) + + try: + api_response = api_instance.list_organization_members(body=body) + print("The response of AdminApi->list_organization_members:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->list_organization_members: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] + +### Return type + +[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | list organization members | - | +**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_organizations** +> ListOrganizations200Response list_organizations() + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.list_organizations200_response import ListOrganizations200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + + try: + api_response = api_instance.list_organizations() + print("The response of AdminApi->list_organizations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AdminApi->list_organizations: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ListOrganizations200Response**](ListOrganizations200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) + +# **remove_organization_member** +> remove_organization_member(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.RemoveOrganizationMemberRequest() # RemoveOrganizationMemberRequest | (optional) + + try: + api_instance.remove_organization_member(body=body) + except Exception as e: + print("Exception when calling AdminApi->remove_organization_member: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**RemoveOrganizationMemberRequest**](RemoveOrganizationMemberRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | member removed | - | +**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_frontend** +> update_frontend(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.update_frontend_request import UpdateFrontendRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.AdminApi(api_client) + body = zrok_api.UpdateFrontendRequest() # UpdateFrontendRequest | (optional) + + try: + api_instance.update_frontend(body=body) + except Exception as e: + print("Exception when calling AdminApi->update_frontend: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UpdateFrontendRequest**](UpdateFrontendRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | frontend updated | - | +**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/sdk/python/src/docs/AuthUser.md b/sdk/python/src/docs/AuthUser.md new file mode 100644 index 00000000..99960687 --- /dev/null +++ b/sdk/python/src/docs/AuthUser.md @@ -0,0 +1,30 @@ +# AuthUser + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | [optional] +**password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.auth_user import AuthUser + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthUser from a JSON string +auth_user_instance = AuthUser.from_json(json) +# print the JSON string representation of the object +print(AuthUser.to_json()) + +# convert the object into a dict +auth_user_dict = auth_user_instance.to_dict() +# create an instance of AuthUser from a dict +auth_user_from_dict = AuthUser.from_dict(auth_user_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/sdk/python/src/docs/ChangePasswordRequest.md b/sdk/python/src/docs/ChangePasswordRequest.md new file mode 100644 index 00000000..5fea099e --- /dev/null +++ b/sdk/python/src/docs/ChangePasswordRequest.md @@ -0,0 +1,31 @@ +# ChangePasswordRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**old_password** | **str** | | [optional] +**new_password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.change_password_request import ChangePasswordRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ChangePasswordRequest from a JSON string +change_password_request_instance = ChangePasswordRequest.from_json(json) +# print the JSON string representation of the object +print(ChangePasswordRequest.to_json()) + +# convert the object into a dict +change_password_request_dict = change_password_request_instance.to_dict() +# create an instance of ChangePasswordRequest from a dict +change_password_request_from_dict = ChangePasswordRequest.from_dict(change_password_request_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/sdk/python/src/docs/ClientVersionCheckRequest.md b/sdk/python/src/docs/ClientVersionCheckRequest.md new file mode 100644 index 00000000..53d9e16e --- /dev/null +++ b/sdk/python/src/docs/ClientVersionCheckRequest.md @@ -0,0 +1,29 @@ +# ClientVersionCheckRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_version** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ClientVersionCheckRequest from a JSON string +client_version_check_request_instance = ClientVersionCheckRequest.from_json(json) +# print the JSON string representation of the object +print(ClientVersionCheckRequest.to_json()) + +# convert the object into a dict +client_version_check_request_dict = client_version_check_request_instance.to_dict() +# create an instance of ClientVersionCheckRequest from a dict +client_version_check_request_from_dict = ClientVersionCheckRequest.from_dict(client_version_check_request_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/sdk/python/src/docs/Configuration.md b/sdk/python/src/docs/Configuration.md new file mode 100644 index 00000000..07eec945 --- /dev/null +++ b/sdk/python/src/docs/Configuration.md @@ -0,0 +1,33 @@ +# Configuration + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **str** | | [optional] +**tou_link** | **str** | | [optional] +**invites_open** | **bool** | | [optional] +**requires_invite_token** | **bool** | | [optional] +**invite_token_contact** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.configuration import Configuration + +# TODO update the JSON string below +json = "{}" +# create an instance of Configuration from a JSON string +configuration_instance = Configuration.from_json(json) +# print the JSON string representation of the object +print(Configuration.to_json()) + +# convert the object into a dict +configuration_dict = configuration_instance.to_dict() +# create an instance of Configuration from a dict +configuration_from_dict = Configuration.from_dict(configuration_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/sdk/python/src/docs/CreateFrontend201Response.md b/sdk/python/src/docs/CreateFrontend201Response.md new file mode 100644 index 00000000..7239add1 --- /dev/null +++ b/sdk/python/src/docs/CreateFrontend201Response.md @@ -0,0 +1,29 @@ +# CreateFrontend201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_frontend201_response import CreateFrontend201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFrontend201Response from a JSON string +create_frontend201_response_instance = CreateFrontend201Response.from_json(json) +# print the JSON string representation of the object +print(CreateFrontend201Response.to_json()) + +# convert the object into a dict +create_frontend201_response_dict = create_frontend201_response_instance.to_dict() +# create an instance of CreateFrontend201Response from a dict +create_frontend201_response_from_dict = CreateFrontend201Response.from_dict(create_frontend201_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/sdk/python/src/docs/CreateFrontendRequest.md b/sdk/python/src/docs/CreateFrontendRequest.md new file mode 100644 index 00000000..63fe8779 --- /dev/null +++ b/sdk/python/src/docs/CreateFrontendRequest.md @@ -0,0 +1,32 @@ +# CreateFrontendRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**z_id** | **str** | | [optional] +**url_template** | **str** | | [optional] +**public_name** | **str** | | [optional] +**permission_mode** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_frontend_request import CreateFrontendRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFrontendRequest from a JSON string +create_frontend_request_instance = CreateFrontendRequest.from_json(json) +# print the JSON string representation of the object +print(CreateFrontendRequest.to_json()) + +# convert the object into a dict +create_frontend_request_dict = create_frontend_request_instance.to_dict() +# create an instance of CreateFrontendRequest from a dict +create_frontend_request_from_dict = CreateFrontendRequest.from_dict(create_frontend_request_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/sdk/python/src/docs/CreateIdentity201Response.md b/sdk/python/src/docs/CreateIdentity201Response.md new file mode 100644 index 00000000..245275e2 --- /dev/null +++ b/sdk/python/src/docs/CreateIdentity201Response.md @@ -0,0 +1,30 @@ +# CreateIdentity201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity** | **str** | | [optional] +**cfg** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_identity201_response import CreateIdentity201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateIdentity201Response from a JSON string +create_identity201_response_instance = CreateIdentity201Response.from_json(json) +# print the JSON string representation of the object +print(CreateIdentity201Response.to_json()) + +# convert the object into a dict +create_identity201_response_dict = create_identity201_response_instance.to_dict() +# create an instance of CreateIdentity201Response from a dict +create_identity201_response_from_dict = CreateIdentity201Response.from_dict(create_identity201_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/sdk/python/src/docs/CreateIdentityRequest.md b/sdk/python/src/docs/CreateIdentityRequest.md new file mode 100644 index 00000000..50cb9457 --- /dev/null +++ b/sdk/python/src/docs/CreateIdentityRequest.md @@ -0,0 +1,29 @@ +# CreateIdentityRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_identity_request import CreateIdentityRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateIdentityRequest from a JSON string +create_identity_request_instance = CreateIdentityRequest.from_json(json) +# print the JSON string representation of the object +print(CreateIdentityRequest.to_json()) + +# convert the object into a dict +create_identity_request_dict = create_identity_request_instance.to_dict() +# create an instance of CreateIdentityRequest from a dict +create_identity_request_from_dict = CreateIdentityRequest.from_dict(create_identity_request_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/sdk/python/src/docs/CreateOrganization201Response.md b/sdk/python/src/docs/CreateOrganization201Response.md new file mode 100644 index 00000000..26bc640c --- /dev/null +++ b/sdk/python/src/docs/CreateOrganization201Response.md @@ -0,0 +1,29 @@ +# CreateOrganization201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_organization201_response import CreateOrganization201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOrganization201Response from a JSON string +create_organization201_response_instance = CreateOrganization201Response.from_json(json) +# print the JSON string representation of the object +print(CreateOrganization201Response.to_json()) + +# convert the object into a dict +create_organization201_response_dict = create_organization201_response_instance.to_dict() +# create an instance of CreateOrganization201Response from a dict +create_organization201_response_from_dict = CreateOrganization201Response.from_dict(create_organization201_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/sdk/python/src/docs/CreateOrganizationRequest.md b/sdk/python/src/docs/CreateOrganizationRequest.md new file mode 100644 index 00000000..458e339b --- /dev/null +++ b/sdk/python/src/docs/CreateOrganizationRequest.md @@ -0,0 +1,29 @@ +# CreateOrganizationRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.create_organization_request import CreateOrganizationRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateOrganizationRequest from a JSON string +create_organization_request_instance = CreateOrganizationRequest.from_json(json) +# print the JSON string representation of the object +print(CreateOrganizationRequest.to_json()) + +# convert the object into a dict +create_organization_request_dict = create_organization_request_instance.to_dict() +# create an instance of CreateOrganizationRequest from a dict +create_organization_request_from_dict = CreateOrganizationRequest.from_dict(create_organization_request_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/sdk/python/src/docs/DisableRequest.md b/sdk/python/src/docs/DisableRequest.md new file mode 100644 index 00000000..4e4490f1 --- /dev/null +++ b/sdk/python/src/docs/DisableRequest.md @@ -0,0 +1,29 @@ +# DisableRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.disable_request import DisableRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DisableRequest from a JSON string +disable_request_instance = DisableRequest.from_json(json) +# print the JSON string representation of the object +print(DisableRequest.to_json()) + +# convert the object into a dict +disable_request_dict = disable_request_instance.to_dict() +# create an instance of DisableRequest from a dict +disable_request_from_dict = DisableRequest.from_dict(disable_request_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/sdk/python/src/docs/EnableRequest.md b/sdk/python/src/docs/EnableRequest.md new file mode 100644 index 00000000..7720b3b9 --- /dev/null +++ b/sdk/python/src/docs/EnableRequest.md @@ -0,0 +1,30 @@ +# EnableRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**host** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.enable_request import EnableRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of EnableRequest from a JSON string +enable_request_instance = EnableRequest.from_json(json) +# print the JSON string representation of the object +print(EnableRequest.to_json()) + +# convert the object into a dict +enable_request_dict = enable_request_instance.to_dict() +# create an instance of EnableRequest from a dict +enable_request_from_dict = EnableRequest.from_dict(enable_request_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/sdk/python/src/docs/Environment.md b/sdk/python/src/docs/Environment.md new file mode 100644 index 00000000..44a9356b --- /dev/null +++ b/sdk/python/src/docs/Environment.md @@ -0,0 +1,36 @@ +# Environment + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**host** | **str** | | [optional] +**address** | **str** | | [optional] +**z_id** | **str** | | [optional] +**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] +**limited** | **bool** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +## Example + +```python +from zrok_api.models.environment import Environment + +# TODO update the JSON string below +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()) + +# convert the object into a dict +environment_dict = environment_instance.to_dict() +# create an instance of Environment from a dict +environment_from_dict = Environment.from_dict(environment_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/sdk/python/src/docs/EnvironmentAndResources.md b/sdk/python/src/docs/EnvironmentAndResources.md new file mode 100644 index 00000000..a218ae3c --- /dev/null +++ b/sdk/python/src/docs/EnvironmentAndResources.md @@ -0,0 +1,31 @@ +# EnvironmentAndResources + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**environment** | [**Environment**](Environment.md) | | [optional] +**frontends** | [**List[Frontend]**](Frontend.md) | | [optional] +**shares** | [**List[Share]**](Share.md) | | [optional] + +## Example + +```python +from zrok_api.models.environment_and_resources import EnvironmentAndResources + +# TODO update the JSON string below +json = "{}" +# create an instance of EnvironmentAndResources from a JSON string +environment_and_resources_instance = EnvironmentAndResources.from_json(json) +# print the JSON string representation of the object +print(EnvironmentAndResources.to_json()) + +# convert the object into a dict +environment_and_resources_dict = environment_and_resources_instance.to_dict() +# create an instance of EnvironmentAndResources from a dict +environment_and_resources_from_dict = EnvironmentAndResources.from_dict(environment_and_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/sdk/python/src/docs/EnvironmentApi.md b/sdk/python/src/docs/EnvironmentApi.md new file mode 100644 index 00000000..a50ae1d3 --- /dev/null +++ b/sdk/python/src/docs/EnvironmentApi.md @@ -0,0 +1,162 @@ +# zrok_api.EnvironmentApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**disable**](EnvironmentApi.md#disable) | **POST** /disable | +[**enable**](EnvironmentApi.md#enable) | **POST** /enable | + + +# **disable** +> disable(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.disable_request import DisableRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.EnvironmentApi(api_client) + body = zrok_api.DisableRequest() # DisableRequest | (optional) + + try: + api_instance.disable(body=body) + except Exception as e: + print("Exception when calling EnvironmentApi->disable: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**DisableRequest**](DisableRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | environment disabled | - | +**401** | invalid environment | - | +**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) + +# **enable** +> CreateIdentity201Response enable(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.enable_request import EnableRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.EnvironmentApi(api_client) + body = zrok_api.EnableRequest() # EnableRequest | (optional) + + try: + api_response = api_instance.enable(body=body) + print("The response of EnvironmentApi->enable:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnvironmentApi->enable: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**EnableRequest**](EnableRequest.md)| | [optional] + +### Return type + +[**CreateIdentity201Response**](CreateIdentity201Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | environment enabled | - | +**401** | unauthorized | - | +**404** | account 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/sdk/python/src/docs/Frontend.md b/sdk/python/src/docs/Frontend.md new file mode 100644 index 00000000..ce41a9b7 --- /dev/null +++ b/sdk/python/src/docs/Frontend.md @@ -0,0 +1,37 @@ +# Frontend + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**frontend_token** | **str** | | [optional] +**share_token** | **str** | | [optional] +**backend_mode** | **str** | | [optional] +**bind_address** | **str** | | [optional] +**description** | **str** | | [optional] +**z_id** | **str** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +## Example + +```python +from zrok_api.models.frontend import Frontend + +# TODO update the JSON string below +json = "{}" +# create an instance of Frontend from a JSON string +frontend_instance = Frontend.from_json(json) +# print the JSON string representation of the object +print(Frontend.to_json()) + +# convert the object into a dict +frontend_dict = frontend_instance.to_dict() +# create an instance of Frontend from a dict +frontend_from_dict = Frontend.from_dict(frontend_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/sdk/python/src/docs/GetSparklines200Response.md b/sdk/python/src/docs/GetSparklines200Response.md new file mode 100644 index 00000000..66528c7e --- /dev/null +++ b/sdk/python/src/docs/GetSparklines200Response.md @@ -0,0 +1,29 @@ +# GetSparklines200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sparklines** | [**List[Metrics]**](Metrics.md) | | [optional] + +## Example + +```python +from zrok_api.models.get_sparklines200_response import GetSparklines200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetSparklines200Response from a JSON string +get_sparklines200_response_instance = GetSparklines200Response.from_json(json) +# print the JSON string representation of the object +print(GetSparklines200Response.to_json()) + +# convert the object into a dict +get_sparklines200_response_dict = get_sparklines200_response_instance.to_dict() +# create an instance of GetSparklines200Response from a dict +get_sparklines200_response_from_dict = GetSparklines200Response.from_dict(get_sparklines200_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/sdk/python/src/docs/GetSparklinesRequest.md b/sdk/python/src/docs/GetSparklinesRequest.md new file mode 100644 index 00000000..29369ebc --- /dev/null +++ b/sdk/python/src/docs/GetSparklinesRequest.md @@ -0,0 +1,31 @@ +# GetSparklinesRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account** | **bool** | | [optional] +**environments** | **List[str]** | | [optional] +**shares** | **List[str]** | | [optional] + +## Example + +```python +from zrok_api.models.get_sparklines_request import GetSparklinesRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of GetSparklinesRequest from a JSON string +get_sparklines_request_instance = GetSparklinesRequest.from_json(json) +# print the JSON string representation of the object +print(GetSparklinesRequest.to_json()) + +# convert the object into a dict +get_sparklines_request_dict = get_sparklines_request_instance.to_dict() +# create an instance of GetSparklinesRequest from a dict +get_sparklines_request_from_dict = GetSparklinesRequest.from_dict(get_sparklines_request_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/sdk/python/src/docs/InviteRequest.md b/sdk/python/src/docs/InviteRequest.md new file mode 100644 index 00000000..039132e8 --- /dev/null +++ b/sdk/python/src/docs/InviteRequest.md @@ -0,0 +1,30 @@ +# InviteRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**invite_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.invite_request import InviteRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteRequest from a JSON string +invite_request_instance = InviteRequest.from_json(json) +# print the JSON string representation of the object +print(InviteRequest.to_json()) + +# convert the object into a dict +invite_request_dict = invite_request_instance.to_dict() +# create an instance of InviteRequest from a dict +invite_request_from_dict = InviteRequest.from_dict(invite_request_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/sdk/python/src/docs/InviteTokenGenerateRequest.md b/sdk/python/src/docs/InviteTokenGenerateRequest.md new file mode 100644 index 00000000..33a20d70 --- /dev/null +++ b/sdk/python/src/docs/InviteTokenGenerateRequest.md @@ -0,0 +1,29 @@ +# InviteTokenGenerateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invite_tokens** | **List[str]** | | [optional] + +## Example + +```python +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteTokenGenerateRequest from a JSON string +invite_token_generate_request_instance = InviteTokenGenerateRequest.from_json(json) +# print the JSON string representation of the object +print(InviteTokenGenerateRequest.to_json()) + +# convert the object into a dict +invite_token_generate_request_dict = invite_token_generate_request_instance.to_dict() +# create an instance of InviteTokenGenerateRequest from a dict +invite_token_generate_request_from_dict = InviteTokenGenerateRequest.from_dict(invite_token_generate_request_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/sdk/python/src/docs/ListFrontends200ResponseInner.md b/sdk/python/src/docs/ListFrontends200ResponseInner.md new file mode 100644 index 00000000..625ea343 --- /dev/null +++ b/sdk/python/src/docs/ListFrontends200ResponseInner.md @@ -0,0 +1,34 @@ +# ListFrontends200ResponseInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**z_id** | **str** | | [optional] +**url_template** | **str** | | [optional] +**public_name** | **str** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +## Example + +```python +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListFrontends200ResponseInner from a JSON string +list_frontends200_response_inner_instance = ListFrontends200ResponseInner.from_json(json) +# print the JSON string representation of the object +print(ListFrontends200ResponseInner.to_json()) + +# convert the object into a dict +list_frontends200_response_inner_dict = list_frontends200_response_inner_instance.to_dict() +# create an instance of ListFrontends200ResponseInner from a dict +list_frontends200_response_inner_from_dict = ListFrontends200ResponseInner.from_dict(list_frontends200_response_inner_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/sdk/python/src/docs/ListMemberships200Response.md b/sdk/python/src/docs/ListMemberships200Response.md new file mode 100644 index 00000000..48e19dbf --- /dev/null +++ b/sdk/python/src/docs/ListMemberships200Response.md @@ -0,0 +1,29 @@ +# ListMemberships200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memberships** | [**List[ListMemberships200ResponseMembershipsInner]**](ListMemberships200ResponseMembershipsInner.md) | | [optional] + +## Example + +```python +from zrok_api.models.list_memberships200_response import ListMemberships200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ListMemberships200Response from a JSON string +list_memberships200_response_instance = ListMemberships200Response.from_json(json) +# print the JSON string representation of the object +print(ListMemberships200Response.to_json()) + +# convert the object into a dict +list_memberships200_response_dict = list_memberships200_response_instance.to_dict() +# create an instance of ListMemberships200Response from a dict +list_memberships200_response_from_dict = ListMemberships200Response.from_dict(list_memberships200_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/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md b/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md new file mode 100644 index 00000000..e85c7440 --- /dev/null +++ b/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md @@ -0,0 +1,31 @@ +# ListMemberships200ResponseMembershipsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**description** | **str** | | [optional] +**admin** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListMemberships200ResponseMembershipsInner from a JSON string +list_memberships200_response_memberships_inner_instance = ListMemberships200ResponseMembershipsInner.from_json(json) +# print the JSON string representation of the object +print(ListMemberships200ResponseMembershipsInner.to_json()) + +# convert the object into a dict +list_memberships200_response_memberships_inner_dict = list_memberships200_response_memberships_inner_instance.to_dict() +# create an instance of ListMemberships200ResponseMembershipsInner from a dict +list_memberships200_response_memberships_inner_from_dict = ListMemberships200ResponseMembershipsInner.from_dict(list_memberships200_response_memberships_inner_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/sdk/python/src/docs/ListOrganizationMembers200Response.md b/sdk/python/src/docs/ListOrganizationMembers200Response.md new file mode 100644 index 00000000..e05a28bf --- /dev/null +++ b/sdk/python/src/docs/ListOrganizationMembers200Response.md @@ -0,0 +1,29 @@ +# ListOrganizationMembers200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | [**List[ListOrganizationMembers200ResponseMembersInner]**](ListOrganizationMembers200ResponseMembersInner.md) | | [optional] + +## Example + +```python +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizationMembers200Response from a JSON string +list_organization_members200_response_instance = ListOrganizationMembers200Response.from_json(json) +# print the JSON string representation of the object +print(ListOrganizationMembers200Response.to_json()) + +# convert the object into a dict +list_organization_members200_response_dict = list_organization_members200_response_instance.to_dict() +# create an instance of ListOrganizationMembers200Response from a dict +list_organization_members200_response_from_dict = ListOrganizationMembers200Response.from_dict(list_organization_members200_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/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md b/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md new file mode 100644 index 00000000..8ebbb35e --- /dev/null +++ b/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md @@ -0,0 +1,30 @@ +# ListOrganizationMembers200ResponseMembersInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**admin** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizationMembers200ResponseMembersInner from a JSON string +list_organization_members200_response_members_inner_instance = ListOrganizationMembers200ResponseMembersInner.from_json(json) +# print the JSON string representation of the object +print(ListOrganizationMembers200ResponseMembersInner.to_json()) + +# convert the object into a dict +list_organization_members200_response_members_inner_dict = list_organization_members200_response_members_inner_instance.to_dict() +# create an instance of ListOrganizationMembers200ResponseMembersInner from a dict +list_organization_members200_response_members_inner_from_dict = ListOrganizationMembers200ResponseMembersInner.from_dict(list_organization_members200_response_members_inner_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/sdk/python/src/docs/ListOrganizations200Response.md b/sdk/python/src/docs/ListOrganizations200Response.md new file mode 100644 index 00000000..46fe4d60 --- /dev/null +++ b/sdk/python/src/docs/ListOrganizations200Response.md @@ -0,0 +1,29 @@ +# ListOrganizations200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organizations** | [**List[ListOrganizations200ResponseOrganizationsInner]**](ListOrganizations200ResponseOrganizationsInner.md) | | [optional] + +## Example + +```python +from zrok_api.models.list_organizations200_response import ListOrganizations200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizations200Response from a JSON string +list_organizations200_response_instance = ListOrganizations200Response.from_json(json) +# print the JSON string representation of the object +print(ListOrganizations200Response.to_json()) + +# convert the object into a dict +list_organizations200_response_dict = list_organizations200_response_instance.to_dict() +# create an instance of ListOrganizations200Response from a dict +list_organizations200_response_from_dict = ListOrganizations200Response.from_dict(list_organizations200_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/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md b/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md new file mode 100644 index 00000000..468447f2 --- /dev/null +++ b/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md @@ -0,0 +1,30 @@ +# ListOrganizations200ResponseOrganizationsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of ListOrganizations200ResponseOrganizationsInner from a JSON string +list_organizations200_response_organizations_inner_instance = ListOrganizations200ResponseOrganizationsInner.from_json(json) +# print the JSON string representation of the object +print(ListOrganizations200ResponseOrganizationsInner.to_json()) + +# convert the object into a dict +list_organizations200_response_organizations_inner_dict = list_organizations200_response_organizations_inner_instance.to_dict() +# create an instance of ListOrganizations200ResponseOrganizationsInner from a dict +list_organizations200_response_organizations_inner_from_dict = ListOrganizations200ResponseOrganizationsInner.from_dict(list_organizations200_response_organizations_inner_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/sdk/python/src/docs/LoginRequest.md b/sdk/python/src/docs/LoginRequest.md new file mode 100644 index 00000000..05728618 --- /dev/null +++ b/sdk/python/src/docs/LoginRequest.md @@ -0,0 +1,30 @@ +# LoginRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] +**password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.login_request import LoginRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of LoginRequest from a JSON string +login_request_instance = LoginRequest.from_json(json) +# print the JSON string representation of the object +print(LoginRequest.to_json()) + +# convert the object into a dict +login_request_dict = login_request_instance.to_dict() +# create an instance of LoginRequest from a dict +login_request_from_dict = LoginRequest.from_dict(login_request_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/sdk/python/src/docs/MetadataApi.md b/sdk/python/src/docs/MetadataApi.md new file mode 100644 index 00000000..ecb0cf8b --- /dev/null +++ b/sdk/python/src/docs/MetadataApi.md @@ -0,0 +1,1171 @@ +# zrok_api.MetadataApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**client_version_check**](MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | +[**configuration**](MetadataApi.md#configuration) | **GET** /configuration | +[**get_account_detail**](MetadataApi.md#get_account_detail) | **GET** /detail/account | +[**get_account_metrics**](MetadataApi.md#get_account_metrics) | **GET** /metrics/account | +[**get_environment_detail**](MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | +[**get_environment_metrics**](MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | +[**get_frontend_detail**](MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | +[**get_share_detail**](MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | +[**get_share_metrics**](MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | +[**get_sparklines**](MetadataApi.md#get_sparklines) | **POST** /sparklines | +[**list_memberships**](MetadataApi.md#list_memberships) | **GET** /memberships | +[**list_org_members**](MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | +[**org_account_overview**](MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | +[**overview**](MetadataApi.md#overview) | **GET** /overview | +[**version**](MetadataApi.md#version) | **GET** /version | +[**version_inventory**](MetadataApi.md#version_inventory) | **GET** /versions | + + +# **client_version_check** +> client_version_check(body=body) + +### Example + + +```python +import zrok_api +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + body = zrok_api.ClientVersionCheckRequest() # ClientVersionCheckRequest | (optional) + + try: + api_instance.client_version_check(body=body) + except Exception as e: + print("Exception when calling MetadataApi->client_version_check: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ClientVersionCheckRequest**](ClientVersionCheckRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | compatible | - | +**400** | not compatible | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **configuration** +> Configuration configuration() + +### Example + + +```python +import zrok_api +from zrok_api.models.configuration import Configuration +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.configuration() + print("The response of MetadataApi->configuration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->configuration: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Configuration**](Configuration.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | current configuration | - | + +[[Back to top]](#) [[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_account_detail** +> List[Environment] get_account_detail() + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.environment import Environment +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.get_account_detail() + print("The response of MetadataApi->get_account_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_account_detail: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[Environment]**](Environment.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_account_metrics** +> Metrics get_account_metrics(duration=duration) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.metrics import Metrics +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + duration = 'duration_example' # str | (optional) + + try: + api_response = api_instance.get_account_metrics(duration=duration) + print("The response of MetadataApi->get_account_metrics:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **duration** | **str**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | account metrics | - | +**400** | bad request | - | +**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_environment_detail** +> EnvironmentAndResources get_environment_detail(env_zid) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + env_zid = 'env_zid_example' # str | + + try: + api_response = api_instance.get_environment_detail(env_zid) + print("The response of MetadataApi->get_environment_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_zid** | **str**| | + +### Return type + +[**EnvironmentAndResources**](EnvironmentAndResources.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_environment_metrics** +> Metrics get_environment_metrics(env_id, duration=duration) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.metrics import Metrics +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + env_id = 'env_id_example' # str | + duration = 'duration_example' # str | (optional) + + try: + api_response = api_instance.get_environment_metrics(env_id, duration=duration) + print("The response of MetadataApi->get_environment_metrics:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **env_id** | **str**| | + **duration** | **str**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | environment metrics | - | +**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) + +# **get_frontend_detail** +> Frontend get_frontend_detail(frontend_id) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.frontend import Frontend +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + frontend_id = 56 # int | + + try: + api_response = api_instance.get_frontend_detail(frontend_id) + print("The response of MetadataApi->get_frontend_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **frontend_id** | **int**| | + +### Return type + +[**Frontend**](Frontend.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_share_detail** +> Share get_share_detail(share_token) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.share import Share +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + share_token = 'share_token_example' # str | + + try: + api_response = api_instance.get_share_detail(share_token) + print("The response of MetadataApi->get_share_detail:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_share_detail: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **share_token** | **str**| | + +### Return type + +[**Share**](Share.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_share_metrics** +> Metrics get_share_metrics(share_token, duration=duration) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.metrics import Metrics +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + share_token = 'share_token_example' # str | + duration = 'duration_example' # str | (optional) + + try: + api_response = api_instance.get_share_metrics(share_token, duration=duration) + print("The response of MetadataApi->get_share_metrics:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **share_token** | **str**| | + **duration** | **str**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | share metrics | - | +**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) + +# **get_sparklines** +> GetSparklines200Response get_sparklines(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + body = zrok_api.GetSparklinesRequest() # GetSparklinesRequest | (optional) + + try: + api_response = api_instance.get_sparklines(body=body) + print("The response of MetadataApi->get_sparklines:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->get_sparklines: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GetSparklinesRequest**](GetSparklinesRequest.md)| | [optional] + +### Return type + +[**GetSparklines200Response**](GetSparklines200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | sparklines data | - | +**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) + +# **list_memberships** +> ListMemberships200Response list_memberships() + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.list_memberships200_response import ListMemberships200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.list_memberships() + print("The response of MetadataApi->list_memberships:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->list_memberships: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ListMemberships200Response**](ListMemberships200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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_org_members** +> ListOrganizationMembers200Response list_org_members(organization_token) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + organization_token = 'organization_token_example' # str | + + try: + api_response = api_instance.list_org_members(organization_token) + print("The response of MetadataApi->list_org_members:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->list_org_members: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization_token** | **str**| | + +### Return type + +[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) + +# **org_account_overview** +> Overview org_account_overview(organization_token, account_email) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.overview import Overview +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + organization_token = 'organization_token_example' # str | + account_email = 'account_email_example' # str | + + try: + api_response = api_instance.org_account_overview(organization_token, account_email) + print("The response of MetadataApi->org_account_overview:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->org_account_overview: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization_token** | **str**| | + **account_email** | **str**| | + +### Return type + +[**Overview**](Overview.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | +**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) + +# **overview** +> Overview overview() + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.overview import Overview +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.overview() + print("The response of MetadataApi->overview:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->overview: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Overview**](Overview.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | overview returned | - | +**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) + +# **version** +> str version() + +### Example + + +```python +import zrok_api +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.version() + print("The response of MetadataApi->version:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->version: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**str** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | legacy upgrade required | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **version_inventory** +> VersionInventory200Response version_inventory() + +### Example + + +```python +import zrok_api +from zrok_api.models.version_inventory200_response import VersionInventory200Response +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/v1" +) + + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.MetadataApi(api_client) + + try: + api_response = api_instance.version_inventory() + print("The response of MetadataApi->version_inventory:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetadataApi->version_inventory: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**VersionInventory200Response**](VersionInventory200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | ok | - | + +[[Back to top]](#) [[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/sdk/python/src/docs/Metrics.md b/sdk/python/src/docs/Metrics.md new file mode 100644 index 00000000..9216f700 --- /dev/null +++ b/sdk/python/src/docs/Metrics.md @@ -0,0 +1,32 @@ +# Metrics + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **str** | | [optional] +**id** | **str** | | [optional] +**period** | **float** | | [optional] +**samples** | [**List[MetricsSample]**](MetricsSample.md) | | [optional] + +## Example + +```python +from zrok_api.models.metrics import Metrics + +# TODO update the JSON string below +json = "{}" +# create an instance of Metrics from a JSON string +metrics_instance = Metrics.from_json(json) +# print the JSON string representation of the object +print(Metrics.to_json()) + +# convert the object into a dict +metrics_dict = metrics_instance.to_dict() +# create an instance of Metrics from a dict +metrics_from_dict = Metrics.from_dict(metrics_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/sdk/python/src/docs/MetricsSample.md b/sdk/python/src/docs/MetricsSample.md new file mode 100644 index 00000000..96c1d94e --- /dev/null +++ b/sdk/python/src/docs/MetricsSample.md @@ -0,0 +1,31 @@ +# MetricsSample + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rx** | **float** | | [optional] +**tx** | **float** | | [optional] +**timestamp** | **float** | | [optional] + +## Example + +```python +from zrok_api.models.metrics_sample import MetricsSample + +# TODO update the JSON string below +json = "{}" +# create an instance of MetricsSample from a JSON string +metrics_sample_instance = MetricsSample.from_json(json) +# print the JSON string representation of the object +print(MetricsSample.to_json()) + +# convert the object into a dict +metrics_sample_dict = metrics_sample_instance.to_dict() +# create an instance of MetricsSample from a dict +metrics_sample_from_dict = MetricsSample.from_dict(metrics_sample_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/sdk/python/src/docs/Overview.md b/sdk/python/src/docs/Overview.md new file mode 100644 index 00000000..f50d6232 --- /dev/null +++ b/sdk/python/src/docs/Overview.md @@ -0,0 +1,30 @@ +# Overview + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_limited** | **bool** | | [optional] +**environments** | [**List[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional] + +## Example + +```python +from zrok_api.models.overview import Overview + +# TODO update the JSON string below +json = "{}" +# create an instance of Overview from a JSON string +overview_instance = Overview.from_json(json) +# print the JSON string representation of the object +print(Overview.to_json()) + +# convert the object into a dict +overview_dict = overview_instance.to_dict() +# create an instance of Overview from a dict +overview_from_dict = Overview.from_dict(overview_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/sdk/python/src/docs/Principal.md b/sdk/python/src/docs/Principal.md new file mode 100644 index 00000000..0a6d399c --- /dev/null +++ b/sdk/python/src/docs/Principal.md @@ -0,0 +1,33 @@ +# Principal + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**email** | **str** | | [optional] +**token** | **str** | | [optional] +**limitless** | **bool** | | [optional] +**admin** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.principal import Principal + +# TODO update the JSON string below +json = "{}" +# create an instance of Principal from a JSON string +principal_instance = Principal.from_json(json) +# print the JSON string representation of the object +print(Principal.to_json()) + +# convert the object into a dict +principal_dict = principal_instance.to_dict() +# create an instance of Principal from a dict +principal_from_dict = Principal.from_dict(principal_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/sdk/python/src/docs/RegenerateAccountToken200Response.md b/sdk/python/src/docs/RegenerateAccountToken200Response.md new file mode 100644 index 00000000..e86cc294 --- /dev/null +++ b/sdk/python/src/docs/RegenerateAccountToken200Response.md @@ -0,0 +1,29 @@ +# RegenerateAccountToken200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of RegenerateAccountToken200Response from a JSON string +regenerate_account_token200_response_instance = RegenerateAccountToken200Response.from_json(json) +# print the JSON string representation of the object +print(RegenerateAccountToken200Response.to_json()) + +# convert the object into a dict +regenerate_account_token200_response_dict = regenerate_account_token200_response_instance.to_dict() +# create an instance of RegenerateAccountToken200Response from a dict +regenerate_account_token200_response_from_dict = RegenerateAccountToken200Response.from_dict(regenerate_account_token200_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/sdk/python/src/docs/RegenerateAccountTokenRequest.md b/sdk/python/src/docs/RegenerateAccountTokenRequest.md new file mode 100644 index 00000000..113262a6 --- /dev/null +++ b/sdk/python/src/docs/RegenerateAccountTokenRequest.md @@ -0,0 +1,29 @@ +# RegenerateAccountTokenRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_address** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RegenerateAccountTokenRequest from a JSON string +regenerate_account_token_request_instance = RegenerateAccountTokenRequest.from_json(json) +# print the JSON string representation of the object +print(RegenerateAccountTokenRequest.to_json()) + +# convert the object into a dict +regenerate_account_token_request_dict = regenerate_account_token_request_instance.to_dict() +# create an instance of RegenerateAccountTokenRequest from a dict +regenerate_account_token_request_from_dict = RegenerateAccountTokenRequest.from_dict(regenerate_account_token_request_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/sdk/python/src/docs/RegisterRequest.md b/sdk/python/src/docs/RegisterRequest.md new file mode 100644 index 00000000..6e268aff --- /dev/null +++ b/sdk/python/src/docs/RegisterRequest.md @@ -0,0 +1,30 @@ +# RegisterRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**register_token** | **str** | | [optional] +**password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.register_request import RegisterRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RegisterRequest from a JSON string +register_request_instance = RegisterRequest.from_json(json) +# print the JSON string representation of the object +print(RegisterRequest.to_json()) + +# convert the object into a dict +register_request_dict = register_request_instance.to_dict() +# create an instance of RegisterRequest from a dict +register_request_from_dict = RegisterRequest.from_dict(register_request_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/sdk/python/src/docs/RemoveOrganizationMemberRequest.md b/sdk/python/src/docs/RemoveOrganizationMemberRequest.md new file mode 100644 index 00000000..75743291 --- /dev/null +++ b/sdk/python/src/docs/RemoveOrganizationMemberRequest.md @@ -0,0 +1,30 @@ +# RemoveOrganizationMemberRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_token** | **str** | | [optional] +**email** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of RemoveOrganizationMemberRequest from a JSON string +remove_organization_member_request_instance = RemoveOrganizationMemberRequest.from_json(json) +# print the JSON string representation of the object +print(RemoveOrganizationMemberRequest.to_json()) + +# convert the object into a dict +remove_organization_member_request_dict = remove_organization_member_request_instance.to_dict() +# create an instance of RemoveOrganizationMemberRequest from a dict +remove_organization_member_request_from_dict = RemoveOrganizationMemberRequest.from_dict(remove_organization_member_request_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/sdk/python/src/docs/ResetPasswordRequest.md b/sdk/python/src/docs/ResetPasswordRequest.md new file mode 100644 index 00000000..e91e841a --- /dev/null +++ b/sdk/python/src/docs/ResetPasswordRequest.md @@ -0,0 +1,30 @@ +# ResetPasswordRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reset_token** | **str** | | [optional] +**password** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.reset_password_request import ResetPasswordRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ResetPasswordRequest from a JSON string +reset_password_request_instance = ResetPasswordRequest.from_json(json) +# print the JSON string representation of the object +print(ResetPasswordRequest.to_json()) + +# convert the object into a dict +reset_password_request_dict = reset_password_request_instance.to_dict() +# create an instance of ResetPasswordRequest from a dict +reset_password_request_from_dict = ResetPasswordRequest.from_dict(reset_password_request_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/sdk/python/src/docs/Share.md b/sdk/python/src/docs/Share.md new file mode 100644 index 00000000..4fbfc430 --- /dev/null +++ b/sdk/python/src/docs/Share.md @@ -0,0 +1,40 @@ +# Share + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**share_token** | **str** | | [optional] +**z_id** | **str** | | [optional] +**share_mode** | **str** | | [optional] +**backend_mode** | **str** | | [optional] +**frontend_selection** | **str** | | [optional] +**frontend_endpoint** | **str** | | [optional] +**backend_proxy_endpoint** | **str** | | [optional] +**reserved** | **bool** | | [optional] +**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] +**limited** | **bool** | | [optional] +**created_at** | **int** | | [optional] +**updated_at** | **int** | | [optional] + +## Example + +```python +from zrok_api.models.share import Share + +# TODO update the JSON string below +json = "{}" +# create an instance of Share from a JSON string +share_instance = Share.from_json(json) +# print the JSON string representation of the object +print(Share.to_json()) + +# convert the object into a dict +share_dict = share_instance.to_dict() +# create an instance of Share from a dict +share_from_dict = Share.from_dict(share_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/sdk/python/src/docs/ShareApi.md b/sdk/python/src/docs/ShareApi.md new file mode 100644 index 00000000..2831f1d2 --- /dev/null +++ b/sdk/python/src/docs/ShareApi.md @@ -0,0 +1,473 @@ +# zrok_api.ShareApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**access**](ShareApi.md#access) | **POST** /access | +[**share**](ShareApi.md#share) | **POST** /share | +[**unaccess**](ShareApi.md#unaccess) | **DELETE** /unaccess | +[**unshare**](ShareApi.md#unshare) | **DELETE** /unshare | +[**update_access**](ShareApi.md#update_access) | **PATCH** /access | +[**update_share**](ShareApi.md#update_share) | **PATCH** /share | + + +# **access** +> Access201Response access(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.AccessRequest() # AccessRequest | (optional) + + try: + api_response = api_instance.access(body=body) + print("The response of ShareApi->access:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ShareApi->access: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**AccessRequest**](AccessRequest.md)| | [optional] + +### Return type + +[**Access201Response**](Access201Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | access created | - | +**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) + +# **share** +> ShareResponse share(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.share_response import ShareResponse +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.ShareRequest() # ShareRequest | (optional) + + try: + api_response = api_instance.share(body=body) + print("The response of ShareApi->share:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ShareApi->share: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ShareRequest**](ShareRequest.md)| | [optional] + +### Return type + +[**ShareResponse**](ShareResponse.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | share created | - | +**401** | unauthorized | - | +**404** | not found | - | +**409** | conflict | - | +**422** | unprocessable | - | +**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) + +# **unaccess** +> unaccess(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UnaccessRequest() # UnaccessRequest | (optional) + + try: + api_instance.unaccess(body=body) + except Exception as e: + print("Exception when calling ShareApi->unaccess: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UnaccessRequest**](UnaccessRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | access removed | - | +**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) + +# **unshare** +> unshare(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.unshare_request import UnshareRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UnshareRequest() # UnshareRequest | (optional) + + try: + api_instance.unshare(body=body) + except Exception as e: + print("Exception when calling ShareApi->unshare: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UnshareRequest**](UnshareRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: application/zrok.v1+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | share removed | - | +**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_access** +> update_access(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.update_access_request import UpdateAccessRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UpdateAccessRequest() # UpdateAccessRequest | (optional) + + try: + api_instance.update_access(body=body) + except Exception as e: + print("Exception when calling ShareApi->update_access: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UpdateAccessRequest**](UpdateAccessRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | access updated | - | +**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_share** +> update_share(body=body) + +### Example + +* Api Key Authentication (key): + +```python +import zrok_api +from zrok_api.models.update_share_request import UpdateShareRequest +from zrok_api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = zrok_api.Configuration( + host = "/api/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: key +configuration.api_key['key'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['key'] = 'Bearer' + +# Enter a context with an instance of the API client +with zrok_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zrok_api.ShareApi(api_client) + body = zrok_api.UpdateShareRequest() # UpdateShareRequest | (optional) + + try: + api_instance.update_share(body=body) + except Exception as e: + print("Exception when calling ShareApi->update_share: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UpdateShareRequest**](UpdateShareRequest.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + + - **Content-Type**: application/zrok.v1+json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | share updated | - | +**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/sdk/python/src/docs/ShareRequest.md b/sdk/python/src/docs/ShareRequest.md new file mode 100644 index 00000000..eb92f07a --- /dev/null +++ b/sdk/python/src/docs/ShareRequest.md @@ -0,0 +1,42 @@ +# ShareRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**env_zid** | **str** | | [optional] +**share_mode** | **str** | | [optional] +**frontend_selection** | **List[str]** | | [optional] +**backend_mode** | **str** | | [optional] +**backend_proxy_endpoint** | **str** | | [optional] +**auth_scheme** | **str** | | [optional] +**auth_users** | [**List[AuthUser]**](AuthUser.md) | | [optional] +**oauth_provider** | **str** | | [optional] +**oauth_email_domains** | **List[str]** | | [optional] +**oauth_authorization_check_interval** | **str** | | [optional] +**reserved** | **bool** | | [optional] +**permission_mode** | **str** | | [optional] +**access_grants** | **List[str]** | | [optional] +**unique_name** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.share_request import ShareRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ShareRequest from a JSON string +share_request_instance = ShareRequest.from_json(json) +# print the JSON string representation of the object +print(ShareRequest.to_json()) + +# convert the object into a dict +share_request_dict = share_request_instance.to_dict() +# create an instance of ShareRequest from a dict +share_request_from_dict = ShareRequest.from_dict(share_request_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/sdk/python/src/docs/ShareResponse.md b/sdk/python/src/docs/ShareResponse.md new file mode 100644 index 00000000..9bbedd0c --- /dev/null +++ b/sdk/python/src/docs/ShareResponse.md @@ -0,0 +1,30 @@ +# ShareResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_proxy_endpoints** | **List[str]** | | [optional] +**share_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.share_response import ShareResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ShareResponse from a JSON string +share_response_instance = ShareResponse.from_json(json) +# print the JSON string representation of the object +print(ShareResponse.to_json()) + +# convert the object into a dict +share_response_dict = share_response_instance.to_dict() +# create an instance of ShareResponse from a dict +share_response_from_dict = ShareResponse.from_dict(share_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/sdk/python/src/docs/SparkDataSample.md b/sdk/python/src/docs/SparkDataSample.md new file mode 100644 index 00000000..6479404c --- /dev/null +++ b/sdk/python/src/docs/SparkDataSample.md @@ -0,0 +1,30 @@ +# SparkDataSample + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rx** | **float** | | [optional] +**tx** | **float** | | [optional] + +## Example + +```python +from zrok_api.models.spark_data_sample import SparkDataSample + +# TODO update the JSON string below +json = "{}" +# create an instance of SparkDataSample from a JSON string +spark_data_sample_instance = SparkDataSample.from_json(json) +# print the JSON string representation of the object +print(SparkDataSample.to_json()) + +# convert the object into a dict +spark_data_sample_dict = spark_data_sample_instance.to_dict() +# create an instance of SparkDataSample from a dict +spark_data_sample_from_dict = SparkDataSample.from_dict(spark_data_sample_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/sdk/python/src/docs/UnaccessRequest.md b/sdk/python/src/docs/UnaccessRequest.md new file mode 100644 index 00000000..c7d57fd8 --- /dev/null +++ b/sdk/python/src/docs/UnaccessRequest.md @@ -0,0 +1,31 @@ +# UnaccessRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.unaccess_request import UnaccessRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnaccessRequest from a JSON string +unaccess_request_instance = UnaccessRequest.from_json(json) +# print the JSON string representation of the object +print(UnaccessRequest.to_json()) + +# convert the object into a dict +unaccess_request_dict = unaccess_request_instance.to_dict() +# create an instance of UnaccessRequest from a dict +unaccess_request_from_dict = UnaccessRequest.from_dict(unaccess_request_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/sdk/python/src/docs/UnshareRequest.md b/sdk/python/src/docs/UnshareRequest.md new file mode 100644 index 00000000..d376f008 --- /dev/null +++ b/sdk/python/src/docs/UnshareRequest.md @@ -0,0 +1,31 @@ +# UnshareRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**env_zid** | **str** | | [optional] +**share_token** | **str** | | [optional] +**reserved** | **bool** | | [optional] + +## Example + +```python +from zrok_api.models.unshare_request import UnshareRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnshareRequest from a JSON string +unshare_request_instance = UnshareRequest.from_json(json) +# print the JSON string representation of the object +print(UnshareRequest.to_json()) + +# convert the object into a dict +unshare_request_dict = unshare_request_instance.to_dict() +# create an instance of UnshareRequest from a dict +unshare_request_from_dict = UnshareRequest.from_dict(unshare_request_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/sdk/python/src/docs/UpdateAccessRequest.md b/sdk/python/src/docs/UpdateAccessRequest.md new file mode 100644 index 00000000..7d9027da --- /dev/null +++ b/sdk/python/src/docs/UpdateAccessRequest.md @@ -0,0 +1,31 @@ +# UpdateAccessRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**bind_address** | **str** | | [optional] +**description** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.update_access_request import UpdateAccessRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateAccessRequest from a JSON string +update_access_request_instance = UpdateAccessRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateAccessRequest.to_json()) + +# convert the object into a dict +update_access_request_dict = update_access_request_instance.to_dict() +# create an instance of UpdateAccessRequest from a dict +update_access_request_from_dict = UpdateAccessRequest.from_dict(update_access_request_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/sdk/python/src/docs/UpdateFrontendRequest.md b/sdk/python/src/docs/UpdateFrontendRequest.md new file mode 100644 index 00000000..754bf4b6 --- /dev/null +++ b/sdk/python/src/docs/UpdateFrontendRequest.md @@ -0,0 +1,31 @@ +# UpdateFrontendRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontend_token** | **str** | | [optional] +**public_name** | **str** | | [optional] +**url_template** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.update_frontend_request import UpdateFrontendRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateFrontendRequest from a JSON string +update_frontend_request_instance = UpdateFrontendRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateFrontendRequest.to_json()) + +# convert the object into a dict +update_frontend_request_dict = update_frontend_request_instance.to_dict() +# create an instance of UpdateFrontendRequest from a dict +update_frontend_request_from_dict = UpdateFrontendRequest.from_dict(update_frontend_request_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/sdk/python/src/docs/UpdateShareRequest.md b/sdk/python/src/docs/UpdateShareRequest.md new file mode 100644 index 00000000..8719ab10 --- /dev/null +++ b/sdk/python/src/docs/UpdateShareRequest.md @@ -0,0 +1,32 @@ +# UpdateShareRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**share_token** | **str** | | [optional] +**backend_proxy_endpoint** | **str** | | [optional] +**add_access_grants** | **List[str]** | | [optional] +**remove_access_grants** | **List[str]** | | [optional] + +## Example + +```python +from zrok_api.models.update_share_request import UpdateShareRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateShareRequest from a JSON string +update_share_request_instance = UpdateShareRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateShareRequest.to_json()) + +# convert the object into a dict +update_share_request_dict = update_share_request_instance.to_dict() +# create an instance of UpdateShareRequest from a dict +update_share_request_from_dict = UpdateShareRequest.from_dict(update_share_request_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/sdk/python/src/docs/Verify200Response.md b/sdk/python/src/docs/Verify200Response.md new file mode 100644 index 00000000..5ca1769d --- /dev/null +++ b/sdk/python/src/docs/Verify200Response.md @@ -0,0 +1,29 @@ +# Verify200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.verify200_response import Verify200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of Verify200Response from a JSON string +verify200_response_instance = Verify200Response.from_json(json) +# print the JSON string representation of the object +print(Verify200Response.to_json()) + +# convert the object into a dict +verify200_response_dict = verify200_response_instance.to_dict() +# create an instance of Verify200Response from a dict +verify200_response_from_dict = Verify200Response.from_dict(verify200_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/sdk/python/src/docs/VerifyRequest.md b/sdk/python/src/docs/VerifyRequest.md new file mode 100644 index 00000000..da6a0728 --- /dev/null +++ b/sdk/python/src/docs/VerifyRequest.md @@ -0,0 +1,29 @@ +# VerifyRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**register_token** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.verify_request import VerifyRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifyRequest from a JSON string +verify_request_instance = VerifyRequest.from_json(json) +# print the JSON string representation of the object +print(VerifyRequest.to_json()) + +# convert the object into a dict +verify_request_dict = verify_request_instance.to_dict() +# create an instance of VerifyRequest from a dict +verify_request_from_dict = VerifyRequest.from_dict(verify_request_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/sdk/python/src/docs/VersionInventory200Response.md b/sdk/python/src/docs/VersionInventory200Response.md new file mode 100644 index 00000000..2c08de2c --- /dev/null +++ b/sdk/python/src/docs/VersionInventory200Response.md @@ -0,0 +1,29 @@ +# VersionInventory200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**controller_version** | **str** | | [optional] + +## Example + +```python +from zrok_api.models.version_inventory200_response import VersionInventory200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of VersionInventory200Response from a JSON string +version_inventory200_response_instance = VersionInventory200Response.from_json(json) +# print the JSON string representation of the object +print(VersionInventory200Response.to_json()) + +# convert the object into a dict +version_inventory200_response_dict = version_inventory200_response_instance.to_dict() +# create an instance of VersionInventory200Response from a dict +version_inventory200_response_from_dict = VersionInventory200Response.from_dict(version_inventory200_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/sdk/python/src/test/__init__.py b/sdk/python/src/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/sdk/python/src/test/test_access201_response.py b/sdk/python/src/test/test_access201_response.py new file mode 100644 index 00000000..9b698d1c --- /dev/null +++ b/sdk/python/src/test/test_access201_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.access201_response import Access201Response + +class TestAccess201Response(unittest.TestCase): + """Access201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Access201Response: + """Test Access201Response + include_optional 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 `Access201Response` + """ + model = Access201Response() + if include_optional: + return Access201Response( + frontend_token = '', + backend_mode = '' + ) + else: + return Access201Response( + ) + """ + + def testAccess201Response(self): + """Test Access201Response""" + # 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/sdk/python/src/test/test_access_request.py b/sdk/python/src/test/test_access_request.py new file mode 100644 index 00000000..070903e9 --- /dev/null +++ b/sdk/python/src/test/test_access_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.access_request import AccessRequest + +class TestAccessRequest(unittest.TestCase): + """AccessRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccessRequest: + """Test AccessRequest + include_optional 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 `AccessRequest` + """ + model = AccessRequest() + if include_optional: + return AccessRequest( + env_zid = '', + share_token = '', + bind_address = '', + description = '' + ) + else: + return AccessRequest( + ) + """ + + def testAccessRequest(self): + """Test AccessRequest""" + # 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/sdk/python/src/test/test_account_api.py b/sdk/python/src/test/test_account_api.py new file mode 100644 index 00000000..419e1f1b --- /dev/null +++ b/sdk/python/src/test/test_account_api.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.api.account_api import AccountApi + + +class TestAccountApi(unittest.TestCase): + """AccountApi unit test stubs""" + + def setUp(self) -> None: + self.api = AccountApi() + + def tearDown(self) -> None: + pass + + def test_change_password(self) -> None: + """Test case for change_password + + """ + pass + + def test_invite(self) -> None: + """Test case for invite + + """ + pass + + def test_login(self) -> None: + """Test case for login + + """ + pass + + def test_regenerate_account_token(self) -> None: + """Test case for regenerate_account_token + + """ + pass + + def test_register(self) -> None: + """Test case for register + + """ + pass + + def test_reset_password(self) -> None: + """Test case for reset_password + + """ + pass + + def test_reset_password_request(self) -> None: + """Test case for reset_password_request + + """ + pass + + def test_verify(self) -> None: + """Test case for verify + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/src/test/test_add_organization_member_request.py b/sdk/python/src/test/test_add_organization_member_request.py new file mode 100644 index 00000000..7a08de67 --- /dev/null +++ b/sdk/python/src/test/test_add_organization_member_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest + +class TestAddOrganizationMemberRequest(unittest.TestCase): + """AddOrganizationMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddOrganizationMemberRequest: + """Test AddOrganizationMemberRequest + include_optional 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 `AddOrganizationMemberRequest` + """ + model = AddOrganizationMemberRequest() + if include_optional: + return AddOrganizationMemberRequest( + organization_token = '', + email = '', + admin = True + ) + else: + return AddOrganizationMemberRequest( + ) + """ + + def testAddOrganizationMemberRequest(self): + """Test AddOrganizationMemberRequest""" + # 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/sdk/python/src/test/test_admin_api.py b/sdk/python/src/test/test_admin_api.py new file mode 100644 index 00000000..720e8832 --- /dev/null +++ b/sdk/python/src/test/test_admin_api.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.api.admin_api import AdminApi + + +class TestAdminApi(unittest.TestCase): + """AdminApi unit test stubs""" + + def setUp(self) -> None: + self.api = AdminApi() + + def tearDown(self) -> None: + pass + + def test_add_organization_member(self) -> None: + """Test case for add_organization_member + + """ + pass + + def test_create_account(self) -> None: + """Test case for create_account + + """ + pass + + def test_create_frontend(self) -> None: + """Test case for create_frontend + + """ + pass + + def test_create_identity(self) -> None: + """Test case for create_identity + + """ + pass + + def test_create_organization(self) -> None: + """Test case for create_organization + + """ + pass + + def test_delete_frontend(self) -> None: + """Test case for delete_frontend + + """ + pass + + def test_delete_organization(self) -> None: + """Test case for delete_organization + + """ + pass + + def test_grants(self) -> None: + """Test case for grants + + """ + pass + + def test_invite_token_generate(self) -> None: + """Test case for invite_token_generate + + """ + pass + + def test_list_frontends(self) -> None: + """Test case for list_frontends + + """ + pass + + def test_list_organization_members(self) -> None: + """Test case for list_organization_members + + """ + pass + + def test_list_organizations(self) -> None: + """Test case for list_organizations + + """ + pass + + def test_remove_organization_member(self) -> None: + """Test case for remove_organization_member + + """ + pass + + def test_update_frontend(self) -> None: + """Test case for update_frontend + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/src/test/test_auth_user.py b/sdk/python/src/test/test_auth_user.py new file mode 100644 index 00000000..e5d70b26 --- /dev/null +++ b/sdk/python/src/test/test_auth_user.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.auth_user import AuthUser + +class TestAuthUser(unittest.TestCase): + """AuthUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthUser: + """Test AuthUser + include_optional 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 `AuthUser` + """ + model = AuthUser() + if include_optional: + return AuthUser( + username = '', + password = '' + ) + else: + return AuthUser( + ) + """ + + def testAuthUser(self): + """Test AuthUser""" + # 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/sdk/python/src/test/test_change_password_request.py b/sdk/python/src/test/test_change_password_request.py new file mode 100644 index 00000000..592e8be1 --- /dev/null +++ b/sdk/python/src/test/test_change_password_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.change_password_request import ChangePasswordRequest + +class TestChangePasswordRequest(unittest.TestCase): + """ChangePasswordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChangePasswordRequest: + """Test ChangePasswordRequest + include_optional 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 `ChangePasswordRequest` + """ + model = ChangePasswordRequest() + if include_optional: + return ChangePasswordRequest( + email = '', + old_password = '', + new_password = '' + ) + else: + return ChangePasswordRequest( + ) + """ + + def testChangePasswordRequest(self): + """Test ChangePasswordRequest""" + # 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/sdk/python/src/test/test_client_version_check_request.py b/sdk/python/src/test/test_client_version_check_request.py new file mode 100644 index 00000000..169017d6 --- /dev/null +++ b/sdk/python/src/test/test_client_version_check_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest + +class TestClientVersionCheckRequest(unittest.TestCase): + """ClientVersionCheckRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClientVersionCheckRequest: + """Test ClientVersionCheckRequest + include_optional 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 `ClientVersionCheckRequest` + """ + model = ClientVersionCheckRequest() + if include_optional: + return ClientVersionCheckRequest( + client_version = '' + ) + else: + return ClientVersionCheckRequest( + ) + """ + + def testClientVersionCheckRequest(self): + """Test ClientVersionCheckRequest""" + # 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/sdk/python/src/test/test_configuration.py b/sdk/python/src/test/test_configuration.py new file mode 100644 index 00000000..bf80210e --- /dev/null +++ b/sdk/python/src/test/test_configuration.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.configuration import Configuration + +class TestConfiguration(unittest.TestCase): + """Configuration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Configuration: + """Test Configuration + include_optional 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 `Configuration` + """ + model = Configuration() + if include_optional: + return Configuration( + version = '', + tou_link = '', + invites_open = True, + requires_invite_token = True, + invite_token_contact = '' + ) + else: + return Configuration( + ) + """ + + def testConfiguration(self): + """Test Configuration""" + # 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/sdk/python/src/test/test_create_frontend201_response.py b/sdk/python/src/test/test_create_frontend201_response.py new file mode 100644 index 00000000..3f983a1a --- /dev/null +++ b/sdk/python/src/test/test_create_frontend201_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_frontend201_response import CreateFrontend201Response + +class TestCreateFrontend201Response(unittest.TestCase): + """CreateFrontend201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateFrontend201Response: + """Test CreateFrontend201Response + include_optional 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 `CreateFrontend201Response` + """ + model = CreateFrontend201Response() + if include_optional: + return CreateFrontend201Response( + frontend_token = '' + ) + else: + return CreateFrontend201Response( + ) + """ + + def testCreateFrontend201Response(self): + """Test CreateFrontend201Response""" + # 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/sdk/python/src/test/test_create_frontend_request.py b/sdk/python/src/test/test_create_frontend_request.py new file mode 100644 index 00000000..8fc35754 --- /dev/null +++ b/sdk/python/src/test/test_create_frontend_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_frontend_request import CreateFrontendRequest + +class TestCreateFrontendRequest(unittest.TestCase): + """CreateFrontendRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateFrontendRequest: + """Test CreateFrontendRequest + include_optional 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 `CreateFrontendRequest` + """ + model = CreateFrontendRequest() + if include_optional: + return CreateFrontendRequest( + z_id = '', + url_template = '', + public_name = '', + permission_mode = 'open' + ) + else: + return CreateFrontendRequest( + ) + """ + + def testCreateFrontendRequest(self): + """Test CreateFrontendRequest""" + # 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/sdk/python/src/test/test_create_identity201_response.py b/sdk/python/src/test/test_create_identity201_response.py new file mode 100644 index 00000000..2a9c8f2b --- /dev/null +++ b/sdk/python/src/test/test_create_identity201_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_identity201_response import CreateIdentity201Response + +class TestCreateIdentity201Response(unittest.TestCase): + """CreateIdentity201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateIdentity201Response: + """Test CreateIdentity201Response + include_optional 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 `CreateIdentity201Response` + """ + model = CreateIdentity201Response() + if include_optional: + return CreateIdentity201Response( + identity = '', + cfg = '' + ) + else: + return CreateIdentity201Response( + ) + """ + + def testCreateIdentity201Response(self): + """Test CreateIdentity201Response""" + # 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/sdk/python/src/test/test_create_identity_request.py b/sdk/python/src/test/test_create_identity_request.py new file mode 100644 index 00000000..9bf33031 --- /dev/null +++ b/sdk/python/src/test/test_create_identity_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_identity_request import CreateIdentityRequest + +class TestCreateIdentityRequest(unittest.TestCase): + """CreateIdentityRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateIdentityRequest: + """Test CreateIdentityRequest + include_optional 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 `CreateIdentityRequest` + """ + model = CreateIdentityRequest() + if include_optional: + return CreateIdentityRequest( + name = '' + ) + else: + return CreateIdentityRequest( + ) + """ + + def testCreateIdentityRequest(self): + """Test CreateIdentityRequest""" + # 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/sdk/python/src/test/test_create_organization201_response.py b/sdk/python/src/test/test_create_organization201_response.py new file mode 100644 index 00000000..d4dc7c81 --- /dev/null +++ b/sdk/python/src/test/test_create_organization201_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_organization201_response import CreateOrganization201Response + +class TestCreateOrganization201Response(unittest.TestCase): + """CreateOrganization201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOrganization201Response: + """Test CreateOrganization201Response + include_optional 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 `CreateOrganization201Response` + """ + model = CreateOrganization201Response() + if include_optional: + return CreateOrganization201Response( + organization_token = '' + ) + else: + return CreateOrganization201Response( + ) + """ + + def testCreateOrganization201Response(self): + """Test CreateOrganization201Response""" + # 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/sdk/python/src/test/test_create_organization_request.py b/sdk/python/src/test/test_create_organization_request.py new file mode 100644 index 00000000..da880237 --- /dev/null +++ b/sdk/python/src/test/test_create_organization_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.create_organization_request import CreateOrganizationRequest + +class TestCreateOrganizationRequest(unittest.TestCase): + """CreateOrganizationRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateOrganizationRequest: + """Test CreateOrganizationRequest + include_optional 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 `CreateOrganizationRequest` + """ + model = CreateOrganizationRequest() + if include_optional: + return CreateOrganizationRequest( + description = '' + ) + else: + return CreateOrganizationRequest( + ) + """ + + def testCreateOrganizationRequest(self): + """Test CreateOrganizationRequest""" + # 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/sdk/python/src/test/test_disable_request.py b/sdk/python/src/test/test_disable_request.py new file mode 100644 index 00000000..c4837b4b --- /dev/null +++ b/sdk/python/src/test/test_disable_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.disable_request import DisableRequest + +class TestDisableRequest(unittest.TestCase): + """DisableRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DisableRequest: + """Test DisableRequest + include_optional 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 `DisableRequest` + """ + model = DisableRequest() + if include_optional: + return DisableRequest( + identity = '' + ) + else: + return DisableRequest( + ) + """ + + def testDisableRequest(self): + """Test DisableRequest""" + # 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/sdk/python/src/test/test_enable_request.py b/sdk/python/src/test/test_enable_request.py new file mode 100644 index 00000000..49689df4 --- /dev/null +++ b/sdk/python/src/test/test_enable_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.enable_request import EnableRequest + +class TestEnableRequest(unittest.TestCase): + """EnableRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnableRequest: + """Test EnableRequest + include_optional 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 `EnableRequest` + """ + model = EnableRequest() + if include_optional: + return EnableRequest( + description = '', + host = '' + ) + else: + return EnableRequest( + ) + """ + + def testEnableRequest(self): + """Test EnableRequest""" + # 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/sdk/python/src/test/test_environment.py b/sdk/python/src/test/test_environment.py new file mode 100644 index 00000000..d2e28280 --- /dev/null +++ b/sdk/python/src/test/test_environment.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.environment import Environment + +class TestEnvironment(unittest.TestCase): + """Environment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Environment: + """Test Environment + include_optional 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 `Environment` + """ + model = Environment() + if include_optional: + return Environment( + description = '', + host = '', + address = '', + z_id = '', + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56 + ) + else: + return Environment( + ) + """ + + def testEnvironment(self): + """Test Environment""" + # 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/sdk/python/src/test/test_environment_and_resources.py b/sdk/python/src/test/test_environment_and_resources.py new file mode 100644 index 00000000..56cafdac --- /dev/null +++ b/sdk/python/src/test/test_environment_and_resources.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.environment_and_resources import EnvironmentAndResources + +class TestEnvironmentAndResources(unittest.TestCase): + """EnvironmentAndResources unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnvironmentAndResources: + """Test EnvironmentAndResources + include_optional 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 `EnvironmentAndResources` + """ + model = EnvironmentAndResources() + if include_optional: + return EnvironmentAndResources( + environment = zrok_api.models.environment.environment( + description = '', + host = '', + address = '', + z_id = '', + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56, ), + frontends = [ + zrok_api.models.frontend.frontend( + id = 56, + frontend_token = '', + share_token = '', + backend_mode = '', + bind_address = '', + description = '', + z_id = '', + created_at = 56, + updated_at = 56, ) + ], + shares = [ + zrok_api.models.share.share( + share_token = '', + z_id = '', + share_mode = '', + backend_mode = '', + frontend_selection = '', + frontend_endpoint = '', + backend_proxy_endpoint = '', + reserved = True, + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56, ) + ] + ) + else: + return EnvironmentAndResources( + ) + """ + + def testEnvironmentAndResources(self): + """Test EnvironmentAndResources""" + # 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/sdk/python/src/test/test_environment_api.py b/sdk/python/src/test/test_environment_api.py new file mode 100644 index 00000000..83aeacd8 --- /dev/null +++ b/sdk/python/src/test/test_environment_api.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.api.environment_api import EnvironmentApi + + +class TestEnvironmentApi(unittest.TestCase): + """EnvironmentApi unit test stubs""" + + def setUp(self) -> None: + self.api = EnvironmentApi() + + def tearDown(self) -> None: + pass + + def test_disable(self) -> None: + """Test case for disable + + """ + pass + + def test_enable(self) -> None: + """Test case for enable + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/src/test/test_frontend.py b/sdk/python/src/test/test_frontend.py new file mode 100644 index 00000000..eba715d9 --- /dev/null +++ b/sdk/python/src/test/test_frontend.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.frontend import Frontend + +class TestFrontend(unittest.TestCase): + """Frontend unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Frontend: + """Test Frontend + include_optional 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 `Frontend` + """ + model = Frontend() + if include_optional: + return Frontend( + id = 56, + frontend_token = '', + share_token = '', + backend_mode = '', + bind_address = '', + description = '', + z_id = '', + created_at = 56, + updated_at = 56 + ) + else: + return Frontend( + ) + """ + + def testFrontend(self): + """Test Frontend""" + # 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/sdk/python/src/test/test_get_sparklines200_response.py b/sdk/python/src/test/test_get_sparklines200_response.py new file mode 100644 index 00000000..8367cc34 --- /dev/null +++ b/sdk/python/src/test/test_get_sparklines200_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.get_sparklines200_response import GetSparklines200Response + +class TestGetSparklines200Response(unittest.TestCase): + """GetSparklines200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetSparklines200Response: + """Test GetSparklines200Response + include_optional 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 `GetSparklines200Response` + """ + model = GetSparklines200Response() + if include_optional: + return GetSparklines200Response( + sparklines = [ + zrok_api.models.metrics.metrics( + scope = '', + id = '', + period = 1.337, + samples = [ + zrok_api.models.metrics_sample.metricsSample( + rx = 1.337, + tx = 1.337, + timestamp = 1.337, ) + ], ) + ] + ) + else: + return GetSparklines200Response( + ) + """ + + def testGetSparklines200Response(self): + """Test GetSparklines200Response""" + # 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/sdk/python/src/test/test_get_sparklines_request.py b/sdk/python/src/test/test_get_sparklines_request.py new file mode 100644 index 00000000..cd46979b --- /dev/null +++ b/sdk/python/src/test/test_get_sparklines_request.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.get_sparklines_request import GetSparklinesRequest + +class TestGetSparklinesRequest(unittest.TestCase): + """GetSparklinesRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetSparklinesRequest: + """Test GetSparklinesRequest + include_optional 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 `GetSparklinesRequest` + """ + model = GetSparklinesRequest() + if include_optional: + return GetSparklinesRequest( + account = True, + environments = [ + '' + ], + shares = [ + '' + ] + ) + else: + return GetSparklinesRequest( + ) + """ + + def testGetSparklinesRequest(self): + """Test GetSparklinesRequest""" + # 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/sdk/python/src/test/test_invite_request.py b/sdk/python/src/test/test_invite_request.py new file mode 100644 index 00000000..a181ad3b --- /dev/null +++ b/sdk/python/src/test/test_invite_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.invite_request import InviteRequest + +class TestInviteRequest(unittest.TestCase): + """InviteRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteRequest: + """Test InviteRequest + include_optional 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 `InviteRequest` + """ + model = InviteRequest() + if include_optional: + return InviteRequest( + email = '', + invite_token = '' + ) + else: + return InviteRequest( + ) + """ + + def testInviteRequest(self): + """Test InviteRequest""" + # 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/sdk/python/src/test/test_invite_token_generate_request.py b/sdk/python/src/test/test_invite_token_generate_request.py new file mode 100644 index 00000000..1a8c2c10 --- /dev/null +++ b/sdk/python/src/test/test_invite_token_generate_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest + +class TestInviteTokenGenerateRequest(unittest.TestCase): + """InviteTokenGenerateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InviteTokenGenerateRequest: + """Test InviteTokenGenerateRequest + include_optional 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 `InviteTokenGenerateRequest` + """ + model = InviteTokenGenerateRequest() + if include_optional: + return InviteTokenGenerateRequest( + invite_tokens = [ + '' + ] + ) + else: + return InviteTokenGenerateRequest( + ) + """ + + def testInviteTokenGenerateRequest(self): + """Test InviteTokenGenerateRequest""" + # 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/sdk/python/src/test/test_list_frontends200_response_inner.py b/sdk/python/src/test/test_list_frontends200_response_inner.py new file mode 100644 index 00000000..2e21b24d --- /dev/null +++ b/sdk/python/src/test/test_list_frontends200_response_inner.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner + +class TestListFrontends200ResponseInner(unittest.TestCase): + """ListFrontends200ResponseInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListFrontends200ResponseInner: + """Test ListFrontends200ResponseInner + include_optional 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 `ListFrontends200ResponseInner` + """ + model = ListFrontends200ResponseInner() + if include_optional: + return ListFrontends200ResponseInner( + frontend_token = '', + z_id = '', + url_template = '', + public_name = '', + created_at = 56, + updated_at = 56 + ) + else: + return ListFrontends200ResponseInner( + ) + """ + + def testListFrontends200ResponseInner(self): + """Test ListFrontends200ResponseInner""" + # 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/sdk/python/src/test/test_list_memberships200_response.py b/sdk/python/src/test/test_list_memberships200_response.py new file mode 100644 index 00000000..d23ac2dd --- /dev/null +++ b/sdk/python/src/test/test_list_memberships200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_memberships200_response import ListMemberships200Response + +class TestListMemberships200Response(unittest.TestCase): + """ListMemberships200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListMemberships200Response: + """Test ListMemberships200Response + include_optional 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 `ListMemberships200Response` + """ + model = ListMemberships200Response() + if include_optional: + return ListMemberships200Response( + memberships = [ + zrok_api.models.list_memberships_200_response_memberships_inner.listMemberships_200_response_memberships_inner( + organization_token = '', + description = '', + admin = True, ) + ] + ) + else: + return ListMemberships200Response( + ) + """ + + def testListMemberships200Response(self): + """Test ListMemberships200Response""" + # 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/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py b/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py new file mode 100644 index 00000000..2f7cf7ff --- /dev/null +++ b/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner + +class TestListMemberships200ResponseMembershipsInner(unittest.TestCase): + """ListMemberships200ResponseMembershipsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListMemberships200ResponseMembershipsInner: + """Test ListMemberships200ResponseMembershipsInner + include_optional 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 `ListMemberships200ResponseMembershipsInner` + """ + model = ListMemberships200ResponseMembershipsInner() + if include_optional: + return ListMemberships200ResponseMembershipsInner( + organization_token = '', + description = '', + admin = True + ) + else: + return ListMemberships200ResponseMembershipsInner( + ) + """ + + def testListMemberships200ResponseMembershipsInner(self): + """Test ListMemberships200ResponseMembershipsInner""" + # 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/sdk/python/src/test/test_list_organization_members200_response.py b/sdk/python/src/test/test_list_organization_members200_response.py new file mode 100644 index 00000000..8020c6c7 --- /dev/null +++ b/sdk/python/src/test/test_list_organization_members200_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response + +class TestListOrganizationMembers200Response(unittest.TestCase): + """ListOrganizationMembers200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizationMembers200Response: + """Test ListOrganizationMembers200Response + include_optional 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 `ListOrganizationMembers200Response` + """ + model = ListOrganizationMembers200Response() + if include_optional: + return ListOrganizationMembers200Response( + members = [ + zrok_api.models.list_organization_members_200_response_members_inner.listOrganizationMembers_200_response_members_inner( + email = '', + admin = True, ) + ] + ) + else: + return ListOrganizationMembers200Response( + ) + """ + + def testListOrganizationMembers200Response(self): + """Test ListOrganizationMembers200Response""" + # 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/sdk/python/src/test/test_list_organization_members200_response_members_inner.py b/sdk/python/src/test/test_list_organization_members200_response_members_inner.py new file mode 100644 index 00000000..28cea33f --- /dev/null +++ b/sdk/python/src/test/test_list_organization_members200_response_members_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner + +class TestListOrganizationMembers200ResponseMembersInner(unittest.TestCase): + """ListOrganizationMembers200ResponseMembersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizationMembers200ResponseMembersInner: + """Test ListOrganizationMembers200ResponseMembersInner + include_optional 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 `ListOrganizationMembers200ResponseMembersInner` + """ + model = ListOrganizationMembers200ResponseMembersInner() + if include_optional: + return ListOrganizationMembers200ResponseMembersInner( + email = '', + admin = True + ) + else: + return ListOrganizationMembers200ResponseMembersInner( + ) + """ + + def testListOrganizationMembers200ResponseMembersInner(self): + """Test ListOrganizationMembers200ResponseMembersInner""" + # 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/sdk/python/src/test/test_list_organizations200_response.py b/sdk/python/src/test/test_list_organizations200_response.py new file mode 100644 index 00000000..7133529e --- /dev/null +++ b/sdk/python/src/test/test_list_organizations200_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organizations200_response import ListOrganizations200Response + +class TestListOrganizations200Response(unittest.TestCase): + """ListOrganizations200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizations200Response: + """Test ListOrganizations200Response + include_optional 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 `ListOrganizations200Response` + """ + model = ListOrganizations200Response() + if include_optional: + return ListOrganizations200Response( + organizations = [ + zrok_api.models.list_organizations_200_response_organizations_inner.listOrganizations_200_response_organizations_inner( + organization_token = '', + description = '', ) + ] + ) + else: + return ListOrganizations200Response( + ) + """ + + def testListOrganizations200Response(self): + """Test ListOrganizations200Response""" + # 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/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py b/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py new file mode 100644 index 00000000..6d857ae1 --- /dev/null +++ b/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner + +class TestListOrganizations200ResponseOrganizationsInner(unittest.TestCase): + """ListOrganizations200ResponseOrganizationsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListOrganizations200ResponseOrganizationsInner: + """Test ListOrganizations200ResponseOrganizationsInner + include_optional 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 `ListOrganizations200ResponseOrganizationsInner` + """ + model = ListOrganizations200ResponseOrganizationsInner() + if include_optional: + return ListOrganizations200ResponseOrganizationsInner( + organization_token = '', + description = '' + ) + else: + return ListOrganizations200ResponseOrganizationsInner( + ) + """ + + def testListOrganizations200ResponseOrganizationsInner(self): + """Test ListOrganizations200ResponseOrganizationsInner""" + # 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/sdk/python/src/test/test_login_request.py b/sdk/python/src/test/test_login_request.py new file mode 100644 index 00000000..1a4c2642 --- /dev/null +++ b/sdk/python/src/test/test_login_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.login_request import LoginRequest + +class TestLoginRequest(unittest.TestCase): + """LoginRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginRequest: + """Test LoginRequest + include_optional 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 `LoginRequest` + """ + model = LoginRequest() + if include_optional: + return LoginRequest( + email = '', + password = '' + ) + else: + return LoginRequest( + ) + """ + + def testLoginRequest(self): + """Test LoginRequest""" + # 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/sdk/python/src/test/test_metadata_api.py b/sdk/python/src/test/test_metadata_api.py new file mode 100644 index 00000000..2424ae4c --- /dev/null +++ b/sdk/python/src/test/test_metadata_api.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.api.metadata_api import MetadataApi + + +class TestMetadataApi(unittest.TestCase): + """MetadataApi unit test stubs""" + + def setUp(self) -> None: + self.api = MetadataApi() + + def tearDown(self) -> None: + pass + + def test_client_version_check(self) -> None: + """Test case for client_version_check + + """ + pass + + def test_configuration(self) -> None: + """Test case for configuration + + """ + pass + + def test_get_account_detail(self) -> None: + """Test case for get_account_detail + + """ + pass + + def test_get_account_metrics(self) -> None: + """Test case for get_account_metrics + + """ + pass + + def test_get_environment_detail(self) -> None: + """Test case for get_environment_detail + + """ + pass + + def test_get_environment_metrics(self) -> None: + """Test case for get_environment_metrics + + """ + pass + + def test_get_frontend_detail(self) -> None: + """Test case for get_frontend_detail + + """ + pass + + def test_get_share_detail(self) -> None: + """Test case for get_share_detail + + """ + pass + + def test_get_share_metrics(self) -> None: + """Test case for get_share_metrics + + """ + pass + + def test_get_sparklines(self) -> None: + """Test case for get_sparklines + + """ + pass + + def test_list_memberships(self) -> None: + """Test case for list_memberships + + """ + pass + + def test_list_org_members(self) -> None: + """Test case for list_org_members + + """ + pass + + def test_org_account_overview(self) -> None: + """Test case for org_account_overview + + """ + pass + + def test_overview(self) -> None: + """Test case for overview + + """ + pass + + def test_version(self) -> None: + """Test case for version + + """ + pass + + def test_version_inventory(self) -> None: + """Test case for version_inventory + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/src/test/test_metrics.py b/sdk/python/src/test/test_metrics.py new file mode 100644 index 00000000..04179009 --- /dev/null +++ b/sdk/python/src/test/test_metrics.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.metrics import Metrics + +class TestMetrics(unittest.TestCase): + """Metrics unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Metrics: + """Test Metrics + include_optional 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 `Metrics` + """ + model = Metrics() + if include_optional: + return Metrics( + scope = '', + id = '', + period = 1.337, + samples = [ + zrok_api.models.metrics_sample.metricsSample( + rx = 1.337, + tx = 1.337, + timestamp = 1.337, ) + ] + ) + else: + return Metrics( + ) + """ + + def testMetrics(self): + """Test Metrics""" + # 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/sdk/python/src/test/test_metrics_sample.py b/sdk/python/src/test/test_metrics_sample.py new file mode 100644 index 00000000..0b58e38d --- /dev/null +++ b/sdk/python/src/test/test_metrics_sample.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.metrics_sample import MetricsSample + +class TestMetricsSample(unittest.TestCase): + """MetricsSample unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MetricsSample: + """Test MetricsSample + include_optional 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 `MetricsSample` + """ + model = MetricsSample() + if include_optional: + return MetricsSample( + rx = 1.337, + tx = 1.337, + timestamp = 1.337 + ) + else: + return MetricsSample( + ) + """ + + def testMetricsSample(self): + """Test MetricsSample""" + # 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/sdk/python/src/test/test_overview.py b/sdk/python/src/test/test_overview.py new file mode 100644 index 00000000..804007cd --- /dev/null +++ b/sdk/python/src/test/test_overview.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.overview import Overview + +class TestOverview(unittest.TestCase): + """Overview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Overview: + """Test Overview + include_optional 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 `Overview` + """ + model = Overview() + if include_optional: + return Overview( + account_limited = True, + environments = [ + zrok_api.models.environment_and_resources.environmentAndResources( + environment = zrok_api.models.environment.environment( + description = '', + host = '', + address = '', + z_id = '', + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56, ), + frontends = [ + zrok_api.models.frontend.frontend( + id = 56, + frontend_token = '', + share_token = '', + backend_mode = '', + bind_address = '', + description = '', + z_id = '', + created_at = 56, + updated_at = 56, ) + ], + shares = [ + zrok_api.models.share.share( + share_token = '', + z_id = '', + share_mode = '', + backend_mode = '', + frontend_selection = '', + frontend_endpoint = '', + backend_proxy_endpoint = '', + reserved = True, + limited = True, + created_at = 56, + updated_at = 56, ) + ], ) + ] + ) + else: + return Overview( + ) + """ + + def testOverview(self): + """Test Overview""" + # 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/sdk/python/src/test/test_principal.py b/sdk/python/src/test/test_principal.py new file mode 100644 index 00000000..f92c159c --- /dev/null +++ b/sdk/python/src/test/test_principal.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.principal import Principal + +class TestPrincipal(unittest.TestCase): + """Principal unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Principal: + """Test Principal + include_optional 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 `Principal` + """ + model = Principal() + if include_optional: + return Principal( + id = 56, + email = '', + token = '', + limitless = True, + admin = True + ) + else: + return Principal( + ) + """ + + def testPrincipal(self): + """Test Principal""" + # 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/sdk/python/src/test/test_regenerate_account_token200_response.py b/sdk/python/src/test/test_regenerate_account_token200_response.py new file mode 100644 index 00000000..a94c4678 --- /dev/null +++ b/sdk/python/src/test/test_regenerate_account_token200_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response + +class TestRegenerateAccountToken200Response(unittest.TestCase): + """RegenerateAccountToken200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RegenerateAccountToken200Response: + """Test RegenerateAccountToken200Response + include_optional 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 `RegenerateAccountToken200Response` + """ + model = RegenerateAccountToken200Response() + if include_optional: + return RegenerateAccountToken200Response( + account_token = '' + ) + else: + return RegenerateAccountToken200Response( + ) + """ + + def testRegenerateAccountToken200Response(self): + """Test RegenerateAccountToken200Response""" + # 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/sdk/python/src/test/test_regenerate_account_token_request.py b/sdk/python/src/test/test_regenerate_account_token_request.py new file mode 100644 index 00000000..b6e0b4bd --- /dev/null +++ b/sdk/python/src/test/test_regenerate_account_token_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest + +class TestRegenerateAccountTokenRequest(unittest.TestCase): + """RegenerateAccountTokenRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RegenerateAccountTokenRequest: + """Test RegenerateAccountTokenRequest + include_optional 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 `RegenerateAccountTokenRequest` + """ + model = RegenerateAccountTokenRequest() + if include_optional: + return RegenerateAccountTokenRequest( + email_address = '' + ) + else: + return RegenerateAccountTokenRequest( + ) + """ + + def testRegenerateAccountTokenRequest(self): + """Test RegenerateAccountTokenRequest""" + # 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/sdk/python/src/test/test_register_request.py b/sdk/python/src/test/test_register_request.py new file mode 100644 index 00000000..e026b200 --- /dev/null +++ b/sdk/python/src/test/test_register_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.register_request import RegisterRequest + +class TestRegisterRequest(unittest.TestCase): + """RegisterRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RegisterRequest: + """Test RegisterRequest + include_optional 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 `RegisterRequest` + """ + model = RegisterRequest() + if include_optional: + return RegisterRequest( + register_token = '', + password = '' + ) + else: + return RegisterRequest( + ) + """ + + def testRegisterRequest(self): + """Test RegisterRequest""" + # 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/sdk/python/src/test/test_remove_organization_member_request.py b/sdk/python/src/test/test_remove_organization_member_request.py new file mode 100644 index 00000000..abf89606 --- /dev/null +++ b/sdk/python/src/test/test_remove_organization_member_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest + +class TestRemoveOrganizationMemberRequest(unittest.TestCase): + """RemoveOrganizationMemberRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemoveOrganizationMemberRequest: + """Test RemoveOrganizationMemberRequest + include_optional 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 `RemoveOrganizationMemberRequest` + """ + model = RemoveOrganizationMemberRequest() + if include_optional: + return RemoveOrganizationMemberRequest( + organization_token = '', + email = '' + ) + else: + return RemoveOrganizationMemberRequest( + ) + """ + + def testRemoveOrganizationMemberRequest(self): + """Test RemoveOrganizationMemberRequest""" + # 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/sdk/python/src/test/test_reset_password_request.py b/sdk/python/src/test/test_reset_password_request.py new file mode 100644 index 00000000..2c047502 --- /dev/null +++ b/sdk/python/src/test/test_reset_password_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.reset_password_request import ResetPasswordRequest + +class TestResetPasswordRequest(unittest.TestCase): + """ResetPasswordRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResetPasswordRequest: + """Test ResetPasswordRequest + include_optional 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 `ResetPasswordRequest` + """ + model = ResetPasswordRequest() + if include_optional: + return ResetPasswordRequest( + reset_token = '', + password = '' + ) + else: + return ResetPasswordRequest( + ) + """ + + def testResetPasswordRequest(self): + """Test ResetPasswordRequest""" + # 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/sdk/python/src/test/test_share.py b/sdk/python/src/test/test_share.py new file mode 100644 index 00000000..ed498dc0 --- /dev/null +++ b/sdk/python/src/test/test_share.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.share import Share + +class TestShare(unittest.TestCase): + """Share unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Share: + """Test Share + include_optional 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 `Share` + """ + model = Share() + if include_optional: + return Share( + share_token = '', + z_id = '', + share_mode = '', + backend_mode = '', + frontend_selection = '', + frontend_endpoint = '', + backend_proxy_endpoint = '', + reserved = True, + activity = [ + zrok_api.models.spark_data_sample.sparkDataSample( + rx = 1.337, + tx = 1.337, ) + ], + limited = True, + created_at = 56, + updated_at = 56 + ) + else: + return Share( + ) + """ + + def testShare(self): + """Test Share""" + # 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/sdk/python/src/test/test_share_api.py b/sdk/python/src/test/test_share_api.py new file mode 100644 index 00000000..a22ef8bf --- /dev/null +++ b/sdk/python/src/test/test_share_api.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.api.share_api import ShareApi + + +class TestShareApi(unittest.TestCase): + """ShareApi unit test stubs""" + + def setUp(self) -> None: + self.api = ShareApi() + + def tearDown(self) -> None: + pass + + def test_access(self) -> None: + """Test case for access + + """ + pass + + def test_share(self) -> None: + """Test case for share + + """ + pass + + def test_unaccess(self) -> None: + """Test case for unaccess + + """ + pass + + def test_unshare(self) -> None: + """Test case for unshare + + """ + pass + + def test_update_access(self) -> None: + """Test case for update_access + + """ + pass + + def test_update_share(self) -> None: + """Test case for update_share + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/src/test/test_share_request.py b/sdk/python/src/test/test_share_request.py new file mode 100644 index 00000000..c543ae26 --- /dev/null +++ b/sdk/python/src/test/test_share_request.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.share_request import ShareRequest + +class TestShareRequest(unittest.TestCase): + """ShareRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ShareRequest: + """Test ShareRequest + include_optional 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 `ShareRequest` + """ + model = ShareRequest() + if include_optional: + return ShareRequest( + env_zid = '', + share_mode = 'public', + frontend_selection = [ + '' + ], + backend_mode = 'proxy', + backend_proxy_endpoint = '', + auth_scheme = '', + auth_users = [ + zrok_api.models.auth_user.authUser( + username = '', + password = '', ) + ], + oauth_provider = 'github', + oauth_email_domains = [ + '' + ], + oauth_authorization_check_interval = '', + reserved = True, + permission_mode = 'open', + access_grants = [ + '' + ], + unique_name = '' + ) + else: + return ShareRequest( + ) + """ + + def testShareRequest(self): + """Test ShareRequest""" + # 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/sdk/python/src/test/test_share_response.py b/sdk/python/src/test/test_share_response.py new file mode 100644 index 00000000..46bb5af5 --- /dev/null +++ b/sdk/python/src/test/test_share_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.share_response import ShareResponse + +class TestShareResponse(unittest.TestCase): + """ShareResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ShareResponse: + """Test ShareResponse + include_optional 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 `ShareResponse` + """ + model = ShareResponse() + if include_optional: + return ShareResponse( + frontend_proxy_endpoints = [ + '' + ], + share_token = '' + ) + else: + return ShareResponse( + ) + """ + + def testShareResponse(self): + """Test ShareResponse""" + # 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/sdk/python/src/test/test_spark_data_sample.py b/sdk/python/src/test/test_spark_data_sample.py new file mode 100644 index 00000000..421d5dcd --- /dev/null +++ b/sdk/python/src/test/test_spark_data_sample.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.spark_data_sample import SparkDataSample + +class TestSparkDataSample(unittest.TestCase): + """SparkDataSample unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SparkDataSample: + """Test SparkDataSample + include_optional 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 `SparkDataSample` + """ + model = SparkDataSample() + if include_optional: + return SparkDataSample( + rx = 1.337, + tx = 1.337 + ) + else: + return SparkDataSample( + ) + """ + + def testSparkDataSample(self): + """Test SparkDataSample""" + # 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/sdk/python/src/test/test_unaccess_request.py b/sdk/python/src/test/test_unaccess_request.py new file mode 100644 index 00000000..ade50dff --- /dev/null +++ b/sdk/python/src/test/test_unaccess_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.unaccess_request import UnaccessRequest + +class TestUnaccessRequest(unittest.TestCase): + """UnaccessRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnaccessRequest: + """Test UnaccessRequest + include_optional 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 `UnaccessRequest` + """ + model = UnaccessRequest() + if include_optional: + return UnaccessRequest( + frontend_token = '', + env_zid = '', + share_token = '' + ) + else: + return UnaccessRequest( + ) + """ + + def testUnaccessRequest(self): + """Test UnaccessRequest""" + # 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/sdk/python/src/test/test_unshare_request.py b/sdk/python/src/test/test_unshare_request.py new file mode 100644 index 00000000..f0eccf47 --- /dev/null +++ b/sdk/python/src/test/test_unshare_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.unshare_request import UnshareRequest + +class TestUnshareRequest(unittest.TestCase): + """UnshareRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnshareRequest: + """Test UnshareRequest + include_optional 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 `UnshareRequest` + """ + model = UnshareRequest() + if include_optional: + return UnshareRequest( + env_zid = '', + share_token = '', + reserved = True + ) + else: + return UnshareRequest( + ) + """ + + def testUnshareRequest(self): + """Test UnshareRequest""" + # 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/sdk/python/src/test/test_update_access_request.py b/sdk/python/src/test/test_update_access_request.py new file mode 100644 index 00000000..02c028bf --- /dev/null +++ b/sdk/python/src/test/test_update_access_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.update_access_request import UpdateAccessRequest + +class TestUpdateAccessRequest(unittest.TestCase): + """UpdateAccessRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateAccessRequest: + """Test UpdateAccessRequest + include_optional 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 `UpdateAccessRequest` + """ + model = UpdateAccessRequest() + if include_optional: + return UpdateAccessRequest( + frontend_token = '', + bind_address = '', + description = '' + ) + else: + return UpdateAccessRequest( + ) + """ + + def testUpdateAccessRequest(self): + """Test UpdateAccessRequest""" + # 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/sdk/python/src/test/test_update_frontend_request.py b/sdk/python/src/test/test_update_frontend_request.py new file mode 100644 index 00000000..9546bbac --- /dev/null +++ b/sdk/python/src/test/test_update_frontend_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.update_frontend_request import UpdateFrontendRequest + +class TestUpdateFrontendRequest(unittest.TestCase): + """UpdateFrontendRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateFrontendRequest: + """Test UpdateFrontendRequest + include_optional 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 `UpdateFrontendRequest` + """ + model = UpdateFrontendRequest() + if include_optional: + return UpdateFrontendRequest( + frontend_token = '', + public_name = '', + url_template = '' + ) + else: + return UpdateFrontendRequest( + ) + """ + + def testUpdateFrontendRequest(self): + """Test UpdateFrontendRequest""" + # 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/sdk/python/src/test/test_update_share_request.py b/sdk/python/src/test/test_update_share_request.py new file mode 100644 index 00000000..1d8df185 --- /dev/null +++ b/sdk/python/src/test/test_update_share_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.update_share_request import UpdateShareRequest + +class TestUpdateShareRequest(unittest.TestCase): + """UpdateShareRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateShareRequest: + """Test UpdateShareRequest + include_optional 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 `UpdateShareRequest` + """ + model = UpdateShareRequest() + if include_optional: + return UpdateShareRequest( + share_token = '', + backend_proxy_endpoint = '', + add_access_grants = [ + '' + ], + remove_access_grants = [ + '' + ] + ) + else: + return UpdateShareRequest( + ) + """ + + def testUpdateShareRequest(self): + """Test UpdateShareRequest""" + # 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/sdk/python/src/test/test_verify200_response.py b/sdk/python/src/test/test_verify200_response.py new file mode 100644 index 00000000..bf257b65 --- /dev/null +++ b/sdk/python/src/test/test_verify200_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.verify200_response import Verify200Response + +class TestVerify200Response(unittest.TestCase): + """Verify200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Verify200Response: + """Test Verify200Response + include_optional 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 `Verify200Response` + """ + model = Verify200Response() + if include_optional: + return Verify200Response( + email = '' + ) + else: + return Verify200Response( + ) + """ + + def testVerify200Response(self): + """Test Verify200Response""" + # 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/sdk/python/src/test/test_verify_request.py b/sdk/python/src/test/test_verify_request.py new file mode 100644 index 00000000..c6f45d94 --- /dev/null +++ b/sdk/python/src/test/test_verify_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.verify_request import VerifyRequest + +class TestVerifyRequest(unittest.TestCase): + """VerifyRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VerifyRequest: + """Test VerifyRequest + include_optional 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 `VerifyRequest` + """ + model = VerifyRequest() + if include_optional: + return VerifyRequest( + register_token = '' + ) + else: + return VerifyRequest( + ) + """ + + def testVerifyRequest(self): + """Test VerifyRequest""" + # 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/sdk/python/src/test/test_version_inventory200_response.py b/sdk/python/src/test/test_version_inventory200_response.py new file mode 100644 index 00000000..7343fd1f --- /dev/null +++ b/sdk/python/src/test/test_version_inventory200_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from zrok_api.models.version_inventory200_response import VersionInventory200Response + +class TestVersionInventory200Response(unittest.TestCase): + """VersionInventory200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VersionInventory200Response: + """Test VersionInventory200Response + include_optional 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 `VersionInventory200Response` + """ + model = VersionInventory200Response() + if include_optional: + return VersionInventory200Response( + controller_version = '' + ) + else: + return VersionInventory200Response( + ) + """ + + def testVersionInventory200Response(self): + """Test VersionInventory200Response""" + # 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/sdk/python/src/zrok_api/__init__.py b/sdk/python/src/zrok_api/__init__.py new file mode 100644 index 00000000..bf54fba9 --- /dev/null +++ b/sdk/python/src/zrok_api/__init__.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +# flake8: noqa + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "1.0.0" + +# import apis into sdk package +from zrok_api.api.account_api import AccountApi +from zrok_api.api.admin_api import AdminApi +from zrok_api.api.environment_api import EnvironmentApi +from zrok_api.api.metadata_api import MetadataApi +from zrok_api.api.share_api import ShareApi + +# import ApiClient +from zrok_api.api_response import ApiResponse +from zrok_api.api_client import ApiClient +from zrok_api.configuration import Configuration +from zrok_api.exceptions import OpenApiException +from zrok_api.exceptions import ApiTypeError +from zrok_api.exceptions import ApiValueError +from zrok_api.exceptions import ApiKeyError +from zrok_api.exceptions import ApiAttributeError +from zrok_api.exceptions import ApiException + +# import models into sdk package +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest +from zrok_api.models.auth_user import AuthUser +from zrok_api.models.change_password_request import ChangePasswordRequest +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest +from zrok_api.models.configuration import Configuration +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest +from zrok_api.models.disable_request import DisableRequest +from zrok_api.models.enable_request import EnableRequest +from zrok_api.models.environment import Environment +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from zrok_api.models.frontend import Frontend +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest +from zrok_api.models.invite_request import InviteRequest +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.models.list_memberships200_response import ListMemberships200Response +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner +from zrok_api.models.list_organizations200_response import ListOrganizations200Response +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.metrics import Metrics +from zrok_api.models.metrics_sample import MetricsSample +from zrok_api.models.overview import Overview +from zrok_api.models.principal import Principal +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.models.register_request import RegisterRequest +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest +from zrok_api.models.reset_password_request import ResetPasswordRequest +from zrok_api.models.share import Share +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.share_response import ShareResponse +from zrok_api.models.spark_data_sample import SparkDataSample +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.models.unshare_request import UnshareRequest +from zrok_api.models.update_access_request import UpdateAccessRequest +from zrok_api.models.update_frontend_request import UpdateFrontendRequest +from zrok_api.models.update_share_request import UpdateShareRequest +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest +from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/src/zrok_api/api/__init__.py b/sdk/python/src/zrok_api/api/__init__.py new file mode 100644 index 00000000..714f0a37 --- /dev/null +++ b/sdk/python/src/zrok_api/api/__init__.py @@ -0,0 +1,9 @@ +# flake8: noqa + +# import apis into api package +from zrok_api.api.account_api import AccountApi +from zrok_api.api.admin_api import AdminApi +from zrok_api.api.environment_api import EnvironmentApi +from zrok_api.api.metadata_api import MetadataApi +from zrok_api.api.share_api import ShareApi + diff --git a/sdk/python/src/zrok_api/api/account_api.py b/sdk/python/src/zrok_api/api/account_api.py new file mode 100644 index 00000000..d6a93a82 --- /dev/null +++ b/sdk/python/src/zrok_api/api/account_api.py @@ -0,0 +1,2261 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 StrictStr +from typing import Optional +from zrok_api.models.change_password_request import ChangePasswordRequest +from zrok_api.models.invite_request import InviteRequest +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.models.register_request import RegisterRequest +from zrok_api.models.reset_password_request import ResetPasswordRequest +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class AccountApi: + """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 change_password( + self, + body: Optional[ChangePasswordRequest] = 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, + ) -> None: + """change_password + + + :param body: + :type body: ChangePasswordRequest + :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._change_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '422': "str", + '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 change_password_with_http_info( + self, + body: Optional[ChangePasswordRequest] = 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[None]: + """change_password + + + :param body: + :type body: ChangePasswordRequest + :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._change_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '422': "str", + '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 change_password_without_preload_content( + self, + body: Optional[ChangePasswordRequest] = 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: + """change_password + + + :param body: + :type body: ChangePasswordRequest + :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._change_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '422': "str", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _change_password_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/changePassword', + 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 invite( + self, + body: Optional[InviteRequest] = 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, + ) -> None: + """invite + + + :param body: + :type body: InviteRequest + :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._invite_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': "str", + '401': None, + '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 invite_with_http_info( + self, + body: Optional[InviteRequest] = 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[None]: + """invite + + + :param body: + :type body: InviteRequest + :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._invite_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': "str", + '401': None, + '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 invite_without_preload_content( + self, + body: Optional[InviteRequest] = 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: + """invite + + + :param body: + :type body: InviteRequest + :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._invite_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': "str", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _invite_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/invite', + 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 login( + self, + body: Optional[LoginRequest] = 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, + ) -> str: + """login + + + :param body: + :type body: LoginRequest + :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._login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': 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 login_with_http_info( + self, + body: Optional[LoginRequest] = 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[str]: + """login + + + :param body: + :type body: LoginRequest + :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._login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': 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 login_without_preload_content( + self, + body: Optional[LoginRequest] = 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: + """login + + + :param body: + :type body: LoginRequest + :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._login_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _login_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/login', + 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 regenerate_account_token( + self, + body: Optional[RegenerateAccountTokenRequest] = 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, + ) -> RegenerateAccountToken200Response: + """regenerate_account_token + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._regenerate_account_token_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '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 regenerate_account_token_with_http_info( + self, + body: Optional[RegenerateAccountTokenRequest] = 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[RegenerateAccountToken200Response]: + """regenerate_account_token + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._regenerate_account_token_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '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 regenerate_account_token_without_preload_content( + self, + body: Optional[RegenerateAccountTokenRequest] = 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: + """regenerate_account_token + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._regenerate_account_token_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _regenerate_account_token_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/regenerateAccountToken', + 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 register( + self, + body: Optional[RegisterRequest] = 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, + ) -> RegenerateAccountToken200Response: + """register + + + :param body: + :type body: RegisterRequest + :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._register_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '422': "str", + '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 register_with_http_info( + self, + body: Optional[RegisterRequest] = 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[RegenerateAccountToken200Response]: + """register + + + :param body: + :type body: RegisterRequest + :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._register_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '422': "str", + '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 register_without_preload_content( + self, + body: Optional[RegisterRequest] = 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: + """register + + + :param body: + :type body: RegisterRequest + :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._register_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RegenerateAccountToken200Response", + '404': None, + '422': "str", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _register_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/register', + 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 reset_password( + self, + body: Optional[ResetPasswordRequest] = 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, + ) -> None: + """reset_password + + + :param body: + :type body: ResetPasswordRequest + :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._reset_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '404': None, + '422': "str", + '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 reset_password_with_http_info( + self, + body: Optional[ResetPasswordRequest] = 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[None]: + """reset_password + + + :param body: + :type body: ResetPasswordRequest + :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._reset_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '404': None, + '422': "str", + '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 reset_password_without_preload_content( + self, + body: Optional[ResetPasswordRequest] = 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: + """reset_password + + + :param body: + :type body: ResetPasswordRequest + :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._reset_password_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '404': None, + '422': "str", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reset_password_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/resetPassword', + 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 reset_password_request( + self, + body: Optional[RegenerateAccountTokenRequest] = 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, + ) -> None: + """reset_password_request + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._reset_password_request_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '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 reset_password_request_with_http_info( + self, + body: Optional[RegenerateAccountTokenRequest] = 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[None]: + """reset_password_request + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._reset_password_request_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '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 reset_password_request_without_preload_content( + self, + body: Optional[RegenerateAccountTokenRequest] = 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: + """reset_password_request + + + :param body: + :type body: RegenerateAccountTokenRequest + :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._reset_password_request_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _reset_password_request_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/resetPasswordRequest', + 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 verify( + self, + body: Optional[VerifyRequest] = 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, + ) -> Verify200Response: + """verify + + + :param body: + :type body: VerifyRequest + :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._verify_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Verify200Response", + '404': None, + '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 verify_with_http_info( + self, + body: Optional[VerifyRequest] = 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[Verify200Response]: + """verify + + + :param body: + :type body: VerifyRequest + :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._verify_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Verify200Response", + '404': None, + '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 verify_without_preload_content( + self, + body: Optional[VerifyRequest] = 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: + """verify + + + :param body: + :type body: VerifyRequest + :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._verify_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Verify200Response", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _verify_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/verify', + 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/sdk/python/src/zrok_api/api/admin_api.py b/sdk/python/src/zrok_api/api/admin_api.py new file mode 100644 index 00000000..6e0952fe --- /dev/null +++ b/sdk/python/src/zrok_api/api/admin_api.py @@ -0,0 +1,3855 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import List, Optional +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.list_organizations200_response import ListOrganizations200Response +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest +from zrok_api.models.update_frontend_request import UpdateFrontendRequest +from zrok_api.models.verify200_response import Verify200Response + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class AdminApi: + """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_organization_member( + self, + body: Optional[AddOrganizationMemberRequest] = 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, + ) -> None: + """add_organization_member + + + :param body: + :type body: AddOrganizationMemberRequest + :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_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '401': None, + '404': None, + '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_organization_member_with_http_info( + self, + body: Optional[AddOrganizationMemberRequest] = 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[None]: + """add_organization_member + + + :param body: + :type body: AddOrganizationMemberRequest + :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_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '401': None, + '404': None, + '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_organization_member_without_preload_content( + self, + body: Optional[AddOrganizationMemberRequest] = 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: + """add_organization_member + + + :param body: + :type body: AddOrganizationMemberRequest + :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_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_organization_member_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organization/add', + 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_account( + self, + body: Optional[LoginRequest] = 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, + ) -> RegenerateAccountToken200Response: + """create_account + + + :param body: + :type body: LoginRequest + :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_account_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RegenerateAccountToken200Response", + '401': None, + '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_account_with_http_info( + self, + body: Optional[LoginRequest] = 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[RegenerateAccountToken200Response]: + """create_account + + + :param body: + :type body: LoginRequest + :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_account_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RegenerateAccountToken200Response", + '401': None, + '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_account_without_preload_content( + self, + body: Optional[LoginRequest] = 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: + """create_account + + + :param body: + :type body: LoginRequest + :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_account_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RegenerateAccountToken200Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_account_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/account', + 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_frontend( + self, + body: Optional[CreateFrontendRequest] = 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, + ) -> CreateFrontend201Response: + """create_frontend + + + :param body: + :type body: CreateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFrontend201Response", + '400': None, + '401': None, + '404': None, + '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_frontend_with_http_info( + self, + body: Optional[CreateFrontendRequest] = 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[CreateFrontend201Response]: + """create_frontend + + + :param body: + :type body: CreateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFrontend201Response", + '400': None, + '401': None, + '404': None, + '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_frontend_without_preload_content( + self, + body: Optional[CreateFrontendRequest] = 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: + """create_frontend + + + :param body: + :type body: CreateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateFrontend201Response", + '400': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_frontend_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/frontend', + 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_identity( + self, + body: Optional[CreateIdentityRequest] = 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, + ) -> CreateIdentity201Response: + """create_identity + + + :param body: + :type body: CreateIdentityRequest + :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_identity_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '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_identity_with_http_info( + self, + body: Optional[CreateIdentityRequest] = 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[CreateIdentity201Response]: + """create_identity + + + :param body: + :type body: CreateIdentityRequest + :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_identity_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '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_identity_without_preload_content( + self, + body: Optional[CreateIdentityRequest] = 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: + """create_identity + + + :param body: + :type body: CreateIdentityRequest + :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_identity_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_identity_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/identity', + 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_organization( + self, + body: Optional[CreateOrganizationRequest] = 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, + ) -> CreateOrganization201Response: + """create_organization + + + :param body: + :type body: CreateOrganizationRequest + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateOrganization201Response", + '401': None, + '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_organization_with_http_info( + self, + body: Optional[CreateOrganizationRequest] = 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[CreateOrganization201Response]: + """create_organization + + + :param body: + :type body: CreateOrganizationRequest + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateOrganization201Response", + '401': None, + '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_organization_without_preload_content( + self, + body: Optional[CreateOrganizationRequest] = 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: + """create_organization + + + :param body: + :type body: CreateOrganizationRequest + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateOrganization201Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_organization_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organization', + 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_frontend( + self, + body: Optional[CreateFrontend201Response] = 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, + ) -> None: + """delete_frontend + + + :param body: + :type body: CreateFrontend201Response + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_frontend_with_http_info( + self, + body: Optional[CreateFrontend201Response] = 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[None]: + """delete_frontend + + + :param body: + :type body: CreateFrontend201Response + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_frontend_without_preload_content( + self, + body: Optional[CreateFrontend201Response] = 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: + """delete_frontend + + + :param body: + :type body: CreateFrontend201Response + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_frontend_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/frontend', + 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_organization( + self, + body: Optional[CreateOrganization201Response] = 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, + ) -> None: + """delete_organization + + + :param body: + :type body: CreateOrganization201Response + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_organization_with_http_info( + self, + body: Optional[CreateOrganization201Response] = 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[None]: + """delete_organization + + + :param body: + :type body: CreateOrganization201Response + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_organization_without_preload_content( + self, + body: Optional[CreateOrganization201Response] = 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: + """delete_organization + + + :param body: + :type body: CreateOrganization201Response + :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_organization_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_organization_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/organization', + 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 grants( + self, + body: Optional[Verify200Response] = 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, + ) -> None: + """grants + + + :param body: + :type body: Verify200Response + :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._grants_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 grants_with_http_info( + self, + body: Optional[Verify200Response] = 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[None]: + """grants + + + :param body: + :type body: Verify200Response + :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._grants_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 grants_without_preload_content( + self, + body: Optional[Verify200Response] = 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: + """grants + + + :param body: + :type body: Verify200Response + :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._grants_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/grants', + 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 invite_token_generate( + self, + body: Optional[InviteTokenGenerateRequest] = 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, + ) -> None: + """invite_token_generate + + + :param body: + :type body: InviteTokenGenerateRequest + :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._invite_token_generate_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '401': None, + '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 invite_token_generate_with_http_info( + self, + body: Optional[InviteTokenGenerateRequest] = 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[None]: + """invite_token_generate + + + :param body: + :type body: InviteTokenGenerateRequest + :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._invite_token_generate_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '401': None, + '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 invite_token_generate_without_preload_content( + self, + body: Optional[InviteTokenGenerateRequest] = 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: + """invite_token_generate + + + :param body: + :type body: InviteTokenGenerateRequest + :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._invite_token_generate_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + '400': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _invite_token_generate_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/invite/token/generate', + 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_frontends( + 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, + ) -> List[ListFrontends200ResponseInner]: + """list_frontends + + + :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_frontends_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListFrontends200ResponseInner]", + '401': None, + '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_frontends_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[List[ListFrontends200ResponseInner]]: + """list_frontends + + + :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_frontends_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListFrontends200ResponseInner]", + '401': None, + '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_frontends_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: + """list_frontends + + + :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_frontends_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ListFrontends200ResponseInner]", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_frontends_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/frontends', + 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_organization_members( + self, + body: Optional[CreateOrganization201Response] = 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, + ) -> ListOrganizationMembers200Response: + """list_organization_members + + + :param body: + :type body: CreateOrganization201Response + :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_organization_members_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '401': None, + '404': None, + '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_organization_members_with_http_info( + self, + body: Optional[CreateOrganization201Response] = 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[ListOrganizationMembers200Response]: + """list_organization_members + + + :param body: + :type body: CreateOrganization201Response + :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_organization_members_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '401': None, + '404': None, + '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_organization_members_without_preload_content( + self, + body: Optional[CreateOrganization201Response] = 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_organization_members + + + :param body: + :type body: CreateOrganization201Response + :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_organization_members_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_organization_members_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organization/list', + 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_organizations( + 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, + ) -> ListOrganizations200Response: + """list_organizations + + + :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_organizations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizations200Response", + '401': None, + '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_organizations_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[ListOrganizations200Response]: + """list_organizations + + + :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_organizations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizations200Response", + '401': None, + '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_organizations_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: + """list_organizations + + + :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_organizations_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizations200Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_organizations_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/organizations', + 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 remove_organization_member( + self, + body: Optional[RemoveOrganizationMemberRequest] = 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, + ) -> None: + """remove_organization_member + + + :param body: + :type body: RemoveOrganizationMemberRequest + :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._remove_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 remove_organization_member_with_http_info( + self, + body: Optional[RemoveOrganizationMemberRequest] = 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[None]: + """remove_organization_member + + + :param body: + :type body: RemoveOrganizationMemberRequest + :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._remove_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 remove_organization_member_without_preload_content( + self, + body: Optional[RemoveOrganizationMemberRequest] = 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: + """remove_organization_member + + + :param body: + :type body: RemoveOrganizationMemberRequest + :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._remove_organization_member_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _remove_organization_member_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/organization/remove', + 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_frontend( + self, + body: Optional[UpdateFrontendRequest] = 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, + ) -> None: + """update_frontend + + + :param body: + :type body: UpdateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_frontend_with_http_info( + self, + body: Optional[UpdateFrontendRequest] = 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[None]: + """update_frontend + + + :param body: + :type body: UpdateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_frontend_without_preload_content( + self, + body: Optional[UpdateFrontendRequest] = 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: + """update_frontend + + + :param body: + :type body: UpdateFrontendRequest + :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_frontend_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_frontend_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/frontend', + 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/sdk/python/src/zrok_api/api/environment_api.py b/sdk/python/src/zrok_api/api/environment_api.py new file mode 100644 index 00000000..4495d736 --- /dev/null +++ b/sdk/python/src/zrok_api/api/environment_api.py @@ -0,0 +1,589 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.disable_request import DisableRequest +from zrok_api.models.enable_request import EnableRequest + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class EnvironmentApi: + """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 disable( + self, + body: Optional[DisableRequest] = 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, + ) -> None: + """disable + + + :param body: + :type body: DisableRequest + :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._disable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '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 disable_with_http_info( + self, + body: Optional[DisableRequest] = 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[None]: + """disable + + + :param body: + :type body: DisableRequest + :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._disable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '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 disable_without_preload_content( + self, + body: Optional[DisableRequest] = 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: + """disable + + + :param body: + :type body: DisableRequest + :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._disable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _disable_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/disable', + 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 enable( + self, + body: Optional[EnableRequest] = 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, + ) -> CreateIdentity201Response: + """enable + + + :param body: + :type body: EnableRequest + :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._enable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '404': None, + '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 enable_with_http_info( + self, + body: Optional[EnableRequest] = 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[CreateIdentity201Response]: + """enable + + + :param body: + :type body: EnableRequest + :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._enable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '404': None, + '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 enable_without_preload_content( + self, + body: Optional[EnableRequest] = 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: + """enable + + + :param body: + :type body: EnableRequest + :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._enable_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateIdentity201Response", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _enable_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/enable', + 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/sdk/python/src/zrok_api/api/metadata_api.py b/sdk/python/src/zrok_api/api/metadata_api.py new file mode 100644 index 00000000..ae780e05 --- /dev/null +++ b/sdk/python/src/zrok_api/api/metadata_api.py @@ -0,0 +1,4242 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import List, Optional +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest +from zrok_api.models.configuration import Configuration +from zrok_api.models.environment import Environment +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from zrok_api.models.frontend import Frontend +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest +from zrok_api.models.list_memberships200_response import ListMemberships200Response +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.metrics import Metrics +from zrok_api.models.overview import Overview +from zrok_api.models.share import Share +from zrok_api.models.version_inventory200_response import VersionInventory200Response + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class MetadataApi: + """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 client_version_check( + self, + body: Optional[ClientVersionCheckRequest] = 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, + ) -> None: + """client_version_check + + + :param body: + :type body: ClientVersionCheckRequest + :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._client_version_check_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "str", + } + 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 client_version_check_with_http_info( + self, + body: Optional[ClientVersionCheckRequest] = 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[None]: + """client_version_check + + + :param body: + :type body: ClientVersionCheckRequest + :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._client_version_check_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "str", + } + 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 client_version_check_without_preload_content( + self, + body: Optional[ClientVersionCheckRequest] = 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: + """client_version_check + + + :param body: + :type body: ClientVersionCheckRequest + :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._client_version_check_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _client_version_check_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/clientVersionCheck', + 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 configuration( + 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, + ) -> Configuration: + """configuration + + + :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._configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Configuration", + } + 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 configuration_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[Configuration]: + """configuration + + + :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._configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Configuration", + } + 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 configuration_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: + """configuration + + + :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._configuration_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Configuration", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _configuration_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/configuration', + 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 get_account_detail( + 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, + ) -> List[Environment]: + """get_account_detail + + + :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_account_detail_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Environment]", + '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_account_detail_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[List[Environment]]: + """get_account_detail + + + :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_account_detail_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Environment]", + '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_account_detail_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_account_detail + + + :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_account_detail_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Environment]", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_account_detail_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/account', + 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 get_account_metrics( + self, + 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, + ) -> Metrics: + """get_account_metrics + + + :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._get_account_metrics_serialize( + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '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_account_metrics_with_http_info( + self, + 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[Metrics]: + """get_account_metrics + + + :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._get_account_metrics_serialize( + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '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_account_metrics_without_preload_content( + self, + 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: + """get_account_metrics + + + :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._get_account_metrics_serialize( + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_account_metrics_serialize( + self, + 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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # 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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/metrics/account', + 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 get_environment_detail( + self, + env_zid: StrictStr, + _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, + ) -> EnvironmentAndResources: + """get_environment_detail + + + :param env_zid: (required) + :type env_zid: 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._get_environment_detail_serialize( + env_zid=env_zid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentAndResources", + '401': None, + '404': None, + '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_environment_detail_with_http_info( + self, + env_zid: StrictStr, + _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[EnvironmentAndResources]: + """get_environment_detail + + + :param env_zid: (required) + :type env_zid: 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._get_environment_detail_serialize( + env_zid=env_zid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentAndResources", + '401': None, + '404': None, + '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_environment_detail_without_preload_content( + self, + env_zid: StrictStr, + _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_environment_detail + + + :param env_zid: (required) + :type env_zid: 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._get_environment_detail_serialize( + env_zid=env_zid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnvironmentAndResources", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_environment_detail_serialize( + self, + env_zid, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if env_zid is not None: + _path_params['envZId'] = env_zid + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/environment/{envZId}', + 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 get_environment_metrics( + self, + env_id: StrictStr, + 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, + ) -> Metrics: + """get_environment_metrics + + + :param env_id: (required) + :type env_id: str + :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._get_environment_metrics_serialize( + env_id=env_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': "Metrics", + '400': None, + '401': None, + '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_environment_metrics_with_http_info( + self, + env_id: StrictStr, + 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[Metrics]: + """get_environment_metrics + + + :param env_id: (required) + :type env_id: str + :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._get_environment_metrics_serialize( + env_id=env_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': "Metrics", + '400': None, + '401': None, + '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_environment_metrics_without_preload_content( + self, + env_id: StrictStr, + 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: + """get_environment_metrics + + + :param env_id: (required) + :type env_id: str + :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._get_environment_metrics_serialize( + env_id=env_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': "Metrics", + '400': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_environment_metrics_serialize( + self, + env_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if env_id is not None: + _path_params['envId'] = env_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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/metrics/environment/{envId}', + 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 get_frontend_detail( + self, + frontend_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, + ) -> Frontend: + """get_frontend_detail + + + :param frontend_id: (required) + :type frontend_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._get_frontend_detail_serialize( + frontend_id=frontend_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Frontend", + '401': None, + '404': None, + '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_frontend_detail_with_http_info( + self, + frontend_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[Frontend]: + """get_frontend_detail + + + :param frontend_id: (required) + :type frontend_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._get_frontend_detail_serialize( + frontend_id=frontend_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Frontend", + '401': None, + '404': None, + '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_frontend_detail_without_preload_content( + self, + frontend_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: + """get_frontend_detail + + + :param frontend_id: (required) + :type frontend_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._get_frontend_detail_serialize( + frontend_id=frontend_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Frontend", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_frontend_detail_serialize( + self, + frontend_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if frontend_id is not None: + _path_params['frontendId'] = frontend_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/frontend/{frontendId}', + 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 get_share_detail( + self, + share_token: StrictStr, + _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, + ) -> Share: + """get_share_detail + + + :param share_token: (required) + :type share_token: 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._get_share_detail_serialize( + share_token=share_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Share", + '401': None, + '404': None, + '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_share_detail_with_http_info( + self, + share_token: StrictStr, + _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[Share]: + """get_share_detail + + + :param share_token: (required) + :type share_token: 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._get_share_detail_serialize( + share_token=share_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Share", + '401': None, + '404': None, + '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_share_detail_without_preload_content( + self, + share_token: StrictStr, + _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_share_detail + + + :param share_token: (required) + :type share_token: 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._get_share_detail_serialize( + share_token=share_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Share", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_share_detail_serialize( + self, + share_token, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if share_token is not None: + _path_params['shareToken'] = share_token + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/detail/share/{shareToken}', + 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 get_share_metrics( + self, + share_token: StrictStr, + 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, + ) -> Metrics: + """get_share_metrics + + + :param share_token: (required) + :type share_token: str + :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._get_share_metrics_serialize( + share_token=share_token, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '401': None, + '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_share_metrics_with_http_info( + self, + share_token: StrictStr, + 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[Metrics]: + """get_share_metrics + + + :param share_token: (required) + :type share_token: str + :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._get_share_metrics_serialize( + share_token=share_token, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '401': None, + '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_share_metrics_without_preload_content( + self, + share_token: StrictStr, + 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: + """get_share_metrics + + + :param share_token: (required) + :type share_token: str + :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._get_share_metrics_serialize( + share_token=share_token, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Metrics", + '400': None, + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_share_metrics_serialize( + self, + share_token, + 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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if share_token is not None: + _path_params['shareToken'] = share_token + # 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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/metrics/share/{shareToken}', + 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 get_sparklines( + self, + body: Optional[GetSparklinesRequest] = 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, + ) -> GetSparklines200Response: + """get_sparklines + + + :param body: + :type body: GetSparklinesRequest + :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_sparklines_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSparklines200Response", + '401': None, + '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_sparklines_with_http_info( + self, + body: Optional[GetSparklinesRequest] = 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[GetSparklines200Response]: + """get_sparklines + + + :param body: + :type body: GetSparklinesRequest + :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_sparklines_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSparklines200Response", + '401': None, + '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_sparklines_without_preload_content( + self, + body: Optional[GetSparklinesRequest] = 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: + """get_sparklines + + + :param body: + :type body: GetSparklinesRequest + :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_sparklines_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetSparklines200Response", + '401': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_sparklines_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/sparklines', + 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_memberships( + 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, + ) -> ListMemberships200Response: + """list_memberships + + + :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_memberships_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMemberships200Response", + '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_memberships_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[ListMemberships200Response]: + """list_memberships + + + :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_memberships_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMemberships200Response", + '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_memberships_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: + """list_memberships + + + :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_memberships_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMemberships200Response", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_memberships_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/memberships', + 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_org_members( + self, + organization_token: StrictStr, + _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, + ) -> ListOrganizationMembers200Response: + """list_org_members + + + :param organization_token: (required) + :type organization_token: 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._list_org_members_serialize( + organization_token=organization_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '404': None, + '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_org_members_with_http_info( + self, + organization_token: StrictStr, + _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[ListOrganizationMembers200Response]: + """list_org_members + + + :param organization_token: (required) + :type organization_token: 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._list_org_members_serialize( + organization_token=organization_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '404': None, + '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_org_members_without_preload_content( + self, + organization_token: StrictStr, + _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_org_members + + + :param organization_token: (required) + :type organization_token: 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._list_org_members_serialize( + organization_token=organization_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOrganizationMembers200Response", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_org_members_serialize( + self, + organization_token, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_token is not None: + _path_params['organizationToken'] = organization_token + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/members/{organizationToken}', + 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 org_account_overview( + self, + organization_token: StrictStr, + account_email: StrictStr, + _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, + ) -> Overview: + """org_account_overview + + + :param organization_token: (required) + :type organization_token: str + :param account_email: (required) + :type account_email: 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._org_account_overview_serialize( + organization_token=organization_token, + account_email=account_email, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '404': None, + '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 org_account_overview_with_http_info( + self, + organization_token: StrictStr, + account_email: StrictStr, + _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[Overview]: + """org_account_overview + + + :param organization_token: (required) + :type organization_token: str + :param account_email: (required) + :type account_email: 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._org_account_overview_serialize( + organization_token=organization_token, + account_email=account_email, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '404': None, + '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 org_account_overview_without_preload_content( + self, + organization_token: StrictStr, + account_email: StrictStr, + _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: + """org_account_overview + + + :param organization_token: (required) + :type organization_token: str + :param account_email: (required) + :type account_email: 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._org_account_overview_serialize( + organization_token=organization_token, + account_email=account_email, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _org_account_overview_serialize( + self, + organization_token, + account_email, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_token is not None: + _path_params['organizationToken'] = organization_token + if account_email is not None: + _path_params['accountEmail'] = account_email + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/overview/{organizationToken}/{accountEmail}', + 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 overview( + 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, + ) -> Overview: + """overview + + + :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._overview_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '500': "str", + } + 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 overview_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[Overview]: + """overview + + + :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._overview_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '500': "str", + } + 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 overview_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: + """overview + + + :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._overview_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Overview", + '500': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _overview_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/overview', + 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 version( + 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, + ) -> str: + """version + + + :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._version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + 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 version_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[str]: + """version + + + :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._version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + 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 version_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: + """version + + + :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._version_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _version_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/version', + 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 version_inventory( + 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, + ) -> VersionInventory200Response: + """version_inventory + + + :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._version_inventory_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionInventory200Response", + } + 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 version_inventory_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[VersionInventory200Response]: + """version_inventory + + + :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._version_inventory_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionInventory200Response", + } + 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 version_inventory_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: + """version_inventory + + + :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._version_inventory_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionInventory200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _version_inventory_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/versions', + 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/sdk/python/src/zrok_api/api/share_api.py b/sdk/python/src/zrok_api/api/share_api.py new file mode 100644 index 00000000..626035ee --- /dev/null +++ b/sdk/python/src/zrok_api/api/share_api.py @@ -0,0 +1,1712 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.share_response import ShareResponse +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.models.unshare_request import UnshareRequest +from zrok_api.models.update_access_request import UpdateAccessRequest +from zrok_api.models.update_share_request import UpdateShareRequest + +from zrok_api.api_client import ApiClient, RequestSerialized +from zrok_api.api_response import ApiResponse +from zrok_api.rest import RESTResponseType + + +class ShareApi: + """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 access( + self, + body: Optional[AccessRequest] = 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, + ) -> Access201Response: + """access + + + :param body: + :type body: AccessRequest + :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._access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Access201Response", + '401': None, + '404': None, + '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 access_with_http_info( + self, + body: Optional[AccessRequest] = 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[Access201Response]: + """access + + + :param body: + :type body: AccessRequest + :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._access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Access201Response", + '401': None, + '404': None, + '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 access_without_preload_content( + self, + body: Optional[AccessRequest] = 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: + """access + + + :param body: + :type body: AccessRequest + :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._access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Access201Response", + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _access_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/access', + 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 share( + self, + body: Optional[ShareRequest] = 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, + ) -> ShareResponse: + """share + + + :param body: + :type body: ShareRequest + :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._share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareResponse", + '401': None, + '404': None, + '409': None, + '422': None, + '500': "str", + } + 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 share_with_http_info( + self, + body: Optional[ShareRequest] = 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[ShareResponse]: + """share + + + :param body: + :type body: ShareRequest + :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._share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareResponse", + '401': None, + '404': None, + '409': None, + '422': None, + '500': "str", + } + 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 share_without_preload_content( + self, + body: Optional[ShareRequest] = 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: + """share + + + :param body: + :type body: ShareRequest + :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._share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareResponse", + '401': None, + '404': None, + '409': None, + '422': None, + '500': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _share_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/share', + 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 unaccess( + self, + body: Optional[UnaccessRequest] = 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, + ) -> None: + """unaccess + + + :param body: + :type body: UnaccessRequest + :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._unaccess_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 unaccess_with_http_info( + self, + body: Optional[UnaccessRequest] = 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[None]: + """unaccess + + + :param body: + :type body: UnaccessRequest + :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._unaccess_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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 unaccess_without_preload_content( + self, + body: Optional[UnaccessRequest] = 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: + """unaccess + + + :param body: + :type body: UnaccessRequest + :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._unaccess_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unaccess_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/unaccess', + 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 unshare( + self, + body: Optional[UnshareRequest] = 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, + ) -> None: + """unshare + + + :param body: + :type body: UnshareRequest + :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._unshare_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': "str", + } + 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 unshare_with_http_info( + self, + body: Optional[UnshareRequest] = 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[None]: + """unshare + + + :param body: + :type body: UnshareRequest + :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._unshare_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': "str", + } + 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 unshare_without_preload_content( + self, + body: Optional[UnshareRequest] = 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: + """unshare + + + :param body: + :type body: UnshareRequest + :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._unshare_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unshare_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/zrok.v1+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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/unshare', + 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_access( + self, + body: Optional[UpdateAccessRequest] = 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, + ) -> None: + """update_access + + + :param body: + :type body: UpdateAccessRequest + :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_access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_access_with_http_info( + self, + body: Optional[UpdateAccessRequest] = 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[None]: + """update_access + + + :param body: + :type body: UpdateAccessRequest + :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_access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '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_access_without_preload_content( + self, + body: Optional[UpdateAccessRequest] = 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: + """update_access + + + :param body: + :type body: UpdateAccessRequest + :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_access_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_access_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/access', + 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_share( + self, + body: Optional[UpdateShareRequest] = 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, + ) -> None: + """update_share + + + :param body: + :type body: UpdateShareRequest + :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_share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '404': None, + '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_share_with_http_info( + self, + body: Optional[UpdateShareRequest] = 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[None]: + """update_share + + + :param body: + :type body: UpdateShareRequest + :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_share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '404': None, + '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_share_without_preload_content( + self, + body: Optional[UpdateShareRequest] = 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: + """update_share + + + :param body: + :type body: UpdateShareRequest + :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_share_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': None, + '401': None, + '404': None, + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_share_serialize( + self, + body, + _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _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 body is not None: + _body_params = body + + + + # 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/zrok.v1+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'key' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/share', + 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/sdk/python/src/zrok_api/api_client.py b/sdk/python/src/zrok_api/api_client.py new file mode 100644 index 00000000..7b417812 --- /dev/null +++ b/sdk/python/src/zrok_api/api_client.py @@ -0,0 +1,797 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from zrok_api.configuration import Configuration +from zrok_api.api_response import ApiResponse, T as ApiResponseT +import zrok_api.models +from zrok_api import rest +from zrok_api.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(zrok_api.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __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. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/sdk/python/src/zrok_api/api_response.py b/sdk/python/src/zrok_api/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/sdk/python/src/zrok_api/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/sdk/python/src/zrok_api/configuration.py b/sdk/python/src/zrok_api/configuration.py new file mode 100644 index 00000000..d504babc --- /dev/null +++ b/sdk/python/src/zrok_api/configuration.py @@ -0,0 +1,602 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import http.client as httplib +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + +import urllib3 + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "key": APIKeyAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = zrok_api.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 + """ + + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + *, + debug: Optional[bool] = None, + ) -> None: + """Constructor + """ + self._base_path = "/api/v1" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("zrok_api") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = retries + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default: Optional[Self]) -> None: + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = cls() + return cls._default + + @property + def logger_file(self) -> Optional[str]: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value: Optional[str]) -> None: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self) -> bool: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value: bool) -> None: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self) -> str: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value: str) -> None: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + return None + + def get_basic_auth_token(self) -> Optional[str]: + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self)-> AuthSettings: + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth: AuthSettings = {} + if 'key' in self.api_key: + auth['key'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'x-token', + 'value': self.get_api_key_with_prefix( + 'key', + ), + } + return auth + + def to_debug_report(self) -> str: + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self) -> List[HostSetting]: + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "/api/v1", + 'description': "No description provided", + } + ] + + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self) -> str: + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value: str) -> None: + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/sdk/python/src/zrok_api/exceptions.py b/sdk/python/src/zrok_api/exceptions.py new file mode 100644 index 00000000..1b37d862 --- /dev/null +++ b/sdk/python/src/zrok_api/exceptions.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/sdk/python/src/zrok_api/models/__init__.py b/sdk/python/src/zrok_api/models/__init__.py new file mode 100644 index 00000000..c4f5e3c4 --- /dev/null +++ b/sdk/python/src/zrok_api/models/__init__.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +# flake8: noqa +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from zrok_api.models.access201_response import Access201Response +from zrok_api.models.access_request import AccessRequest +from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest +from zrok_api.models.auth_user import AuthUser +from zrok_api.models.change_password_request import ChangePasswordRequest +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest +from zrok_api.models.configuration import Configuration +from zrok_api.models.create_frontend201_response import CreateFrontend201Response +from zrok_api.models.create_frontend_request import CreateFrontendRequest +from zrok_api.models.create_identity201_response import CreateIdentity201Response +from zrok_api.models.create_identity_request import CreateIdentityRequest +from zrok_api.models.create_organization201_response import CreateOrganization201Response +from zrok_api.models.create_organization_request import CreateOrganizationRequest +from zrok_api.models.disable_request import DisableRequest +from zrok_api.models.enable_request import EnableRequest +from zrok_api.models.environment import Environment +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from zrok_api.models.frontend import Frontend +from zrok_api.models.get_sparklines200_response import GetSparklines200Response +from zrok_api.models.get_sparklines_request import GetSparklinesRequest +from zrok_api.models.invite_request import InviteRequest +from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.models.list_memberships200_response import ListMemberships200Response +from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner +from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response +from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner +from zrok_api.models.list_organizations200_response import ListOrganizations200Response +from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner +from zrok_api.models.login_request import LoginRequest +from zrok_api.models.metrics import Metrics +from zrok_api.models.metrics_sample import MetricsSample +from zrok_api.models.overview import Overview +from zrok_api.models.principal import Principal +from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response +from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest +from zrok_api.models.register_request import RegisterRequest +from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest +from zrok_api.models.reset_password_request import ResetPasswordRequest +from zrok_api.models.share import Share +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.share_response import ShareResponse +from zrok_api.models.spark_data_sample import SparkDataSample +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.models.unshare_request import UnshareRequest +from zrok_api.models.update_access_request import UpdateAccessRequest +from zrok_api.models.update_frontend_request import UpdateFrontendRequest +from zrok_api.models.update_share_request import UpdateShareRequest +from zrok_api.models.verify200_response import Verify200Response +from zrok_api.models.verify_request import VerifyRequest +from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/src/zrok_api/models/access201_response.py b/sdk/python/src/zrok_api/models/access201_response.py new file mode 100644 index 00000000..6058082c --- /dev/null +++ b/sdk/python/src/zrok_api/models/access201_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Access201Response(BaseModel): + """ + Access201Response + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + __properties: ClassVar[List[str]] = ["frontendToken", "backendMode"] + + 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 Access201Response 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 Access201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "backendMode": obj.get("backendMode") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/access_request.py b/sdk/python/src/zrok_api/models/access_request.py new file mode 100644 index 00000000..18eb9837 --- /dev/null +++ b/sdk/python/src/zrok_api/models/access_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AccessRequest(BaseModel): + """ + AccessRequest + """ # noqa: E501 + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["envZId", "shareToken", "bindAddress", "description"] + + 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 AccessRequest 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 AccessRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "envZId": obj.get("envZId"), + "shareToken": obj.get("shareToken"), + "bindAddress": obj.get("bindAddress"), + "description": obj.get("description") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/add_organization_member_request.py b/sdk/python/src/zrok_api/models/add_organization_member_request.py new file mode 100644 index 00000000..d6db9e38 --- /dev/null +++ b/sdk/python/src/zrok_api/models/add_organization_member_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class AddOrganizationMemberRequest(BaseModel): + """ + AddOrganizationMemberRequest + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + email: Optional[StrictStr] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["organizationToken", "email", "admin"] + + 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 AddOrganizationMemberRequest 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 AddOrganizationMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "email": obj.get("email"), + "admin": obj.get("admin") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/auth_user.py b/sdk/python/src/zrok_api/models/auth_user.py new file mode 100644 index 00000000..b8e1718d --- /dev/null +++ b/sdk/python/src/zrok_api/models/auth_user.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 AuthUser(BaseModel): + """ + AuthUser + """ # noqa: E501 + username: Optional[StrictStr] = None + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["username", "password"] + + 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 AuthUser 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 AuthUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/change_password_request.py b/sdk/python/src/zrok_api/models/change_password_request.py new file mode 100644 index 00000000..dcbdafb3 --- /dev/null +++ b/sdk/python/src/zrok_api/models/change_password_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ChangePasswordRequest(BaseModel): + """ + ChangePasswordRequest + """ # noqa: E501 + email: Optional[StrictStr] = None + old_password: Optional[StrictStr] = Field(default=None, alias="oldPassword") + new_password: Optional[StrictStr] = Field(default=None, alias="newPassword") + __properties: ClassVar[List[str]] = ["email", "oldPassword", "newPassword"] + + 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 ChangePasswordRequest 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 ChangePasswordRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "oldPassword": obj.get("oldPassword"), + "newPassword": obj.get("newPassword") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/client_version_check_request.py b/sdk/python/src/zrok_api/models/client_version_check_request.py new file mode 100644 index 00000000..813e57ac --- /dev/null +++ b/sdk/python/src/zrok_api/models/client_version_check_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClientVersionCheckRequest(BaseModel): + """ + ClientVersionCheckRequest + """ # noqa: E501 + client_version: Optional[StrictStr] = Field(default=None, alias="clientVersion") + __properties: ClassVar[List[str]] = ["clientVersion"] + + 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 ClientVersionCheckRequest 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 ClientVersionCheckRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clientVersion": obj.get("clientVersion") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/configuration.py b/sdk/python/src/zrok_api/models/configuration.py new file mode 100644 index 00000000..ed5ece38 --- /dev/null +++ b/sdk/python/src/zrok_api/models/configuration.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class Configuration(BaseModel): + """ + Configuration + """ # noqa: E501 + version: Optional[StrictStr] = None + tou_link: Optional[StrictStr] = Field(default=None, alias="touLink") + invites_open: Optional[StrictBool] = Field(default=None, alias="invitesOpen") + requires_invite_token: Optional[StrictBool] = Field(default=None, alias="requiresInviteToken") + invite_token_contact: Optional[StrictStr] = Field(default=None, alias="inviteTokenContact") + __properties: ClassVar[List[str]] = ["version", "touLink", "invitesOpen", "requiresInviteToken", "inviteTokenContact"] + + 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 Configuration 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 Configuration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version"), + "touLink": obj.get("touLink"), + "invitesOpen": obj.get("invitesOpen"), + "requiresInviteToken": obj.get("requiresInviteToken"), + "inviteTokenContact": obj.get("inviteTokenContact") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/create_frontend201_response.py b/sdk/python/src/zrok_api/models/create_frontend201_response.py new file mode 100644 index 00000000..61fc364c --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_frontend201_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateFrontend201Response(BaseModel): + """ + CreateFrontend201Response + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + __properties: ClassVar[List[str]] = ["frontendToken"] + + 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 CreateFrontend201Response 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 CreateFrontend201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/create_frontend_request.py b/sdk/python/src/zrok_api/models/create_frontend_request.py new file mode 100644 index 00000000..5f7072e8 --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_frontend_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateFrontendRequest(BaseModel): + """ + CreateFrontendRequest + """ # noqa: E501 + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + url_template: Optional[StrictStr] = None + public_name: Optional[StrictStr] = None + permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") + __properties: ClassVar[List[str]] = ["zId", "url_template", "public_name", "permissionMode"] + + @field_validator('permission_mode') + def permission_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['open', 'closed']): + raise ValueError("must be one of enum values ('open', 'closed')") + return value + + 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 CreateFrontendRequest 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 CreateFrontendRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "zId": obj.get("zId"), + "url_template": obj.get("url_template"), + "public_name": obj.get("public_name"), + "permissionMode": obj.get("permissionMode") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/create_identity201_response.py b/sdk/python/src/zrok_api/models/create_identity201_response.py new file mode 100644 index 00000000..f2811bbf --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_identity201_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 CreateIdentity201Response(BaseModel): + """ + CreateIdentity201Response + """ # noqa: E501 + identity: Optional[StrictStr] = None + cfg: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["identity", "cfg"] + + 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 CreateIdentity201Response 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 CreateIdentity201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identity": obj.get("identity"), + "cfg": obj.get("cfg") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/create_identity_request.py b/sdk/python/src/zrok_api/models/create_identity_request.py new file mode 100644 index 00000000..9f21d0a8 --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_identity_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 CreateIdentityRequest(BaseModel): + """ + CreateIdentityRequest + """ # noqa: E501 + name: Optional[StrictStr] = None + __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 CreateIdentityRequest 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 CreateIdentityRequest 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/sdk/python/src/zrok_api/models/create_organization201_response.py b/sdk/python/src/zrok_api/models/create_organization201_response.py new file mode 100644 index 00000000..431bf57a --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_organization201_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateOrganization201Response(BaseModel): + """ + CreateOrganization201Response + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + __properties: ClassVar[List[str]] = ["organizationToken"] + + 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 CreateOrganization201Response 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 CreateOrganization201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/create_organization_request.py b/sdk/python/src/zrok_api/models/create_organization_request.py new file mode 100644 index 00000000..de5d6572 --- /dev/null +++ b/sdk/python/src/zrok_api/models/create_organization_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 CreateOrganizationRequest(BaseModel): + """ + CreateOrganizationRequest + """ # noqa: E501 + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["description"] + + 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 CreateOrganizationRequest 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 CreateOrganizationRequest 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") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/disable_request.py b/sdk/python/src/zrok_api/models/disable_request.py new file mode 100644 index 00000000..a6c30a01 --- /dev/null +++ b/sdk/python/src/zrok_api/models/disable_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 DisableRequest(BaseModel): + """ + DisableRequest + """ # noqa: E501 + identity: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["identity"] + + 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 DisableRequest 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 DisableRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "identity": obj.get("identity") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/enable_request.py b/sdk/python/src/zrok_api/models/enable_request.py new file mode 100644 index 00000000..ad54886c --- /dev/null +++ b/sdk/python/src/zrok_api/models/enable_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 EnableRequest(BaseModel): + """ + EnableRequest + """ # noqa: E501 + description: Optional[StrictStr] = None + host: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["description", "host"] + + 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 EnableRequest 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 EnableRequest 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"), + "host": obj.get("host") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/environment.py b/sdk/python/src/zrok_api/models/environment.py new file mode 100644 index 00000000..063ff59e --- /dev/null +++ b/sdk/python/src/zrok_api/models/environment.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.spark_data_sample import SparkDataSample +from typing import Optional, Set +from typing_extensions import Self + +class Environment(BaseModel): + """ + Environment + """ # noqa: E501 + description: Optional[StrictStr] = None + host: Optional[StrictStr] = None + address: Optional[StrictStr] = None + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + activity: Optional[List[SparkDataSample]] = None + limited: Optional[StrictBool] = None + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["description", "host", "address", "zId", "activity", "limited", "createdAt", "updatedAt"] + + 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 Environment 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 activity (list) + _items = [] + if self.activity: + for _item_activity in self.activity: + if _item_activity: + _items.append(_item_activity.to_dict()) + _dict['activity'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Environment 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"), + "host": obj.get("host"), + "address": obj.get("address"), + "zId": obj.get("zId"), + "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, + "limited": obj.get("limited"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/environment_and_resources.py b/sdk/python/src/zrok_api/models/environment_and_resources.py new file mode 100644 index 00000000..65e4f257 --- /dev/null +++ b/sdk/python/src/zrok_api/models/environment_and_resources.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.environment import Environment +from zrok_api.models.frontend import Frontend +from zrok_api.models.share import Share +from typing import Optional, Set +from typing_extensions import Self + +class EnvironmentAndResources(BaseModel): + """ + EnvironmentAndResources + """ # noqa: E501 + environment: Optional[Environment] = None + frontends: Optional[List[Frontend]] = None + shares: Optional[List[Share]] = None + __properties: ClassVar[List[str]] = ["environment", "frontends", "shares"] + + 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 EnvironmentAndResources 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 frontends (list) + _items = [] + if self.frontends: + for _item_frontends in self.frontends: + if _item_frontends: + _items.append(_item_frontends.to_dict()) + _dict['frontends'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shares (list) + _items = [] + if self.shares: + for _item_shares in self.shares: + if _item_shares: + _items.append(_item_shares.to_dict()) + _dict['shares'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnvironmentAndResources from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "environment": Environment.from_dict(obj["environment"]) if obj.get("environment") is not None else None, + "frontends": [Frontend.from_dict(_item) for _item in obj["frontends"]] if obj.get("frontends") is not None else None, + "shares": [Share.from_dict(_item) for _item in obj["shares"]] if obj.get("shares") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/frontend.py b/sdk/python/src/zrok_api/models/frontend.py new file mode 100644 index 00000000..ae3c4c5d --- /dev/null +++ b/sdk/python/src/zrok_api/models/frontend.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Frontend(BaseModel): + """ + Frontend + """ # noqa: E501 + id: Optional[StrictInt] = None + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") + description: Optional[StrictStr] = None + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["id", "frontendToken", "shareToken", "backendMode", "bindAddress", "description", "zId", "createdAt", "updatedAt"] + + 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 Frontend 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 Frontend 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"), + "frontendToken": obj.get("frontendToken"), + "shareToken": obj.get("shareToken"), + "backendMode": obj.get("backendMode"), + "bindAddress": obj.get("bindAddress"), + "description": obj.get("description"), + "zId": obj.get("zId"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/get_sparklines200_response.py b/sdk/python/src/zrok_api/models/get_sparklines200_response.py new file mode 100644 index 00000000..177b0efa --- /dev/null +++ b/sdk/python/src/zrok_api/models/get_sparklines200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics import Metrics +from typing import Optional, Set +from typing_extensions import Self + +class GetSparklines200Response(BaseModel): + """ + GetSparklines200Response + """ # noqa: E501 + sparklines: Optional[List[Metrics]] = None + __properties: ClassVar[List[str]] = ["sparklines"] + + 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 GetSparklines200Response 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 sparklines (list) + _items = [] + if self.sparklines: + for _item_sparklines in self.sparklines: + if _item_sparklines: + _items.append(_item_sparklines.to_dict()) + _dict['sparklines'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetSparklines200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sparklines": [Metrics.from_dict(_item) for _item in obj["sparklines"]] if obj.get("sparklines") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/get_sparklines_request.py b/sdk/python/src/zrok_api/models/get_sparklines_request.py new file mode 100644 index 00000000..d9bef43d --- /dev/null +++ b/sdk/python/src/zrok_api/models/get_sparklines_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 GetSparklinesRequest(BaseModel): + """ + GetSparklinesRequest + """ # noqa: E501 + account: Optional[StrictBool] = None + environments: Optional[List[StrictStr]] = None + shares: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["account", "environments", "shares"] + + 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 GetSparklinesRequest 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 GetSparklinesRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "account": obj.get("account"), + "environments": obj.get("environments"), + "shares": obj.get("shares") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/invite_request.py b/sdk/python/src/zrok_api/models/invite_request.py new file mode 100644 index 00000000..1c5bcc76 --- /dev/null +++ b/sdk/python/src/zrok_api/models/invite_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InviteRequest(BaseModel): + """ + InviteRequest + """ # noqa: E501 + email: Optional[StrictStr] = None + invite_token: Optional[StrictStr] = Field(default=None, alias="inviteToken") + __properties: ClassVar[List[str]] = ["email", "inviteToken"] + + 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 InviteRequest 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 InviteRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "inviteToken": obj.get("inviteToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/invite_token_generate_request.py b/sdk/python/src/zrok_api/models/invite_token_generate_request.py new file mode 100644 index 00000000..dd876de6 --- /dev/null +++ b/sdk/python/src/zrok_api/models/invite_token_generate_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InviteTokenGenerateRequest(BaseModel): + """ + InviteTokenGenerateRequest + """ # noqa: E501 + invite_tokens: Optional[List[StrictStr]] = Field(default=None, alias="inviteTokens") + __properties: ClassVar[List[str]] = ["inviteTokens"] + + 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 InviteTokenGenerateRequest 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 InviteTokenGenerateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inviteTokens": obj.get("inviteTokens") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py b/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py new file mode 100644 index 00000000..ff9d1bb4 --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ListFrontends200ResponseInner(BaseModel): + """ + ListFrontends200ResponseInner + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + public_name: Optional[StrictStr] = Field(default=None, alias="publicName") + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["frontendToken", "zId", "urlTemplate", "publicName", "createdAt", "updatedAt"] + + 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 ListFrontends200ResponseInner 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 ListFrontends200ResponseInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "zId": obj.get("zId"), + "urlTemplate": obj.get("urlTemplate"), + "publicName": obj.get("publicName"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_memberships200_response.py b/sdk/python/src/zrok_api/models/list_memberships200_response.py new file mode 100644 index 00000000..f3db8fa7 --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_memberships200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner +from typing import Optional, Set +from typing_extensions import Self + +class ListMemberships200Response(BaseModel): + """ + ListMemberships200Response + """ # noqa: E501 + memberships: Optional[List[ListMemberships200ResponseMembershipsInner]] = None + __properties: ClassVar[List[str]] = ["memberships"] + + 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 ListMemberships200Response 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 memberships (list) + _items = [] + if self.memberships: + for _item_memberships in self.memberships: + if _item_memberships: + _items.append(_item_memberships.to_dict()) + _dict['memberships'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListMemberships200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "memberships": [ListMemberships200ResponseMembershipsInner.from_dict(_item) for _item in obj["memberships"]] if obj.get("memberships") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py b/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py new file mode 100644 index 00000000..e39b07b8 --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class ListMemberships200ResponseMembershipsInner(BaseModel): + """ + ListMemberships200ResponseMembershipsInner + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + description: Optional[StrictStr] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["organizationToken", "description", "admin"] + + 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 ListMemberships200ResponseMembershipsInner 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 ListMemberships200ResponseMembershipsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "description": obj.get("description"), + "admin": obj.get("admin") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_organization_members200_response.py b/sdk/python/src/zrok_api/models/list_organization_members200_response.py new file mode 100644 index 00000000..6058124c --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_organization_members200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner +from typing import Optional, Set +from typing_extensions import Self + +class ListOrganizationMembers200Response(BaseModel): + """ + ListOrganizationMembers200Response + """ # noqa: E501 + members: Optional[List[ListOrganizationMembers200ResponseMembersInner]] = None + __properties: ClassVar[List[str]] = ["members"] + + 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 ListOrganizationMembers200Response 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 members (list) + _items = [] + if self.members: + for _item_members in self.members: + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListOrganizationMembers200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "members": [ListOrganizationMembers200ResponseMembersInner.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py b/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py new file mode 100644 index 00000000..0266e878 --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 ListOrganizationMembers200ResponseMembersInner(BaseModel): + """ + ListOrganizationMembers200ResponseMembersInner + """ # noqa: E501 + email: Optional[StrictStr] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["email", "admin"] + + 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 ListOrganizationMembers200ResponseMembersInner 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 ListOrganizationMembers200ResponseMembersInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "admin": obj.get("admin") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_organizations200_response.py b/sdk/python/src/zrok_api/models/list_organizations200_response.py new file mode 100644 index 00000000..03fe63da --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_organizations200_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner +from typing import Optional, Set +from typing_extensions import Self + +class ListOrganizations200Response(BaseModel): + """ + ListOrganizations200Response + """ # noqa: E501 + organizations: Optional[List[ListOrganizations200ResponseOrganizationsInner]] = None + __properties: ClassVar[List[str]] = ["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 ListOrganizations200Response 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_organizations in self.organizations: + if _item_organizations: + _items.append(_item_organizations.to_dict()) + _dict['organizations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListOrganizations200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizations": [ListOrganizations200ResponseOrganizationsInner.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py b/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py new file mode 100644 index 00000000..463e142a --- /dev/null +++ b/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ListOrganizations200ResponseOrganizationsInner(BaseModel): + """ + ListOrganizations200ResponseOrganizationsInner + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["organizationToken", "description"] + + 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 ListOrganizations200ResponseOrganizationsInner 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 ListOrganizations200ResponseOrganizationsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "description": obj.get("description") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/login_request.py b/sdk/python/src/zrok_api/models/login_request.py new file mode 100644 index 00000000..6ef640ea --- /dev/null +++ b/sdk/python/src/zrok_api/models/login_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 LoginRequest(BaseModel): + """ + LoginRequest + """ # noqa: E501 + email: Optional[StrictStr] = None + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["email", "password"] + + 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 LoginRequest 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 LoginRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "password": obj.get("password") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/metrics.py b/sdk/python/src/zrok_api/models/metrics.py new file mode 100644 index 00000000..40db696c --- /dev/null +++ b/sdk/python/src/zrok_api/models/metrics.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics_sample import MetricsSample +from typing import Optional, Set +from typing_extensions import Self + +class Metrics(BaseModel): + """ + Metrics + """ # noqa: E501 + scope: Optional[StrictStr] = None + id: Optional[StrictStr] = None + period: Optional[Union[StrictFloat, StrictInt]] = None + samples: Optional[List[MetricsSample]] = None + __properties: ClassVar[List[str]] = ["scope", "id", "period", "samples"] + + 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 Metrics 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 samples (list) + _items = [] + if self.samples: + for _item_samples in self.samples: + if _item_samples: + _items.append(_item_samples.to_dict()) + _dict['samples'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Metrics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope": obj.get("scope"), + "id": obj.get("id"), + "period": obj.get("period"), + "samples": [MetricsSample.from_dict(_item) for _item in obj["samples"]] if obj.get("samples") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/metrics_sample.py b/sdk/python/src/zrok_api/models/metrics_sample.py new file mode 100644 index 00000000..678d0c1e --- /dev/null +++ b/sdk/python/src/zrok_api/models/metrics_sample.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class MetricsSample(BaseModel): + """ + MetricsSample + """ # noqa: E501 + rx: Optional[Union[StrictFloat, StrictInt]] = None + tx: Optional[Union[StrictFloat, StrictInt]] = None + timestamp: Optional[Union[StrictFloat, StrictInt]] = None + __properties: ClassVar[List[str]] = ["rx", "tx", "timestamp"] + + 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 MetricsSample 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 MetricsSample from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rx": obj.get("rx"), + "tx": obj.get("tx"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/overview.py b/sdk/python/src/zrok_api/models/overview.py new file mode 100644 index 00000000..2feb65cc --- /dev/null +++ b/sdk/python/src/zrok_api/models/overview.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from typing import Optional, Set +from typing_extensions import Self + +class Overview(BaseModel): + """ + Overview + """ # noqa: E501 + account_limited: Optional[StrictBool] = Field(default=None, alias="accountLimited") + environments: Optional[List[EnvironmentAndResources]] = None + __properties: ClassVar[List[str]] = ["accountLimited", "environments"] + + 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 Overview 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 environments (list) + _items = [] + if self.environments: + for _item_environments in self.environments: + if _item_environments: + _items.append(_item_environments.to_dict()) + _dict['environments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Overview from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountLimited": obj.get("accountLimited"), + "environments": [EnvironmentAndResources.from_dict(_item) for _item in obj["environments"]] if obj.get("environments") is not None else None + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/principal.py b/sdk/python/src/zrok_api/models/principal.py new file mode 100644 index 00000000..6ff9f756 --- /dev/null +++ b/sdk/python/src/zrok_api/models/principal.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 Principal(BaseModel): + """ + Principal + """ # noqa: E501 + id: Optional[StrictInt] = None + email: Optional[StrictStr] = None + token: Optional[StrictStr] = None + limitless: Optional[StrictBool] = None + admin: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "email", "token", "limitless", "admin"] + + 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 Principal 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 Principal 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"), + "email": obj.get("email"), + "token": obj.get("token"), + "limitless": obj.get("limitless"), + "admin": obj.get("admin") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py b/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py new file mode 100644 index 00000000..ccaf7ff4 --- /dev/null +++ b/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RegenerateAccountToken200Response(BaseModel): + """ + RegenerateAccountToken200Response + """ # noqa: E501 + account_token: Optional[StrictStr] = Field(default=None, alias="accountToken") + __properties: ClassVar[List[str]] = ["accountToken"] + + 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 RegenerateAccountToken200Response 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 RegenerateAccountToken200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountToken": obj.get("accountToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/regenerate_account_token_request.py b/sdk/python/src/zrok_api/models/regenerate_account_token_request.py new file mode 100644 index 00000000..32f2029f --- /dev/null +++ b/sdk/python/src/zrok_api/models/regenerate_account_token_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RegenerateAccountTokenRequest(BaseModel): + """ + RegenerateAccountTokenRequest + """ # noqa: E501 + email_address: Optional[StrictStr] = Field(default=None, alias="emailAddress") + __properties: ClassVar[List[str]] = ["emailAddress"] + + 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 RegenerateAccountTokenRequest 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 RegenerateAccountTokenRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "emailAddress": obj.get("emailAddress") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/register_request.py b/sdk/python/src/zrok_api/models/register_request.py new file mode 100644 index 00000000..f2bf90bd --- /dev/null +++ b/sdk/python/src/zrok_api/models/register_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RegisterRequest(BaseModel): + """ + RegisterRequest + """ # noqa: E501 + register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["registerToken", "password"] + + 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 RegisterRequest 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 RegisterRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "registerToken": obj.get("registerToken"), + "password": obj.get("password") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/remove_organization_member_request.py b/sdk/python/src/zrok_api/models/remove_organization_member_request.py new file mode 100644 index 00000000..28b6bd25 --- /dev/null +++ b/sdk/python/src/zrok_api/models/remove_organization_member_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RemoveOrganizationMemberRequest(BaseModel): + """ + RemoveOrganizationMemberRequest + """ # noqa: E501 + organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") + email: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["organizationToken", "email"] + + 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 RemoveOrganizationMemberRequest 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 RemoveOrganizationMemberRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationToken": obj.get("organizationToken"), + "email": obj.get("email") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/reset_password_request.py b/sdk/python/src/zrok_api/models/reset_password_request.py new file mode 100644 index 00000000..a81c4bd3 --- /dev/null +++ b/sdk/python/src/zrok_api/models/reset_password_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ResetPasswordRequest(BaseModel): + """ + ResetPasswordRequest + """ # noqa: E501 + reset_token: Optional[StrictStr] = Field(default=None, alias="resetToken") + password: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["resetToken", "password"] + + 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 ResetPasswordRequest 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 ResetPasswordRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resetToken": obj.get("resetToken"), + "password": obj.get("password") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/share.py b/sdk/python/src/zrok_api/models/share.py new file mode 100644 index 00000000..aaf72fb8 --- /dev/null +++ b/sdk/python/src/zrok_api/models/share.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.spark_data_sample import SparkDataSample +from typing import Optional, Set +from typing_extensions import Self + +class Share(BaseModel): + """ + Share + """ # noqa: E501 + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + z_id: Optional[StrictStr] = Field(default=None, alias="zId") + share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + frontend_selection: Optional[StrictStr] = Field(default=None, alias="frontendSelection") + frontend_endpoint: Optional[StrictStr] = Field(default=None, alias="frontendEndpoint") + backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") + reserved: Optional[StrictBool] = None + activity: Optional[List[SparkDataSample]] = None + limited: Optional[StrictBool] = None + created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") + updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") + __properties: ClassVar[List[str]] = ["shareToken", "zId", "shareMode", "backendMode", "frontendSelection", "frontendEndpoint", "backendProxyEndpoint", "reserved", "activity", "limited", "createdAt", "updatedAt"] + + 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 Share 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 activity (list) + _items = [] + if self.activity: + for _item_activity in self.activity: + if _item_activity: + _items.append(_item_activity.to_dict()) + _dict['activity'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Share from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "shareToken": obj.get("shareToken"), + "zId": obj.get("zId"), + "shareMode": obj.get("shareMode"), + "backendMode": obj.get("backendMode"), + "frontendSelection": obj.get("frontendSelection"), + "frontendEndpoint": obj.get("frontendEndpoint"), + "backendProxyEndpoint": obj.get("backendProxyEndpoint"), + "reserved": obj.get("reserved"), + "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, + "limited": obj.get("limited"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/share_request.py b/sdk/python/src/zrok_api/models/share_request.py new file mode 100644 index 00000000..7ea8d828 --- /dev/null +++ b/sdk/python/src/zrok_api/models/share_request.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zrok_api.models.auth_user import AuthUser +from typing import Optional, Set +from typing_extensions import Self + +class ShareRequest(BaseModel): + """ + ShareRequest + """ # noqa: E501 + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") + frontend_selection: Optional[List[StrictStr]] = Field(default=None, alias="frontendSelection") + backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") + backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") + auth_scheme: Optional[StrictStr] = Field(default=None, alias="authScheme") + auth_users: Optional[List[AuthUser]] = Field(default=None, alias="authUsers") + oauth_provider: Optional[StrictStr] = Field(default=None, alias="oauthProvider") + oauth_email_domains: Optional[List[StrictStr]] = Field(default=None, alias="oauthEmailDomains") + oauth_authorization_check_interval: Optional[StrictStr] = Field(default=None, alias="oauthAuthorizationCheckInterval") + reserved: Optional[StrictBool] = None + permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") + access_grants: Optional[List[StrictStr]] = Field(default=None, alias="accessGrants") + unique_name: Optional[StrictStr] = Field(default=None, alias="uniqueName") + __properties: ClassVar[List[str]] = ["envZId", "shareMode", "frontendSelection", "backendMode", "backendProxyEndpoint", "authScheme", "authUsers", "oauthProvider", "oauthEmailDomains", "oauthAuthorizationCheckInterval", "reserved", "permissionMode", "accessGrants", "uniqueName"] + + @field_validator('share_mode') + def share_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['public', 'private']): + raise ValueError("must be one of enum values ('public', 'private')") + return value + + @field_validator('backend_mode') + def backend_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn']): + raise ValueError("must be one of enum values ('proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn')") + return value + + @field_validator('oauth_provider') + def oauth_provider_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['github', 'google']): + raise ValueError("must be one of enum values ('github', 'google')") + return value + + @field_validator('permission_mode') + def permission_mode_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['open', 'closed']): + raise ValueError("must be one of enum values ('open', 'closed')") + return value + + 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 ShareRequest 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 auth_users (list) + _items = [] + if self.auth_users: + for _item_auth_users in self.auth_users: + if _item_auth_users: + _items.append(_item_auth_users.to_dict()) + _dict['authUsers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ShareRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "envZId": obj.get("envZId"), + "shareMode": obj.get("shareMode"), + "frontendSelection": obj.get("frontendSelection"), + "backendMode": obj.get("backendMode"), + "backendProxyEndpoint": obj.get("backendProxyEndpoint"), + "authScheme": obj.get("authScheme"), + "authUsers": [AuthUser.from_dict(_item) for _item in obj["authUsers"]] if obj.get("authUsers") is not None else None, + "oauthProvider": obj.get("oauthProvider"), + "oauthEmailDomains": obj.get("oauthEmailDomains"), + "oauthAuthorizationCheckInterval": obj.get("oauthAuthorizationCheckInterval"), + "reserved": obj.get("reserved"), + "permissionMode": obj.get("permissionMode"), + "accessGrants": obj.get("accessGrants"), + "uniqueName": obj.get("uniqueName") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/share_response.py b/sdk/python/src/zrok_api/models/share_response.py new file mode 100644 index 00000000..8fa25d60 --- /dev/null +++ b/sdk/python/src/zrok_api/models/share_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ShareResponse(BaseModel): + """ + ShareResponse + """ # noqa: E501 + frontend_proxy_endpoints: Optional[List[StrictStr]] = Field(default=None, alias="frontendProxyEndpoints") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + __properties: ClassVar[List[str]] = ["frontendProxyEndpoints", "shareToken"] + + 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 ShareResponse 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 ShareResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendProxyEndpoints": obj.get("frontendProxyEndpoints"), + "shareToken": obj.get("shareToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/spark_data_sample.py b/sdk/python/src/zrok_api/models/spark_data_sample.py new file mode 100644 index 00000000..23c4ef51 --- /dev/null +++ b/sdk/python/src/zrok_api/models/spark_data_sample.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SparkDataSample(BaseModel): + """ + SparkDataSample + """ # noqa: E501 + rx: Optional[Union[StrictFloat, StrictInt]] = None + tx: Optional[Union[StrictFloat, StrictInt]] = None + __properties: ClassVar[List[str]] = ["rx", "tx"] + + 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 SparkDataSample 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 SparkDataSample from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rx": obj.get("rx"), + "tx": obj.get("tx") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/unaccess_request.py b/sdk/python/src/zrok_api/models/unaccess_request.py new file mode 100644 index 00000000..19a3f5df --- /dev/null +++ b/sdk/python/src/zrok_api/models/unaccess_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UnaccessRequest(BaseModel): + """ + UnaccessRequest + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + __properties: ClassVar[List[str]] = ["frontendToken", "envZId", "shareToken"] + + 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 UnaccessRequest 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 UnaccessRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "envZId": obj.get("envZId"), + "shareToken": obj.get("shareToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/unshare_request.py b/sdk/python/src/zrok_api/models/unshare_request.py new file mode 100644 index 00000000..3ff557e1 --- /dev/null +++ b/sdk/python/src/zrok_api/models/unshare_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 typing import Optional, Set +from typing_extensions import Self + +class UnshareRequest(BaseModel): + """ + UnshareRequest + """ # noqa: E501 + env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + reserved: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["envZId", "shareToken", "reserved"] + + 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 UnshareRequest 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 UnshareRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "envZId": obj.get("envZId"), + "shareToken": obj.get("shareToken"), + "reserved": obj.get("reserved") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/update_access_request.py b/sdk/python/src/zrok_api/models/update_access_request.py new file mode 100644 index 00000000..a27f9623 --- /dev/null +++ b/sdk/python/src/zrok_api/models/update_access_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateAccessRequest(BaseModel): + """ + UpdateAccessRequest + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") + description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["frontendToken", "bindAddress", "description"] + + 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 UpdateAccessRequest 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 UpdateAccessRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "bindAddress": obj.get("bindAddress"), + "description": obj.get("description") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/update_frontend_request.py b/sdk/python/src/zrok_api/models/update_frontend_request.py new file mode 100644 index 00000000..52916296 --- /dev/null +++ b/sdk/python/src/zrok_api/models/update_frontend_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateFrontendRequest(BaseModel): + """ + UpdateFrontendRequest + """ # noqa: E501 + frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") + public_name: Optional[StrictStr] = Field(default=None, alias="publicName") + url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") + __properties: ClassVar[List[str]] = ["frontendToken", "publicName", "urlTemplate"] + + 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 UpdateFrontendRequest 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 UpdateFrontendRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "frontendToken": obj.get("frontendToken"), + "publicName": obj.get("publicName"), + "urlTemplate": obj.get("urlTemplate") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/update_share_request.py b/sdk/python/src/zrok_api/models/update_share_request.py new file mode 100644 index 00000000..9e3de749 --- /dev/null +++ b/sdk/python/src/zrok_api/models/update_share_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateShareRequest(BaseModel): + """ + UpdateShareRequest + """ # noqa: E501 + share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") + backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") + add_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="addAccessGrants") + remove_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="removeAccessGrants") + __properties: ClassVar[List[str]] = ["shareToken", "backendProxyEndpoint", "addAccessGrants", "removeAccessGrants"] + + 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 UpdateShareRequest 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 UpdateShareRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "shareToken": obj.get("shareToken"), + "backendProxyEndpoint": obj.get("backendProxyEndpoint"), + "addAccessGrants": obj.get("addAccessGrants"), + "removeAccessGrants": obj.get("removeAccessGrants") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/verify200_response.py b/sdk/python/src/zrok_api/models/verify200_response.py new file mode 100644 index 00000000..4709d646 --- /dev/null +++ b/sdk/python/src/zrok_api/models/verify200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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 Verify200Response(BaseModel): + """ + Verify200Response + """ # noqa: E501 + email: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["email"] + + 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 Verify200Response 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 Verify200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/verify_request.py b/sdk/python/src/zrok_api/models/verify_request.py new file mode 100644 index 00000000..76def799 --- /dev/null +++ b/sdk/python/src/zrok_api/models/verify_request.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VerifyRequest(BaseModel): + """ + VerifyRequest + """ # noqa: E501 + register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") + __properties: ClassVar[List[str]] = ["registerToken"] + + 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 VerifyRequest 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 VerifyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "registerToken": obj.get("registerToken") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/models/version_inventory200_response.py b/sdk/python/src/zrok_api/models/version_inventory200_response.py new file mode 100644 index 00000000..8cbf4288 --- /dev/null +++ b/sdk/python/src/zrok_api/models/version_inventory200_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VersionInventory200Response(BaseModel): + """ + VersionInventory200Response + """ # noqa: E501 + controller_version: Optional[StrictStr] = Field(default=None, alias="controllerVersion") + __properties: ClassVar[List[str]] = ["controllerVersion"] + + 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 VersionInventory200Response 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 VersionInventory200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "controllerVersion": obj.get("controllerVersion") + }) + return _obj + + diff --git a/sdk/python/src/zrok_api/py.typed b/sdk/python/src/zrok_api/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/sdk/python/src/zrok_api/rest.py b/sdk/python/src/zrok_api/rest.py new file mode 100644 index 00000000..f09faee7 --- /dev/null +++ b/sdk/python/src/zrok_api/rest.py @@ -0,0 +1,258 @@ +# coding: utf-8 + +""" + zrok + + zrok client access + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from zrok_api.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) From 8247c0edda239b2fc30c5497da77b2bf3ffff96e Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 20:19:52 -0500 Subject: [PATCH 40/56] upgrade the github runner and build the linux binary in the manylinux container for compatibility --- .github/workflows/build-wheels.yml | 41 +++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 381e5d3b..6618a189 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -32,9 +32,9 @@ jobs: fail-fast: false matrix: spec: - - { name: 'linux x86_64', runner: ubuntu-20.04, target: manylinux_2_27_x86_64 } - - { name: 'macOS x86_64', runner: macos-13, target: macosx_10_14_x86_64 } - - { name: 'Windows x86_64', runner: windows-2019, target: win_amd64 } + - { name: 'linux x86_64', runner: ubuntu-24.04, platform: linux, target: manylinux_2_27_x86_64 } + - { name: 'macOS x86_64', runner: macos-13, platform: macos, target: macosx_10_14_x86_64 } + - { name: 'Windows x86_64', runner: windows-2019, platform: windows, target: win_amd64 } name: building ${{ matrix.spec.name }} runs-on: ${{ matrix.spec.runner }} steps: @@ -55,17 +55,40 @@ jobs: env: ZROK_VERSION: ${{ github.event.release.tag_name }} ZROK_PY_NAME: ${{ vars.ZROK_PY_NAME || null }} + shell: bash run: | - python setup.py sdist + + set -o pipefail + set -o xtrace + + pip install --upgrade pip + + if [ "${{ matrix.spec.platform }}" == "linux" ]; then + # Use cibuildwheel for Linux builds (proper manylinux containers) + pip install cibuildwheel + python -m cibuildwheel --output-dir ./dist + # Also build an sdist + pip install build + python -m build --sdist + + elif [ "${{ matrix.spec.platform }}" == "windows" ]; then + # For Windows, use regular build with Windows-specific script handling + pip install build wheel + python -m build + else + # For macOS, use regular build + pip install build wheel + python -m build + fi - uses: actions/upload-artifact@v4 if: startsWith(matrix.spec.name, 'linux') with: name: zrok_sdk_${{ matrix.spec.target }} - path: dist/* + path: sdk/python/src/dist/* publish-testpypi: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [ build_wheels ] permissions: id-token: write @@ -86,7 +109,7 @@ jobs: verbose: true publish-pypi: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [ publish-testpypi ] permissions: id-token: write @@ -94,12 +117,12 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: - path: ./dist + path: sdk/python/src/dist merge-multiple: true pattern: zrok_sdk_* - name: Publish wheels (PyPI) uses: pypa/gh-action-pypi-publish@release/v1 with: - packages-dir: dist + packages-dir: sdk/python/src/dist verbose: true From 7e2e1144f3512011cb59e2a2723bf2fbcc77978e Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 20:54:30 -0500 Subject: [PATCH 41/56] tidy py workflow --- .../{build-wheels.yml => publish-python.yml} | 76 +++++++------------ sdk/python/src/build-requirements.txt | 2 + sdk/python/src/pyproject.toml | 3 + 3 files changed, 32 insertions(+), 49 deletions(-) rename .github/workflows/{build-wheels.yml => publish-python.yml} (52%) create mode 100644 sdk/python/src/build-requirements.txt create mode 100644 sdk/python/src/pyproject.toml diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/publish-python.yml similarity index 52% rename from .github/workflows/build-wheels.yml rename to .github/workflows/publish-python.yml index 6618a189..6e3cfce3 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/publish-python.yml @@ -1,4 +1,4 @@ -name: build wheels +name: Publish Python Distributions on: release: @@ -23,84 +23,62 @@ jobs: exit 1 fi - build_wheels: + build_distributions: needs: enforce_stable_semver defaults: run: working-directory: sdk/python/src - strategy: - fail-fast: false - matrix: - spec: - - { name: 'linux x86_64', runner: ubuntu-24.04, platform: linux, target: manylinux_2_27_x86_64 } - - { name: 'macOS x86_64', runner: macos-13, platform: macos, target: macosx_10_14_x86_64 } - - { name: 'Windows x86_64', runner: windows-2019, platform: windows, target: win_amd64 } - name: building ${{ matrix.spec.name }} - runs-on: ${{ matrix.spec.runner }} + runs-on: ubuntu-24.04 + name: Building Python Distributions steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Python + - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.13' + cache: 'pip' - - name: Install Python Tools - run: python -m pip install -U pip setuptools - - - name: Build distro + - name: Build Python distributions env: ZROK_VERSION: ${{ github.event.release.tag_name }} ZROK_PY_NAME: ${{ vars.ZROK_PY_NAME || null }} shell: bash run: | - set -o pipefail + set -o pipefail set -o xtrace + # Install build requirements pip install --upgrade pip + pip install -r build-requirements.txt - if [ "${{ matrix.spec.platform }}" == "linux" ]; then - # Use cibuildwheel for Linux builds (proper manylinux containers) - pip install cibuildwheel - python -m cibuildwheel --output-dir ./dist - # Also build an sdist - pip install build - python -m build --sdist - - elif [ "${{ matrix.spec.platform }}" == "windows" ]; then - # For Windows, use regular build with Windows-specific script handling - pip install build wheel - python -m build - else - # For macOS, use regular build - pip install build wheel - python -m build - fi + # Build source distribution and wheel + python -m build + + # List built distributions + ls -lAR ./dist - uses: actions/upload-artifact@v4 - if: startsWith(matrix.spec.name, 'linux') with: - name: zrok_sdk_${{ matrix.spec.target }} + name: zrok_sdk_distributions path: sdk/python/src/dist/* - publish-testpypi: + publish_testpypi: runs-on: ubuntu-24.04 - needs: [ build_wheels ] + needs: [ build_distributions ] permissions: - id-token: write + id-token: write steps: - name: Download artifacts uses: actions/download-artifact@v4 with: - path: ./dist + path: sdk/python/src/dist merge-multiple: true - pattern: zrok_sdk_* + pattern: zrok_sdk_distributions - - name: Publish wheels (TestPYPI) + - name: Publish Distributions to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ @@ -108,20 +86,20 @@ jobs: skip-existing: true verbose: true - publish-pypi: + publish_pypi: runs-on: ubuntu-24.04 - needs: [ publish-testpypi ] + needs: [ publish_testpypi ] permissions: - id-token: write + id-token: write steps: - name: Download artifacts uses: actions/download-artifact@v4 with: path: sdk/python/src/dist merge-multiple: true - pattern: zrok_sdk_* + pattern: zrok_sdk_distributions - - name: Publish wheels (PyPI) + - name: Publish Distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: sdk/python/src/dist diff --git a/sdk/python/src/build-requirements.txt b/sdk/python/src/build-requirements.txt new file mode 100644 index 00000000..97123c75 --- /dev/null +++ b/sdk/python/src/build-requirements.txt @@ -0,0 +1,2 @@ +build +wheel diff --git a/sdk/python/src/pyproject.toml b/sdk/python/src/pyproject.toml new file mode 100644 index 00000000..fed528d4 --- /dev/null +++ b/sdk/python/src/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" From cc8252c34e06e5471c2fbb3a030de16e638788cb Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 21:01:51 -0500 Subject: [PATCH 42/56] install build reqs before building editable --- .github/workflows/ci-build.yml | 3 ++- sdk/python/src/build-requirements.txt | 1 + sdk/python/src/pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index d947327a..7dfec9f8 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -114,9 +114,10 @@ jobs: set -o xtrace python -m pip install --upgrade pip - pip install -e "$PWD" pip install -r requirements.txt pip install -r test-requirements.txt + pip install -r build-requirements.txt + pip install -e "$PWD" - name: Test with pytest shell: bash diff --git a/sdk/python/src/build-requirements.txt b/sdk/python/src/build-requirements.txt index 97123c75..9ae847b6 100644 --- a/sdk/python/src/build-requirements.txt +++ b/sdk/python/src/build-requirements.txt @@ -1,2 +1,3 @@ build wheel +versioneer diff --git a/sdk/python/src/pyproject.toml b/sdk/python/src/pyproject.toml index fed528d4..76eacbbd 100644 --- a/sdk/python/src/pyproject.toml +++ b/sdk/python/src/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools"] +requires = ["setuptools", "wheel", "versioneer[toml]"] build-backend = "setuptools.build_meta" From 5ea81c4959e862a0268c36dde5beb4a4d4b02334 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 21:14:26 -0500 Subject: [PATCH 43/56] install versioneer in isolated build env --- .github/workflows/publish-python.yml | 8 +++++--- sdk/python/src/pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-python.yml b/.github/workflows/publish-python.yml index 6e3cfce3..b5e05422 100644 --- a/.github/workflows/publish-python.yml +++ b/.github/workflows/publish-python.yml @@ -24,12 +24,12 @@ jobs: fi build_distributions: + name: Building Python Distributions needs: enforce_stable_semver + runs-on: ubuntu-24.04 defaults: run: working-directory: sdk/python/src - runs-on: ubuntu-24.04 - name: Building Python Distributions steps: - name: Checkout uses: actions/checkout@v4 @@ -53,7 +53,7 @@ jobs: # Install build requirements pip install --upgrade pip pip install -r build-requirements.txt - + # Build source distribution and wheel python -m build @@ -66,6 +66,7 @@ jobs: path: sdk/python/src/dist/* publish_testpypi: + name: Publish Test PyPI runs-on: ubuntu-24.04 needs: [ build_distributions ] permissions: @@ -87,6 +88,7 @@ jobs: verbose: true publish_pypi: + name: Publish PyPI runs-on: ubuntu-24.04 needs: [ publish_testpypi ] permissions: diff --git a/sdk/python/src/pyproject.toml b/sdk/python/src/pyproject.toml index 76eacbbd..28c36983 100644 --- a/sdk/python/src/pyproject.toml +++ b/sdk/python/src/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools", "wheel", "versioneer[toml]"] +requires = ["setuptools>=42", "wheel", "versioneer>=0.28"] build-backend = "setuptools.build_meta" From 626ebb1e2de80deb5ea15e1047ea15543b1c6da2 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 21:25:13 -0500 Subject: [PATCH 44/56] lint the py sdk --- .flake8 | 4 ++-- .github/workflows/ci-build.yml | 40 +++++++++++++++------------------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/.flake8 b/.flake8 index 2ddf68b7..be4b41e7 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ [flake8] max-line-length = 120 exclude = - ./build/** - + sdk/python/src/zrok_api/* + sdk/python/src/test/* diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 7dfec9f8..62a75d2d 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -61,19 +61,6 @@ jobs: shell: bash run: go test -v ./... - - name: setup python - uses: actions/setup-python@v3 - with: - python-version: '3.13' - - - name: python deps - shell: bash - run: python -m pip install -U pip flake8 - - - name: python lint - shell: bash - run: flake8 sdk/python/src - - name: solve GOBIN id: solve_go_bin shell: bash @@ -89,14 +76,14 @@ jobs: if-no-files-found: error pytest: - + name: Test the Python SDK runs-on: ubuntu-24.04 - defaults: - run: - working-directory: sdk/python/src strategy: matrix: python-version: ["3.10", "3.11", "3.12", "3.13"] + defaults: + run: + working-directory: sdk/python steps: - uses: actions/checkout@v4 @@ -114,10 +101,10 @@ jobs: set -o xtrace python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r test-requirements.txt - pip install -r build-requirements.txt - pip install -e "$PWD" + pip install -r src/requirements.txt + pip install -r src/test-requirements.txt + pip install -r src/build-requirements.txt + pip install -e src/ - name: Test with pytest shell: bash @@ -126,7 +113,16 @@ jobs: set -o pipefail set -o xtrace - pytest --cov=zrok_api --verbose + pytest --cov=zrok_api --verbose src/ + + - name: Lint the Python SDK + shell: bash + run: | + + set -o pipefail + set -o xtrace + + flake8 . # build a release candidate container image for branches named "main" or like "v*" rc-container-build: From 4e549bb3dab9d71fdaa52f57add2c7eb4ed1007e Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 21:34:12 -0500 Subject: [PATCH 45/56] correct path to test pypi upload --- .github/workflows/{publish-python.yml => build-wheels.yml} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{publish-python.yml => build-wheels.yml} (95%) diff --git a/.github/workflows/publish-python.yml b/.github/workflows/build-wheels.yml similarity index 95% rename from .github/workflows/publish-python.yml rename to .github/workflows/build-wheels.yml index b5e05422..3f7f537a 100644 --- a/.github/workflows/publish-python.yml +++ b/.github/workflows/build-wheels.yml @@ -66,7 +66,7 @@ jobs: path: sdk/python/src/dist/* publish_testpypi: - name: Publish Test PyPI + name: Publish TestPyPI runs-on: ubuntu-24.04 needs: [ build_distributions ] permissions: @@ -79,11 +79,11 @@ jobs: merge-multiple: true pattern: zrok_sdk_distributions - - name: Publish Distributions to Test PyPI + - name: Publish Distributions to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ - packages-dir: dist + packages-dir: sdk/python/src/dist skip-existing: true verbose: true From bae410b57121a239a3ade403fc854529d76bb496 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 22:05:41 -0500 Subject: [PATCH 46/56] prune redundant name prop --- sdk/python/src/setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/src/setup.cfg b/sdk/python/src/setup.cfg index a23d00c4..94902a7d 100644 --- a/sdk/python/src/setup.cfg +++ b/sdk/python/src/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = zrok +# "name" property is determined by setup.py based on environment variable author = NetFoundry author_email = developers@openziti.org description = zrok Python SDK From 6635a642aa1fbd300937bdeba159c743f03e8dcc Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 4 Mar 2025 22:06:41 -0500 Subject: [PATCH 47/56] Revert "temporarily commit the generated py client" This reverts commit 97d76d45cd07cf39bddf40973fd9b2b5165995a8. --- sdk/python/src/.gitignore | 66 - sdk/python/src/README.md | 215 - sdk/python/src/docs/Access201Response.md | 30 - sdk/python/src/docs/AccessRequest.md | 32 - sdk/python/src/docs/AccountApi.md | 557 --- .../src/docs/AddOrganizationMemberRequest.md | 31 - sdk/python/src/docs/AdminApi.md | 1079 ----- sdk/python/src/docs/AuthUser.md | 30 - sdk/python/src/docs/ChangePasswordRequest.md | 31 - .../src/docs/ClientVersionCheckRequest.md | 29 - sdk/python/src/docs/Configuration.md | 33 - .../src/docs/CreateFrontend201Response.md | 29 - sdk/python/src/docs/CreateFrontendRequest.md | 32 - .../src/docs/CreateIdentity201Response.md | 30 - sdk/python/src/docs/CreateIdentityRequest.md | 29 - .../src/docs/CreateOrganization201Response.md | 29 - .../src/docs/CreateOrganizationRequest.md | 29 - sdk/python/src/docs/DisableRequest.md | 29 - sdk/python/src/docs/EnableRequest.md | 30 - sdk/python/src/docs/Environment.md | 36 - .../src/docs/EnvironmentAndResources.md | 31 - sdk/python/src/docs/EnvironmentApi.md | 162 - sdk/python/src/docs/Frontend.md | 37 - .../src/docs/GetSparklines200Response.md | 29 - sdk/python/src/docs/GetSparklinesRequest.md | 31 - sdk/python/src/docs/InviteRequest.md | 30 - .../src/docs/InviteTokenGenerateRequest.md | 29 - .../src/docs/ListFrontends200ResponseInner.md | 34 - .../src/docs/ListMemberships200Response.md | 29 - ...tMemberships200ResponseMembershipsInner.md | 31 - .../ListOrganizationMembers200Response.md | 29 - ...anizationMembers200ResponseMembersInner.md | 30 - .../src/docs/ListOrganizations200Response.md | 29 - ...anizations200ResponseOrganizationsInner.md | 30 - sdk/python/src/docs/LoginRequest.md | 30 - sdk/python/src/docs/MetadataApi.md | 1171 ----- sdk/python/src/docs/Metrics.md | 32 - sdk/python/src/docs/MetricsSample.md | 31 - sdk/python/src/docs/Overview.md | 30 - sdk/python/src/docs/Principal.md | 33 - .../docs/RegenerateAccountToken200Response.md | 29 - .../src/docs/RegenerateAccountTokenRequest.md | 29 - sdk/python/src/docs/RegisterRequest.md | 30 - .../docs/RemoveOrganizationMemberRequest.md | 30 - sdk/python/src/docs/ResetPasswordRequest.md | 30 - sdk/python/src/docs/Share.md | 40 - sdk/python/src/docs/ShareApi.md | 473 -- sdk/python/src/docs/ShareRequest.md | 42 - sdk/python/src/docs/ShareResponse.md | 30 - sdk/python/src/docs/SparkDataSample.md | 30 - sdk/python/src/docs/UnaccessRequest.md | 31 - sdk/python/src/docs/UnshareRequest.md | 31 - sdk/python/src/docs/UpdateAccessRequest.md | 31 - sdk/python/src/docs/UpdateFrontendRequest.md | 31 - sdk/python/src/docs/UpdateShareRequest.md | 32 - sdk/python/src/docs/Verify200Response.md | 29 - sdk/python/src/docs/VerifyRequest.md | 29 - .../src/docs/VersionInventory200Response.md | 29 - sdk/python/src/test/__init__.py | 0 .../src/test/test_access201_response.py | 52 - sdk/python/src/test/test_access_request.py | 54 - sdk/python/src/test/test_account_api.py | 79 - .../test_add_organization_member_request.py | 53 - sdk/python/src/test/test_admin_api.py | 115 - sdk/python/src/test/test_auth_user.py | 52 - .../src/test/test_change_password_request.py | 53 - .../test/test_client_version_check_request.py | 51 - sdk/python/src/test/test_configuration.py | 55 - .../test/test_create_frontend201_response.py | 51 - .../src/test/test_create_frontend_request.py | 54 - .../test/test_create_identity201_response.py | 52 - .../src/test/test_create_identity_request.py | 51 - .../test_create_organization201_response.py | 51 - .../test/test_create_organization_request.py | 51 - sdk/python/src/test/test_disable_request.py | 51 - sdk/python/src/test/test_enable_request.py | 52 - sdk/python/src/test/test_environment.py | 62 - .../test/test_environment_and_resources.py | 94 - sdk/python/src/test/test_environment_api.py | 43 - sdk/python/src/test/test_frontend.py | 59 - .../test/test_get_sparklines200_response.py | 62 - .../src/test/test_get_sparklines_request.py | 57 - sdk/python/src/test/test_invite_request.py | 52 - .../test_invite_token_generate_request.py | 53 - .../test_list_frontends200_response_inner.py | 56 - .../test/test_list_memberships200_response.py | 56 - ...mberships200_response_memberships_inner.py | 53 - ...t_list_organization_members200_response.py | 55 - ...ation_members200_response_members_inner.py | 52 - .../test_list_organizations200_response.py | 55 - ...zations200_response_organizations_inner.py | 52 - sdk/python/src/test/test_login_request.py | 52 - sdk/python/src/test/test_metadata_api.py | 127 - sdk/python/src/test/test_metrics.py | 59 - sdk/python/src/test/test_metrics_sample.py | 53 - sdk/python/src/test/test_overview.py | 93 - sdk/python/src/test/test_principal.py | 55 - ...st_regenerate_account_token200_response.py | 51 - .../test_regenerate_account_token_request.py | 51 - sdk/python/src/test/test_register_request.py | 52 - ...test_remove_organization_member_request.py | 52 - .../src/test/test_reset_password_request.py | 52 - sdk/python/src/test/test_share.py | 66 - sdk/python/src/test/test_share_api.py | 67 - sdk/python/src/test/test_share_request.py | 74 - sdk/python/src/test/test_share_response.py | 54 - sdk/python/src/test/test_spark_data_sample.py | 52 - sdk/python/src/test/test_unaccess_request.py | 53 - sdk/python/src/test/test_unshare_request.py | 53 - .../src/test/test_update_access_request.py | 53 - .../src/test/test_update_frontend_request.py | 53 - .../src/test/test_update_share_request.py | 58 - .../src/test/test_verify200_response.py | 51 - sdk/python/src/test/test_verify_request.py | 51 - .../test_version_inventory200_response.py | 51 - sdk/python/src/zrok_api/__init__.py | 88 - sdk/python/src/zrok_api/api/__init__.py | 9 - sdk/python/src/zrok_api/api/account_api.py | 2261 --------- sdk/python/src/zrok_api/api/admin_api.py | 3855 --------------- .../src/zrok_api/api/environment_api.py | 589 --- sdk/python/src/zrok_api/api/metadata_api.py | 4242 ----------------- sdk/python/src/zrok_api/api/share_api.py | 1712 ------- sdk/python/src/zrok_api/api_client.py | 797 ---- sdk/python/src/zrok_api/api_response.py | 21 - sdk/python/src/zrok_api/configuration.py | 602 --- sdk/python/src/zrok_api/exceptions.py | 216 - sdk/python/src/zrok_api/models/__init__.py | 67 - .../src/zrok_api/models/access201_response.py | 89 - .../src/zrok_api/models/access_request.py | 93 - .../models/add_organization_member_request.py | 91 - sdk/python/src/zrok_api/models/auth_user.py | 89 - .../models/change_password_request.py | 91 - .../models/client_version_check_request.py | 87 - .../src/zrok_api/models/configuration.py | 95 - .../models/create_frontend201_response.py | 87 - .../models/create_frontend_request.py | 103 - .../models/create_identity201_response.py | 89 - .../models/create_identity_request.py | 87 - .../models/create_organization201_response.py | 87 - .../models/create_organization_request.py | 87 - .../src/zrok_api/models/disable_request.py | 87 - .../src/zrok_api/models/enable_request.py | 89 - sdk/python/src/zrok_api/models/environment.py | 109 - .../models/environment_and_resources.py | 111 - sdk/python/src/zrok_api/models/frontend.py | 103 - .../models/get_sparklines200_response.py | 95 - .../zrok_api/models/get_sparklines_request.py | 91 - .../src/zrok_api/models/invite_request.py | 89 - .../models/invite_token_generate_request.py | 87 - .../list_frontends200_response_inner.py | 97 - .../models/list_memberships200_response.py | 95 - ...mberships200_response_memberships_inner.py | 91 - .../list_organization_members200_response.py | 95 - ...ation_members200_response_members_inner.py | 89 - .../models/list_organizations200_response.py | 95 - ...zations200_response_organizations_inner.py | 89 - .../src/zrok_api/models/login_request.py | 89 - sdk/python/src/zrok_api/models/metrics.py | 101 - .../src/zrok_api/models/metrics_sample.py | 91 - sdk/python/src/zrok_api/models/overview.py | 97 - sdk/python/src/zrok_api/models/principal.py | 95 - .../regenerate_account_token200_response.py | 87 - .../regenerate_account_token_request.py | 87 - .../src/zrok_api/models/register_request.py | 89 - .../remove_organization_member_request.py | 89 - .../zrok_api/models/reset_password_request.py | 89 - sdk/python/src/zrok_api/models/share.py | 117 - .../src/zrok_api/models/share_request.py | 161 - .../src/zrok_api/models/share_response.py | 89 - .../src/zrok_api/models/spark_data_sample.py | 89 - .../src/zrok_api/models/unaccess_request.py | 91 - .../src/zrok_api/models/unshare_request.py | 91 - .../zrok_api/models/update_access_request.py | 91 - .../models/update_frontend_request.py | 91 - .../zrok_api/models/update_share_request.py | 93 - .../src/zrok_api/models/verify200_response.py | 87 - .../src/zrok_api/models/verify_request.py | 87 - .../models/version_inventory200_response.py | 87 - sdk/python/src/zrok_api/py.typed | 0 sdk/python/src/zrok_api/rest.py | 258 - 180 files changed, 28063 deletions(-) delete mode 100644 sdk/python/src/.gitignore delete mode 100644 sdk/python/src/README.md delete mode 100644 sdk/python/src/docs/Access201Response.md delete mode 100644 sdk/python/src/docs/AccessRequest.md delete mode 100644 sdk/python/src/docs/AccountApi.md delete mode 100644 sdk/python/src/docs/AddOrganizationMemberRequest.md delete mode 100644 sdk/python/src/docs/AdminApi.md delete mode 100644 sdk/python/src/docs/AuthUser.md delete mode 100644 sdk/python/src/docs/ChangePasswordRequest.md delete mode 100644 sdk/python/src/docs/ClientVersionCheckRequest.md delete mode 100644 sdk/python/src/docs/Configuration.md delete mode 100644 sdk/python/src/docs/CreateFrontend201Response.md delete mode 100644 sdk/python/src/docs/CreateFrontendRequest.md delete mode 100644 sdk/python/src/docs/CreateIdentity201Response.md delete mode 100644 sdk/python/src/docs/CreateIdentityRequest.md delete mode 100644 sdk/python/src/docs/CreateOrganization201Response.md delete mode 100644 sdk/python/src/docs/CreateOrganizationRequest.md delete mode 100644 sdk/python/src/docs/DisableRequest.md delete mode 100644 sdk/python/src/docs/EnableRequest.md delete mode 100644 sdk/python/src/docs/Environment.md delete mode 100644 sdk/python/src/docs/EnvironmentAndResources.md delete mode 100644 sdk/python/src/docs/EnvironmentApi.md delete mode 100644 sdk/python/src/docs/Frontend.md delete mode 100644 sdk/python/src/docs/GetSparklines200Response.md delete mode 100644 sdk/python/src/docs/GetSparklinesRequest.md delete mode 100644 sdk/python/src/docs/InviteRequest.md delete mode 100644 sdk/python/src/docs/InviteTokenGenerateRequest.md delete mode 100644 sdk/python/src/docs/ListFrontends200ResponseInner.md delete mode 100644 sdk/python/src/docs/ListMemberships200Response.md delete mode 100644 sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md delete mode 100644 sdk/python/src/docs/ListOrganizationMembers200Response.md delete mode 100644 sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md delete mode 100644 sdk/python/src/docs/ListOrganizations200Response.md delete mode 100644 sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md delete mode 100644 sdk/python/src/docs/LoginRequest.md delete mode 100644 sdk/python/src/docs/MetadataApi.md delete mode 100644 sdk/python/src/docs/Metrics.md delete mode 100644 sdk/python/src/docs/MetricsSample.md delete mode 100644 sdk/python/src/docs/Overview.md delete mode 100644 sdk/python/src/docs/Principal.md delete mode 100644 sdk/python/src/docs/RegenerateAccountToken200Response.md delete mode 100644 sdk/python/src/docs/RegenerateAccountTokenRequest.md delete mode 100644 sdk/python/src/docs/RegisterRequest.md delete mode 100644 sdk/python/src/docs/RemoveOrganizationMemberRequest.md delete mode 100644 sdk/python/src/docs/ResetPasswordRequest.md delete mode 100644 sdk/python/src/docs/Share.md delete mode 100644 sdk/python/src/docs/ShareApi.md delete mode 100644 sdk/python/src/docs/ShareRequest.md delete mode 100644 sdk/python/src/docs/ShareResponse.md delete mode 100644 sdk/python/src/docs/SparkDataSample.md delete mode 100644 sdk/python/src/docs/UnaccessRequest.md delete mode 100644 sdk/python/src/docs/UnshareRequest.md delete mode 100644 sdk/python/src/docs/UpdateAccessRequest.md delete mode 100644 sdk/python/src/docs/UpdateFrontendRequest.md delete mode 100644 sdk/python/src/docs/UpdateShareRequest.md delete mode 100644 sdk/python/src/docs/Verify200Response.md delete mode 100644 sdk/python/src/docs/VerifyRequest.md delete mode 100644 sdk/python/src/docs/VersionInventory200Response.md delete mode 100644 sdk/python/src/test/__init__.py delete mode 100644 sdk/python/src/test/test_access201_response.py delete mode 100644 sdk/python/src/test/test_access_request.py delete mode 100644 sdk/python/src/test/test_account_api.py delete mode 100644 sdk/python/src/test/test_add_organization_member_request.py delete mode 100644 sdk/python/src/test/test_admin_api.py delete mode 100644 sdk/python/src/test/test_auth_user.py delete mode 100644 sdk/python/src/test/test_change_password_request.py delete mode 100644 sdk/python/src/test/test_client_version_check_request.py delete mode 100644 sdk/python/src/test/test_configuration.py delete mode 100644 sdk/python/src/test/test_create_frontend201_response.py delete mode 100644 sdk/python/src/test/test_create_frontend_request.py delete mode 100644 sdk/python/src/test/test_create_identity201_response.py delete mode 100644 sdk/python/src/test/test_create_identity_request.py delete mode 100644 sdk/python/src/test/test_create_organization201_response.py delete mode 100644 sdk/python/src/test/test_create_organization_request.py delete mode 100644 sdk/python/src/test/test_disable_request.py delete mode 100644 sdk/python/src/test/test_enable_request.py delete mode 100644 sdk/python/src/test/test_environment.py delete mode 100644 sdk/python/src/test/test_environment_and_resources.py delete mode 100644 sdk/python/src/test/test_environment_api.py delete mode 100644 sdk/python/src/test/test_frontend.py delete mode 100644 sdk/python/src/test/test_get_sparklines200_response.py delete mode 100644 sdk/python/src/test/test_get_sparklines_request.py delete mode 100644 sdk/python/src/test/test_invite_request.py delete mode 100644 sdk/python/src/test/test_invite_token_generate_request.py delete mode 100644 sdk/python/src/test/test_list_frontends200_response_inner.py delete mode 100644 sdk/python/src/test/test_list_memberships200_response.py delete mode 100644 sdk/python/src/test/test_list_memberships200_response_memberships_inner.py delete mode 100644 sdk/python/src/test/test_list_organization_members200_response.py delete mode 100644 sdk/python/src/test/test_list_organization_members200_response_members_inner.py delete mode 100644 sdk/python/src/test/test_list_organizations200_response.py delete mode 100644 sdk/python/src/test/test_list_organizations200_response_organizations_inner.py delete mode 100644 sdk/python/src/test/test_login_request.py delete mode 100644 sdk/python/src/test/test_metadata_api.py delete mode 100644 sdk/python/src/test/test_metrics.py delete mode 100644 sdk/python/src/test/test_metrics_sample.py delete mode 100644 sdk/python/src/test/test_overview.py delete mode 100644 sdk/python/src/test/test_principal.py delete mode 100644 sdk/python/src/test/test_regenerate_account_token200_response.py delete mode 100644 sdk/python/src/test/test_regenerate_account_token_request.py delete mode 100644 sdk/python/src/test/test_register_request.py delete mode 100644 sdk/python/src/test/test_remove_organization_member_request.py delete mode 100644 sdk/python/src/test/test_reset_password_request.py delete mode 100644 sdk/python/src/test/test_share.py delete mode 100644 sdk/python/src/test/test_share_api.py delete mode 100644 sdk/python/src/test/test_share_request.py delete mode 100644 sdk/python/src/test/test_share_response.py delete mode 100644 sdk/python/src/test/test_spark_data_sample.py delete mode 100644 sdk/python/src/test/test_unaccess_request.py delete mode 100644 sdk/python/src/test/test_unshare_request.py delete mode 100644 sdk/python/src/test/test_update_access_request.py delete mode 100644 sdk/python/src/test/test_update_frontend_request.py delete mode 100644 sdk/python/src/test/test_update_share_request.py delete mode 100644 sdk/python/src/test/test_verify200_response.py delete mode 100644 sdk/python/src/test/test_verify_request.py delete mode 100644 sdk/python/src/test/test_version_inventory200_response.py delete mode 100644 sdk/python/src/zrok_api/__init__.py delete mode 100644 sdk/python/src/zrok_api/api/__init__.py delete mode 100644 sdk/python/src/zrok_api/api/account_api.py delete mode 100644 sdk/python/src/zrok_api/api/admin_api.py delete mode 100644 sdk/python/src/zrok_api/api/environment_api.py delete mode 100644 sdk/python/src/zrok_api/api/metadata_api.py delete mode 100644 sdk/python/src/zrok_api/api/share_api.py delete mode 100644 sdk/python/src/zrok_api/api_client.py delete mode 100644 sdk/python/src/zrok_api/api_response.py delete mode 100644 sdk/python/src/zrok_api/configuration.py delete mode 100644 sdk/python/src/zrok_api/exceptions.py delete mode 100644 sdk/python/src/zrok_api/models/__init__.py delete mode 100644 sdk/python/src/zrok_api/models/access201_response.py delete mode 100644 sdk/python/src/zrok_api/models/access_request.py delete mode 100644 sdk/python/src/zrok_api/models/add_organization_member_request.py delete mode 100644 sdk/python/src/zrok_api/models/auth_user.py delete mode 100644 sdk/python/src/zrok_api/models/change_password_request.py delete mode 100644 sdk/python/src/zrok_api/models/client_version_check_request.py delete mode 100644 sdk/python/src/zrok_api/models/configuration.py delete mode 100644 sdk/python/src/zrok_api/models/create_frontend201_response.py delete mode 100644 sdk/python/src/zrok_api/models/create_frontend_request.py delete mode 100644 sdk/python/src/zrok_api/models/create_identity201_response.py delete mode 100644 sdk/python/src/zrok_api/models/create_identity_request.py delete mode 100644 sdk/python/src/zrok_api/models/create_organization201_response.py delete mode 100644 sdk/python/src/zrok_api/models/create_organization_request.py delete mode 100644 sdk/python/src/zrok_api/models/disable_request.py delete mode 100644 sdk/python/src/zrok_api/models/enable_request.py delete mode 100644 sdk/python/src/zrok_api/models/environment.py delete mode 100644 sdk/python/src/zrok_api/models/environment_and_resources.py delete mode 100644 sdk/python/src/zrok_api/models/frontend.py delete mode 100644 sdk/python/src/zrok_api/models/get_sparklines200_response.py delete mode 100644 sdk/python/src/zrok_api/models/get_sparklines_request.py delete mode 100644 sdk/python/src/zrok_api/models/invite_request.py delete mode 100644 sdk/python/src/zrok_api/models/invite_token_generate_request.py delete mode 100644 sdk/python/src/zrok_api/models/list_frontends200_response_inner.py delete mode 100644 sdk/python/src/zrok_api/models/list_memberships200_response.py delete mode 100644 sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py delete mode 100644 sdk/python/src/zrok_api/models/list_organization_members200_response.py delete mode 100644 sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py delete mode 100644 sdk/python/src/zrok_api/models/list_organizations200_response.py delete mode 100644 sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py delete mode 100644 sdk/python/src/zrok_api/models/login_request.py delete mode 100644 sdk/python/src/zrok_api/models/metrics.py delete mode 100644 sdk/python/src/zrok_api/models/metrics_sample.py delete mode 100644 sdk/python/src/zrok_api/models/overview.py delete mode 100644 sdk/python/src/zrok_api/models/principal.py delete mode 100644 sdk/python/src/zrok_api/models/regenerate_account_token200_response.py delete mode 100644 sdk/python/src/zrok_api/models/regenerate_account_token_request.py delete mode 100644 sdk/python/src/zrok_api/models/register_request.py delete mode 100644 sdk/python/src/zrok_api/models/remove_organization_member_request.py delete mode 100644 sdk/python/src/zrok_api/models/reset_password_request.py delete mode 100644 sdk/python/src/zrok_api/models/share.py delete mode 100644 sdk/python/src/zrok_api/models/share_request.py delete mode 100644 sdk/python/src/zrok_api/models/share_response.py delete mode 100644 sdk/python/src/zrok_api/models/spark_data_sample.py delete mode 100644 sdk/python/src/zrok_api/models/unaccess_request.py delete mode 100644 sdk/python/src/zrok_api/models/unshare_request.py delete mode 100644 sdk/python/src/zrok_api/models/update_access_request.py delete mode 100644 sdk/python/src/zrok_api/models/update_frontend_request.py delete mode 100644 sdk/python/src/zrok_api/models/update_share_request.py delete mode 100644 sdk/python/src/zrok_api/models/verify200_response.py delete mode 100644 sdk/python/src/zrok_api/models/verify_request.py delete mode 100644 sdk/python/src/zrok_api/models/version_inventory200_response.py delete mode 100644 sdk/python/src/zrok_api/py.typed delete mode 100644 sdk/python/src/zrok_api/rest.py diff --git a/sdk/python/src/.gitignore b/sdk/python/src/.gitignore deleted file mode 100644 index 43995bd4..00000000 --- a/sdk/python/src/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/sdk/python/src/README.md b/sdk/python/src/README.md deleted file mode 100644 index 25ad2fe6..00000000 --- a/sdk/python/src/README.md +++ /dev/null @@ -1,215 +0,0 @@ -# zrok -zrok client access - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Package version: 1.0.0 -- Generator version: 7.12.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -Python 3.8+ - -## Installation & Usage -### pip install - -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 -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import zrok_api -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import zrok_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) - - try: - api_instance.change_password(body=body) - except ApiException as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to */api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AccountApi* | [**change_password**](docs/AccountApi.md#change_password) | **POST** /changePassword | -*AccountApi* | [**invite**](docs/AccountApi.md#invite) | **POST** /invite | -*AccountApi* | [**login**](docs/AccountApi.md#login) | **POST** /login | -*AccountApi* | [**regenerate_account_token**](docs/AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | -*AccountApi* | [**register**](docs/AccountApi.md#register) | **POST** /register | -*AccountApi* | [**reset_password**](docs/AccountApi.md#reset_password) | **POST** /resetPassword | -*AccountApi* | [**reset_password_request**](docs/AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | -*AccountApi* | [**verify**](docs/AccountApi.md#verify) | **POST** /verify | -*AdminApi* | [**add_organization_member**](docs/AdminApi.md#add_organization_member) | **POST** /organization/add | -*AdminApi* | [**create_account**](docs/AdminApi.md#create_account) | **POST** /account | -*AdminApi* | [**create_frontend**](docs/AdminApi.md#create_frontend) | **POST** /frontend | -*AdminApi* | [**create_identity**](docs/AdminApi.md#create_identity) | **POST** /identity | -*AdminApi* | [**create_organization**](docs/AdminApi.md#create_organization) | **POST** /organization | -*AdminApi* | [**delete_frontend**](docs/AdminApi.md#delete_frontend) | **DELETE** /frontend | -*AdminApi* | [**delete_organization**](docs/AdminApi.md#delete_organization) | **DELETE** /organization | -*AdminApi* | [**grants**](docs/AdminApi.md#grants) | **POST** /grants | -*AdminApi* | [**invite_token_generate**](docs/AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | -*AdminApi* | [**list_frontends**](docs/AdminApi.md#list_frontends) | **GET** /frontends | -*AdminApi* | [**list_organization_members**](docs/AdminApi.md#list_organization_members) | **POST** /organization/list | -*AdminApi* | [**list_organizations**](docs/AdminApi.md#list_organizations) | **GET** /organizations | -*AdminApi* | [**remove_organization_member**](docs/AdminApi.md#remove_organization_member) | **POST** /organization/remove | -*AdminApi* | [**update_frontend**](docs/AdminApi.md#update_frontend) | **PATCH** /frontend | -*EnvironmentApi* | [**disable**](docs/EnvironmentApi.md#disable) | **POST** /disable | -*EnvironmentApi* | [**enable**](docs/EnvironmentApi.md#enable) | **POST** /enable | -*MetadataApi* | [**client_version_check**](docs/MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | -*MetadataApi* | [**configuration**](docs/MetadataApi.md#configuration) | **GET** /configuration | -*MetadataApi* | [**get_account_detail**](docs/MetadataApi.md#get_account_detail) | **GET** /detail/account | -*MetadataApi* | [**get_account_metrics**](docs/MetadataApi.md#get_account_metrics) | **GET** /metrics/account | -*MetadataApi* | [**get_environment_detail**](docs/MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | -*MetadataApi* | [**get_environment_metrics**](docs/MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | -*MetadataApi* | [**get_frontend_detail**](docs/MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | -*MetadataApi* | [**get_share_detail**](docs/MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | -*MetadataApi* | [**get_share_metrics**](docs/MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | -*MetadataApi* | [**get_sparklines**](docs/MetadataApi.md#get_sparklines) | **POST** /sparklines | -*MetadataApi* | [**list_memberships**](docs/MetadataApi.md#list_memberships) | **GET** /memberships | -*MetadataApi* | [**list_org_members**](docs/MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | -*MetadataApi* | [**org_account_overview**](docs/MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | -*MetadataApi* | [**overview**](docs/MetadataApi.md#overview) | **GET** /overview | -*MetadataApi* | [**version**](docs/MetadataApi.md#version) | **GET** /version | -*MetadataApi* | [**version_inventory**](docs/MetadataApi.md#version_inventory) | **GET** /versions | -*ShareApi* | [**access**](docs/ShareApi.md#access) | **POST** /access | -*ShareApi* | [**share**](docs/ShareApi.md#share) | **POST** /share | -*ShareApi* | [**unaccess**](docs/ShareApi.md#unaccess) | **DELETE** /unaccess | -*ShareApi* | [**unshare**](docs/ShareApi.md#unshare) | **DELETE** /unshare | -*ShareApi* | [**update_access**](docs/ShareApi.md#update_access) | **PATCH** /access | -*ShareApi* | [**update_share**](docs/ShareApi.md#update_share) | **PATCH** /share | - - -## Documentation For Models - - - [Access201Response](docs/Access201Response.md) - - [AccessRequest](docs/AccessRequest.md) - - [AddOrganizationMemberRequest](docs/AddOrganizationMemberRequest.md) - - [AuthUser](docs/AuthUser.md) - - [ChangePasswordRequest](docs/ChangePasswordRequest.md) - - [ClientVersionCheckRequest](docs/ClientVersionCheckRequest.md) - - [Configuration](docs/Configuration.md) - - [CreateFrontend201Response](docs/CreateFrontend201Response.md) - - [CreateFrontendRequest](docs/CreateFrontendRequest.md) - - [CreateIdentity201Response](docs/CreateIdentity201Response.md) - - [CreateIdentityRequest](docs/CreateIdentityRequest.md) - - [CreateOrganization201Response](docs/CreateOrganization201Response.md) - - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md) - - [DisableRequest](docs/DisableRequest.md) - - [EnableRequest](docs/EnableRequest.md) - - [Environment](docs/Environment.md) - - [EnvironmentAndResources](docs/EnvironmentAndResources.md) - - [Frontend](docs/Frontend.md) - - [GetSparklines200Response](docs/GetSparklines200Response.md) - - [GetSparklinesRequest](docs/GetSparklinesRequest.md) - - [InviteRequest](docs/InviteRequest.md) - - [InviteTokenGenerateRequest](docs/InviteTokenGenerateRequest.md) - - [ListFrontends200ResponseInner](docs/ListFrontends200ResponseInner.md) - - [ListMemberships200Response](docs/ListMemberships200Response.md) - - [ListMemberships200ResponseMembershipsInner](docs/ListMemberships200ResponseMembershipsInner.md) - - [ListOrganizationMembers200Response](docs/ListOrganizationMembers200Response.md) - - [ListOrganizationMembers200ResponseMembersInner](docs/ListOrganizationMembers200ResponseMembersInner.md) - - [ListOrganizations200Response](docs/ListOrganizations200Response.md) - - [ListOrganizations200ResponseOrganizationsInner](docs/ListOrganizations200ResponseOrganizationsInner.md) - - [LoginRequest](docs/LoginRequest.md) - - [Metrics](docs/Metrics.md) - - [MetricsSample](docs/MetricsSample.md) - - [Overview](docs/Overview.md) - - [Principal](docs/Principal.md) - - [RegenerateAccountToken200Response](docs/RegenerateAccountToken200Response.md) - - [RegenerateAccountTokenRequest](docs/RegenerateAccountTokenRequest.md) - - [RegisterRequest](docs/RegisterRequest.md) - - [RemoveOrganizationMemberRequest](docs/RemoveOrganizationMemberRequest.md) - - [ResetPasswordRequest](docs/ResetPasswordRequest.md) - - [Share](docs/Share.md) - - [ShareRequest](docs/ShareRequest.md) - - [ShareResponse](docs/ShareResponse.md) - - [SparkDataSample](docs/SparkDataSample.md) - - [UnaccessRequest](docs/UnaccessRequest.md) - - [UnshareRequest](docs/UnshareRequest.md) - - [UpdateAccessRequest](docs/UpdateAccessRequest.md) - - [UpdateFrontendRequest](docs/UpdateFrontendRequest.md) - - [UpdateShareRequest](docs/UpdateShareRequest.md) - - [Verify200Response](docs/Verify200Response.md) - - [VerifyRequest](docs/VerifyRequest.md) - - [VersionInventory200Response](docs/VersionInventory200Response.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### key - -- **Type**: API key -- **API key parameter name**: x-token -- **Location**: HTTP header - - -## Author - - - - diff --git a/sdk/python/src/docs/Access201Response.md b/sdk/python/src/docs/Access201Response.md deleted file mode 100644 index bc12a97a..00000000 --- a/sdk/python/src/docs/Access201Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# Access201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**backend_mode** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.access201_response import Access201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of Access201Response from a JSON string -access201_response_instance = Access201Response.from_json(json) -# print the JSON string representation of the object -print(Access201Response.to_json()) - -# convert the object into a dict -access201_response_dict = access201_response_instance.to_dict() -# create an instance of Access201Response from a dict -access201_response_from_dict = Access201Response.from_dict(access201_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/sdk/python/src/docs/AccessRequest.md b/sdk/python/src/docs/AccessRequest.md deleted file mode 100644 index 288b82ae..00000000 --- a/sdk/python/src/docs/AccessRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# AccessRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.access_request import AccessRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of AccessRequest from a JSON string -access_request_instance = AccessRequest.from_json(json) -# print the JSON string representation of the object -print(AccessRequest.to_json()) - -# convert the object into a dict -access_request_dict = access_request_instance.to_dict() -# create an instance of AccessRequest from a dict -access_request_from_dict = AccessRequest.from_dict(access_request_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/sdk/python/src/docs/AccountApi.md b/sdk/python/src/docs/AccountApi.md deleted file mode 100644 index cb6a3e97..00000000 --- a/sdk/python/src/docs/AccountApi.md +++ /dev/null @@ -1,557 +0,0 @@ -# zrok_api.AccountApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**change_password**](AccountApi.md#change_password) | **POST** /changePassword | -[**invite**](AccountApi.md#invite) | **POST** /invite | -[**login**](AccountApi.md#login) | **POST** /login | -[**regenerate_account_token**](AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | -[**register**](AccountApi.md#register) | **POST** /register | -[**reset_password**](AccountApi.md#reset_password) | **POST** /resetPassword | -[**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | -[**verify**](AccountApi.md#verify) | **POST** /verify | - - -# **change_password** -> change_password(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.ChangePasswordRequest() # ChangePasswordRequest | (optional) - - try: - api_instance.change_password(body=body) - except Exception as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ChangePasswordRequest**](ChangePasswordRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | password changed | - | -**400** | password not changed | - | -**401** | unauthorized | - | -**422** | password validation failure | - | -**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) - -# **invite** -> invite(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.invite_request import InviteRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.InviteRequest() # InviteRequest | (optional) - - try: - api_instance.invite(body=body) - except Exception as e: - print("Exception when calling AccountApi->invite: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**InviteRequest**](InviteRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | invitation created | - | -**400** | invitation not created (already exists) | - | -**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) - -# **login** -> str login(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.login_request import LoginRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.LoginRequest() # LoginRequest | (optional) - - try: - api_response = api_instance.login(body=body) - print("The response of AccountApi->login:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->login: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**LoginRequest**](LoginRequest.md)| | [optional] - -### Return type - -**str** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | login successful | - | -**401** | invalid login | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **regenerate_account_token** -> RegenerateAccountToken200Response regenerate_account_token(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) - - try: - api_response = api_instance.regenerate_account_token(body=body) - print("The response of AccountApi->regenerate_account_token:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] - -### Return type - -[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | regenerate account token | - | -**404** | account 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) - -# **register** -> RegenerateAccountToken200Response register(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.register_request import RegisterRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.RegisterRequest() # RegisterRequest | (optional) - - try: - api_response = api_instance.register(body=body) - print("The response of AccountApi->register:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->register: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegisterRequest**](RegisterRequest.md)| | [optional] - -### Return type - -[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | account created | - | -**404** | request not found | - | -**422** | password validation failure | - | -**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) - -# **reset_password** -> reset_password(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.ResetPasswordRequest() # ResetPasswordRequest | (optional) - - try: - api_instance.reset_password(body=body) - except Exception as e: - print("Exception when calling AccountApi->reset_password: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ResetPasswordRequest**](ResetPasswordRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | password reset | - | -**404** | request not found | - | -**422** | password validation failure | - | -**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) - -# **reset_password_request** -> reset_password_request(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.RegenerateAccountTokenRequest() # RegenerateAccountTokenRequest | (optional) - - try: - api_instance.reset_password_request(body=body) - except Exception as e: - print("Exception when calling AccountApi->reset_password_request: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegenerateAccountTokenRequest**](RegenerateAccountTokenRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | reset password request created | - | -**400** | reset password request not created | - | -**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) - -# **verify** -> Verify200Response verify(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AccountApi(api_client) - body = zrok_api.VerifyRequest() # VerifyRequest | (optional) - - try: - api_response = api_instance.verify(body=body) - print("The response of AccountApi->verify:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountApi->verify: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**VerifyRequest**](VerifyRequest.md)| | [optional] - -### Return type - -[**Verify200Response**](Verify200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | registration token ready | - | -**404** | registration token 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/sdk/python/src/docs/AddOrganizationMemberRequest.md b/sdk/python/src/docs/AddOrganizationMemberRequest.md deleted file mode 100644 index c866784a..00000000 --- a/sdk/python/src/docs/AddOrganizationMemberRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# AddOrganizationMemberRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of AddOrganizationMemberRequest from a JSON string -add_organization_member_request_instance = AddOrganizationMemberRequest.from_json(json) -# print the JSON string representation of the object -print(AddOrganizationMemberRequest.to_json()) - -# convert the object into a dict -add_organization_member_request_dict = add_organization_member_request_instance.to_dict() -# create an instance of AddOrganizationMemberRequest from a dict -add_organization_member_request_from_dict = AddOrganizationMemberRequest.from_dict(add_organization_member_request_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/sdk/python/src/docs/AdminApi.md b/sdk/python/src/docs/AdminApi.md deleted file mode 100644 index 7eec6028..00000000 --- a/sdk/python/src/docs/AdminApi.md +++ /dev/null @@ -1,1079 +0,0 @@ -# zrok_api.AdminApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_organization_member**](AdminApi.md#add_organization_member) | **POST** /organization/add | -[**create_account**](AdminApi.md#create_account) | **POST** /account | -[**create_frontend**](AdminApi.md#create_frontend) | **POST** /frontend | -[**create_identity**](AdminApi.md#create_identity) | **POST** /identity | -[**create_organization**](AdminApi.md#create_organization) | **POST** /organization | -[**delete_frontend**](AdminApi.md#delete_frontend) | **DELETE** /frontend | -[**delete_organization**](AdminApi.md#delete_organization) | **DELETE** /organization | -[**grants**](AdminApi.md#grants) | **POST** /grants | -[**invite_token_generate**](AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | -[**list_frontends**](AdminApi.md#list_frontends) | **GET** /frontends | -[**list_organization_members**](AdminApi.md#list_organization_members) | **POST** /organization/list | -[**list_organizations**](AdminApi.md#list_organizations) | **GET** /organizations | -[**remove_organization_member**](AdminApi.md#remove_organization_member) | **POST** /organization/remove | -[**update_frontend**](AdminApi.md#update_frontend) | **PATCH** /frontend | - - -# **add_organization_member** -> add_organization_member(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.AddOrganizationMemberRequest() # AddOrganizationMemberRequest | (optional) - - try: - api_instance.add_organization_member(body=body) - except Exception as e: - print("Exception when calling AdminApi->add_organization_member: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AddOrganizationMemberRequest**](AddOrganizationMemberRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | member added | - | -**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_account** -> RegenerateAccountToken200Response create_account(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.LoginRequest() # LoginRequest | (optional) - - try: - api_response = api_instance.create_account(body=body) - print("The response of AdminApi->create_account:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_account: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**LoginRequest**](LoginRequest.md)| | [optional] - -### Return type - -[**RegenerateAccountToken200Response**](RegenerateAccountToken200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | created | - | -**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) - -# **create_frontend** -> CreateFrontend201Response create_frontend(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateFrontendRequest() # CreateFrontendRequest | (optional) - - try: - api_response = api_instance.create_frontend(body=body) - print("The response of AdminApi->create_frontend:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_frontend: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateFrontendRequest**](CreateFrontendRequest.md)| | [optional] - -### Return type - -[**CreateFrontend201Response**](CreateFrontend201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | frontend created | - | -**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_identity** -> CreateIdentity201Response create_identity(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateIdentityRequest() # CreateIdentityRequest | (optional) - - try: - api_response = api_instance.create_identity(body=body) - print("The response of AdminApi->create_identity:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_identity: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateIdentityRequest**](CreateIdentityRequest.md)| | [optional] - -### Return type - -[**CreateIdentity201Response**](CreateIdentity201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | created | - | -**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) - -# **create_organization** -> CreateOrganization201Response create_organization(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateOrganizationRequest() # CreateOrganizationRequest | (optional) - - try: - api_response = api_instance.create_organization(body=body) - print("The response of AdminApi->create_organization:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->create_organization: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md)| | [optional] - -### Return type - -[**CreateOrganization201Response**](CreateOrganization201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | organization created | - | -**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) - -# **delete_frontend** -> delete_frontend(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateFrontend201Response() # CreateFrontend201Response | (optional) - - try: - api_instance.delete_frontend(body=body) - except Exception as e: - print("Exception when calling AdminApi->delete_frontend: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateFrontend201Response**](CreateFrontend201Response.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | frontend deleted | - | -**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) - -# **delete_organization** -> delete_organization(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) - - try: - api_instance.delete_organization(body=body) - except Exception as e: - print("Exception when calling AdminApi->delete_organization: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | organization deleted | - | -**401** | unauthorized | - | -**404** | organization 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) - -# **grants** -> grants(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.Verify200Response() # Verify200Response | (optional) - - try: - api_instance.grants(body=body) - except Exception as e: - print("Exception when calling AdminApi->grants: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Verify200Response**](Verify200Response.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **invite_token_generate** -> invite_token_generate(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.InviteTokenGenerateRequest() # InviteTokenGenerateRequest | (optional) - - try: - api_instance.invite_token_generate(body=body) - except Exception as e: - print("Exception when calling AdminApi->invite_token_generate: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**InviteTokenGenerateRequest**](InviteTokenGenerateRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | invite tokens created | - | -**400** | invite tokens not created | - | -**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) - -# **list_frontends** -> List[ListFrontends200ResponseInner] list_frontends() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - - try: - api_response = api_instance.list_frontends() - print("The response of AdminApi->list_frontends:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->list_frontends: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[ListFrontends200ResponseInner]**](ListFrontends200ResponseInner.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **list_organization_members** -> ListOrganizationMembers200Response list_organization_members(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.CreateOrganization201Response() # CreateOrganization201Response | (optional) - - try: - api_response = api_instance.list_organization_members(body=body) - print("The response of AdminApi->list_organization_members:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->list_organization_members: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**CreateOrganization201Response**](CreateOrganization201Response.md)| | [optional] - -### Return type - -[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | list organization members | - | -**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_organizations** -> ListOrganizations200Response list_organizations() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - - try: - api_response = api_instance.list_organizations() - print("The response of AdminApi->list_organizations:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AdminApi->list_organizations: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ListOrganizations200Response**](ListOrganizations200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **remove_organization_member** -> remove_organization_member(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.RemoveOrganizationMemberRequest() # RemoveOrganizationMemberRequest | (optional) - - try: - api_instance.remove_organization_member(body=body) - except Exception as e: - print("Exception when calling AdminApi->remove_organization_member: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RemoveOrganizationMemberRequest**](RemoveOrganizationMemberRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | member removed | - | -**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_frontend** -> update_frontend(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.AdminApi(api_client) - body = zrok_api.UpdateFrontendRequest() # UpdateFrontendRequest | (optional) - - try: - api_instance.update_frontend(body=body) - except Exception as e: - print("Exception when calling AdminApi->update_frontend: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UpdateFrontendRequest**](UpdateFrontendRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | frontend updated | - | -**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/sdk/python/src/docs/AuthUser.md b/sdk/python/src/docs/AuthUser.md deleted file mode 100644 index 99960687..00000000 --- a/sdk/python/src/docs/AuthUser.md +++ /dev/null @@ -1,30 +0,0 @@ -# AuthUser - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.auth_user import AuthUser - -# TODO update the JSON string below -json = "{}" -# create an instance of AuthUser from a JSON string -auth_user_instance = AuthUser.from_json(json) -# print the JSON string representation of the object -print(AuthUser.to_json()) - -# convert the object into a dict -auth_user_dict = auth_user_instance.to_dict() -# create an instance of AuthUser from a dict -auth_user_from_dict = AuthUser.from_dict(auth_user_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/sdk/python/src/docs/ChangePasswordRequest.md b/sdk/python/src/docs/ChangePasswordRequest.md deleted file mode 100644 index 5fea099e..00000000 --- a/sdk/python/src/docs/ChangePasswordRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# ChangePasswordRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**old_password** | **str** | | [optional] -**new_password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.change_password_request import ChangePasswordRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ChangePasswordRequest from a JSON string -change_password_request_instance = ChangePasswordRequest.from_json(json) -# print the JSON string representation of the object -print(ChangePasswordRequest.to_json()) - -# convert the object into a dict -change_password_request_dict = change_password_request_instance.to_dict() -# create an instance of ChangePasswordRequest from a dict -change_password_request_from_dict = ChangePasswordRequest.from_dict(change_password_request_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/sdk/python/src/docs/ClientVersionCheckRequest.md b/sdk/python/src/docs/ClientVersionCheckRequest.md deleted file mode 100644 index 53d9e16e..00000000 --- a/sdk/python/src/docs/ClientVersionCheckRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# ClientVersionCheckRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ClientVersionCheckRequest from a JSON string -client_version_check_request_instance = ClientVersionCheckRequest.from_json(json) -# print the JSON string representation of the object -print(ClientVersionCheckRequest.to_json()) - -# convert the object into a dict -client_version_check_request_dict = client_version_check_request_instance.to_dict() -# create an instance of ClientVersionCheckRequest from a dict -client_version_check_request_from_dict = ClientVersionCheckRequest.from_dict(client_version_check_request_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/sdk/python/src/docs/Configuration.md b/sdk/python/src/docs/Configuration.md deleted file mode 100644 index 07eec945..00000000 --- a/sdk/python/src/docs/Configuration.md +++ /dev/null @@ -1,33 +0,0 @@ -# Configuration - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **str** | | [optional] -**tou_link** | **str** | | [optional] -**invites_open** | **bool** | | [optional] -**requires_invite_token** | **bool** | | [optional] -**invite_token_contact** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.configuration import Configuration - -# TODO update the JSON string below -json = "{}" -# create an instance of Configuration from a JSON string -configuration_instance = Configuration.from_json(json) -# print the JSON string representation of the object -print(Configuration.to_json()) - -# convert the object into a dict -configuration_dict = configuration_instance.to_dict() -# create an instance of Configuration from a dict -configuration_from_dict = Configuration.from_dict(configuration_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/sdk/python/src/docs/CreateFrontend201Response.md b/sdk/python/src/docs/CreateFrontend201Response.md deleted file mode 100644 index 7239add1..00000000 --- a/sdk/python/src/docs/CreateFrontend201Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateFrontend201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_frontend201_response import CreateFrontend201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateFrontend201Response from a JSON string -create_frontend201_response_instance = CreateFrontend201Response.from_json(json) -# print the JSON string representation of the object -print(CreateFrontend201Response.to_json()) - -# convert the object into a dict -create_frontend201_response_dict = create_frontend201_response_instance.to_dict() -# create an instance of CreateFrontend201Response from a dict -create_frontend201_response_from_dict = CreateFrontend201Response.from_dict(create_frontend201_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/sdk/python/src/docs/CreateFrontendRequest.md b/sdk/python/src/docs/CreateFrontendRequest.md deleted file mode 100644 index 63fe8779..00000000 --- a/sdk/python/src/docs/CreateFrontendRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# CreateFrontendRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**permission_mode** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_frontend_request import CreateFrontendRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateFrontendRequest from a JSON string -create_frontend_request_instance = CreateFrontendRequest.from_json(json) -# print the JSON string representation of the object -print(CreateFrontendRequest.to_json()) - -# convert the object into a dict -create_frontend_request_dict = create_frontend_request_instance.to_dict() -# create an instance of CreateFrontendRequest from a dict -create_frontend_request_from_dict = CreateFrontendRequest.from_dict(create_frontend_request_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/sdk/python/src/docs/CreateIdentity201Response.md b/sdk/python/src/docs/CreateIdentity201Response.md deleted file mode 100644 index 245275e2..00000000 --- a/sdk/python/src/docs/CreateIdentity201Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# CreateIdentity201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] -**cfg** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_identity201_response import CreateIdentity201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateIdentity201Response from a JSON string -create_identity201_response_instance = CreateIdentity201Response.from_json(json) -# print the JSON string representation of the object -print(CreateIdentity201Response.to_json()) - -# convert the object into a dict -create_identity201_response_dict = create_identity201_response_instance.to_dict() -# create an instance of CreateIdentity201Response from a dict -create_identity201_response_from_dict = CreateIdentity201Response.from_dict(create_identity201_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/sdk/python/src/docs/CreateIdentityRequest.md b/sdk/python/src/docs/CreateIdentityRequest.md deleted file mode 100644 index 50cb9457..00000000 --- a/sdk/python/src/docs/CreateIdentityRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateIdentityRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_identity_request import CreateIdentityRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateIdentityRequest from a JSON string -create_identity_request_instance = CreateIdentityRequest.from_json(json) -# print the JSON string representation of the object -print(CreateIdentityRequest.to_json()) - -# convert the object into a dict -create_identity_request_dict = create_identity_request_instance.to_dict() -# create an instance of CreateIdentityRequest from a dict -create_identity_request_from_dict = CreateIdentityRequest.from_dict(create_identity_request_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/sdk/python/src/docs/CreateOrganization201Response.md b/sdk/python/src/docs/CreateOrganization201Response.md deleted file mode 100644 index 26bc640c..00000000 --- a/sdk/python/src/docs/CreateOrganization201Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateOrganization201Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_organization201_response import CreateOrganization201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateOrganization201Response from a JSON string -create_organization201_response_instance = CreateOrganization201Response.from_json(json) -# print the JSON string representation of the object -print(CreateOrganization201Response.to_json()) - -# convert the object into a dict -create_organization201_response_dict = create_organization201_response_instance.to_dict() -# create an instance of CreateOrganization201Response from a dict -create_organization201_response_from_dict = CreateOrganization201Response.from_dict(create_organization201_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/sdk/python/src/docs/CreateOrganizationRequest.md b/sdk/python/src/docs/CreateOrganizationRequest.md deleted file mode 100644 index 458e339b..00000000 --- a/sdk/python/src/docs/CreateOrganizationRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateOrganizationRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.create_organization_request import CreateOrganizationRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateOrganizationRequest from a JSON string -create_organization_request_instance = CreateOrganizationRequest.from_json(json) -# print the JSON string representation of the object -print(CreateOrganizationRequest.to_json()) - -# convert the object into a dict -create_organization_request_dict = create_organization_request_instance.to_dict() -# create an instance of CreateOrganizationRequest from a dict -create_organization_request_from_dict = CreateOrganizationRequest.from_dict(create_organization_request_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/sdk/python/src/docs/DisableRequest.md b/sdk/python/src/docs/DisableRequest.md deleted file mode 100644 index 4e4490f1..00000000 --- a/sdk/python/src/docs/DisableRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# DisableRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.disable_request import DisableRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of DisableRequest from a JSON string -disable_request_instance = DisableRequest.from_json(json) -# print the JSON string representation of the object -print(DisableRequest.to_json()) - -# convert the object into a dict -disable_request_dict = disable_request_instance.to_dict() -# create an instance of DisableRequest from a dict -disable_request_from_dict = DisableRequest.from_dict(disable_request_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/sdk/python/src/docs/EnableRequest.md b/sdk/python/src/docs/EnableRequest.md deleted file mode 100644 index 7720b3b9..00000000 --- a/sdk/python/src/docs/EnableRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# EnableRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**host** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.enable_request import EnableRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of EnableRequest from a JSON string -enable_request_instance = EnableRequest.from_json(json) -# print the JSON string representation of the object -print(EnableRequest.to_json()) - -# convert the object into a dict -enable_request_dict = enable_request_instance.to_dict() -# create an instance of EnableRequest from a dict -enable_request_from_dict = EnableRequest.from_dict(enable_request_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/sdk/python/src/docs/Environment.md b/sdk/python/src/docs/Environment.md deleted file mode 100644 index 44a9356b..00000000 --- a/sdk/python/src/docs/Environment.md +++ /dev/null @@ -1,36 +0,0 @@ -# Environment - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**host** | **str** | | [optional] -**address** | **str** | | [optional] -**z_id** | **str** | | [optional] -**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] -**limited** | **bool** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.environment import Environment - -# TODO update the JSON string below -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()) - -# convert the object into a dict -environment_dict = environment_instance.to_dict() -# create an instance of Environment from a dict -environment_from_dict = Environment.from_dict(environment_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/sdk/python/src/docs/EnvironmentAndResources.md b/sdk/python/src/docs/EnvironmentAndResources.md deleted file mode 100644 index a218ae3c..00000000 --- a/sdk/python/src/docs/EnvironmentAndResources.md +++ /dev/null @@ -1,31 +0,0 @@ -# EnvironmentAndResources - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**environment** | [**Environment**](Environment.md) | | [optional] -**frontends** | [**List[Frontend]**](Frontend.md) | | [optional] -**shares** | [**List[Share]**](Share.md) | | [optional] - -## Example - -```python -from zrok_api.models.environment_and_resources import EnvironmentAndResources - -# TODO update the JSON string below -json = "{}" -# create an instance of EnvironmentAndResources from a JSON string -environment_and_resources_instance = EnvironmentAndResources.from_json(json) -# print the JSON string representation of the object -print(EnvironmentAndResources.to_json()) - -# convert the object into a dict -environment_and_resources_dict = environment_and_resources_instance.to_dict() -# create an instance of EnvironmentAndResources from a dict -environment_and_resources_from_dict = EnvironmentAndResources.from_dict(environment_and_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/sdk/python/src/docs/EnvironmentApi.md b/sdk/python/src/docs/EnvironmentApi.md deleted file mode 100644 index a50ae1d3..00000000 --- a/sdk/python/src/docs/EnvironmentApi.md +++ /dev/null @@ -1,162 +0,0 @@ -# zrok_api.EnvironmentApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**disable**](EnvironmentApi.md#disable) | **POST** /disable | -[**enable**](EnvironmentApi.md#enable) | **POST** /enable | - - -# **disable** -> disable(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.disable_request import DisableRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.EnvironmentApi(api_client) - body = zrok_api.DisableRequest() # DisableRequest | (optional) - - try: - api_instance.disable(body=body) - except Exception as e: - print("Exception when calling EnvironmentApi->disable: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DisableRequest**](DisableRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | environment disabled | - | -**401** | invalid environment | - | -**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) - -# **enable** -> CreateIdentity201Response enable(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.enable_request import EnableRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.EnvironmentApi(api_client) - body = zrok_api.EnableRequest() # EnableRequest | (optional) - - try: - api_response = api_instance.enable(body=body) - print("The response of EnvironmentApi->enable:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EnvironmentApi->enable: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**EnableRequest**](EnableRequest.md)| | [optional] - -### Return type - -[**CreateIdentity201Response**](CreateIdentity201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | environment enabled | - | -**401** | unauthorized | - | -**404** | account 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/sdk/python/src/docs/Frontend.md b/sdk/python/src/docs/Frontend.md deleted file mode 100644 index ce41a9b7..00000000 --- a/sdk/python/src/docs/Frontend.md +++ /dev/null @@ -1,37 +0,0 @@ -# Frontend - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**frontend_token** | **str** | | [optional] -**share_token** | **str** | | [optional] -**backend_mode** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] -**z_id** | **str** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.frontend import Frontend - -# TODO update the JSON string below -json = "{}" -# create an instance of Frontend from a JSON string -frontend_instance = Frontend.from_json(json) -# print the JSON string representation of the object -print(Frontend.to_json()) - -# convert the object into a dict -frontend_dict = frontend_instance.to_dict() -# create an instance of Frontend from a dict -frontend_from_dict = Frontend.from_dict(frontend_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/sdk/python/src/docs/GetSparklines200Response.md b/sdk/python/src/docs/GetSparklines200Response.md deleted file mode 100644 index 66528c7e..00000000 --- a/sdk/python/src/docs/GetSparklines200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetSparklines200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sparklines** | [**List[Metrics]**](Metrics.md) | | [optional] - -## Example - -```python -from zrok_api.models.get_sparklines200_response import GetSparklines200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetSparklines200Response from a JSON string -get_sparklines200_response_instance = GetSparklines200Response.from_json(json) -# print the JSON string representation of the object -print(GetSparklines200Response.to_json()) - -# convert the object into a dict -get_sparklines200_response_dict = get_sparklines200_response_instance.to_dict() -# create an instance of GetSparklines200Response from a dict -get_sparklines200_response_from_dict = GetSparklines200Response.from_dict(get_sparklines200_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/sdk/python/src/docs/GetSparklinesRequest.md b/sdk/python/src/docs/GetSparklinesRequest.md deleted file mode 100644 index 29369ebc..00000000 --- a/sdk/python/src/docs/GetSparklinesRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# GetSparklinesRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | **bool** | | [optional] -**environments** | **List[str]** | | [optional] -**shares** | **List[str]** | | [optional] - -## Example - -```python -from zrok_api.models.get_sparklines_request import GetSparklinesRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of GetSparklinesRequest from a JSON string -get_sparklines_request_instance = GetSparklinesRequest.from_json(json) -# print the JSON string representation of the object -print(GetSparklinesRequest.to_json()) - -# convert the object into a dict -get_sparklines_request_dict = get_sparklines_request_instance.to_dict() -# create an instance of GetSparklinesRequest from a dict -get_sparklines_request_from_dict = GetSparklinesRequest.from_dict(get_sparklines_request_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/sdk/python/src/docs/InviteRequest.md b/sdk/python/src/docs/InviteRequest.md deleted file mode 100644 index 039132e8..00000000 --- a/sdk/python/src/docs/InviteRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# InviteRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**invite_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.invite_request import InviteRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of InviteRequest from a JSON string -invite_request_instance = InviteRequest.from_json(json) -# print the JSON string representation of the object -print(InviteRequest.to_json()) - -# convert the object into a dict -invite_request_dict = invite_request_instance.to_dict() -# create an instance of InviteRequest from a dict -invite_request_from_dict = InviteRequest.from_dict(invite_request_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/sdk/python/src/docs/InviteTokenGenerateRequest.md b/sdk/python/src/docs/InviteTokenGenerateRequest.md deleted file mode 100644 index 33a20d70..00000000 --- a/sdk/python/src/docs/InviteTokenGenerateRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# InviteTokenGenerateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invite_tokens** | **List[str]** | | [optional] - -## Example - -```python -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of InviteTokenGenerateRequest from a JSON string -invite_token_generate_request_instance = InviteTokenGenerateRequest.from_json(json) -# print the JSON string representation of the object -print(InviteTokenGenerateRequest.to_json()) - -# convert the object into a dict -invite_token_generate_request_dict = invite_token_generate_request_instance.to_dict() -# create an instance of InviteTokenGenerateRequest from a dict -invite_token_generate_request_from_dict = InviteTokenGenerateRequest.from_dict(invite_token_generate_request_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/sdk/python/src/docs/ListFrontends200ResponseInner.md b/sdk/python/src/docs/ListFrontends200ResponseInner.md deleted file mode 100644 index 625ea343..00000000 --- a/sdk/python/src/docs/ListFrontends200ResponseInner.md +++ /dev/null @@ -1,34 +0,0 @@ -# ListFrontends200ResponseInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListFrontends200ResponseInner from a JSON string -list_frontends200_response_inner_instance = ListFrontends200ResponseInner.from_json(json) -# print the JSON string representation of the object -print(ListFrontends200ResponseInner.to_json()) - -# convert the object into a dict -list_frontends200_response_inner_dict = list_frontends200_response_inner_instance.to_dict() -# create an instance of ListFrontends200ResponseInner from a dict -list_frontends200_response_inner_from_dict = ListFrontends200ResponseInner.from_dict(list_frontends200_response_inner_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/sdk/python/src/docs/ListMemberships200Response.md b/sdk/python/src/docs/ListMemberships200Response.md deleted file mode 100644 index 48e19dbf..00000000 --- a/sdk/python/src/docs/ListMemberships200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListMemberships200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**memberships** | [**List[ListMemberships200ResponseMembershipsInner]**](ListMemberships200ResponseMembershipsInner.md) | | [optional] - -## Example - -```python -from zrok_api.models.list_memberships200_response import ListMemberships200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListMemberships200Response from a JSON string -list_memberships200_response_instance = ListMemberships200Response.from_json(json) -# print the JSON string representation of the object -print(ListMemberships200Response.to_json()) - -# convert the object into a dict -list_memberships200_response_dict = list_memberships200_response_instance.to_dict() -# create an instance of ListMemberships200Response from a dict -list_memberships200_response_from_dict = ListMemberships200Response.from_dict(list_memberships200_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/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md b/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md deleted file mode 100644 index e85c7440..00000000 --- a/sdk/python/src/docs/ListMemberships200ResponseMembershipsInner.md +++ /dev/null @@ -1,31 +0,0 @@ -# ListMemberships200ResponseMembershipsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListMemberships200ResponseMembershipsInner from a JSON string -list_memberships200_response_memberships_inner_instance = ListMemberships200ResponseMembershipsInner.from_json(json) -# print the JSON string representation of the object -print(ListMemberships200ResponseMembershipsInner.to_json()) - -# convert the object into a dict -list_memberships200_response_memberships_inner_dict = list_memberships200_response_memberships_inner_instance.to_dict() -# create an instance of ListMemberships200ResponseMembershipsInner from a dict -list_memberships200_response_memberships_inner_from_dict = ListMemberships200ResponseMembershipsInner.from_dict(list_memberships200_response_memberships_inner_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/sdk/python/src/docs/ListOrganizationMembers200Response.md b/sdk/python/src/docs/ListOrganizationMembers200Response.md deleted file mode 100644 index e05a28bf..00000000 --- a/sdk/python/src/docs/ListOrganizationMembers200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListOrganizationMembers200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**members** | [**List[ListOrganizationMembers200ResponseMembersInner]**](ListOrganizationMembers200ResponseMembersInner.md) | | [optional] - -## Example - -```python -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizationMembers200Response from a JSON string -list_organization_members200_response_instance = ListOrganizationMembers200Response.from_json(json) -# print the JSON string representation of the object -print(ListOrganizationMembers200Response.to_json()) - -# convert the object into a dict -list_organization_members200_response_dict = list_organization_members200_response_instance.to_dict() -# create an instance of ListOrganizationMembers200Response from a dict -list_organization_members200_response_from_dict = ListOrganizationMembers200Response.from_dict(list_organization_members200_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/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md b/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md deleted file mode 100644 index 8ebbb35e..00000000 --- a/sdk/python/src/docs/ListOrganizationMembers200ResponseMembersInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListOrganizationMembers200ResponseMembersInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizationMembers200ResponseMembersInner from a JSON string -list_organization_members200_response_members_inner_instance = ListOrganizationMembers200ResponseMembersInner.from_json(json) -# print the JSON string representation of the object -print(ListOrganizationMembers200ResponseMembersInner.to_json()) - -# convert the object into a dict -list_organization_members200_response_members_inner_dict = list_organization_members200_response_members_inner_instance.to_dict() -# create an instance of ListOrganizationMembers200ResponseMembersInner from a dict -list_organization_members200_response_members_inner_from_dict = ListOrganizationMembers200ResponseMembersInner.from_dict(list_organization_members200_response_members_inner_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/sdk/python/src/docs/ListOrganizations200Response.md b/sdk/python/src/docs/ListOrganizations200Response.md deleted file mode 100644 index 46fe4d60..00000000 --- a/sdk/python/src/docs/ListOrganizations200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# ListOrganizations200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organizations** | [**List[ListOrganizations200ResponseOrganizationsInner]**](ListOrganizations200ResponseOrganizationsInner.md) | | [optional] - -## Example - -```python -from zrok_api.models.list_organizations200_response import ListOrganizations200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizations200Response from a JSON string -list_organizations200_response_instance = ListOrganizations200Response.from_json(json) -# print the JSON string representation of the object -print(ListOrganizations200Response.to_json()) - -# convert the object into a dict -list_organizations200_response_dict = list_organizations200_response_instance.to_dict() -# create an instance of ListOrganizations200Response from a dict -list_organizations200_response_from_dict = ListOrganizations200Response.from_dict(list_organizations200_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/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md b/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md deleted file mode 100644 index 468447f2..00000000 --- a/sdk/python/src/docs/ListOrganizations200ResponseOrganizationsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListOrganizations200ResponseOrganizationsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of ListOrganizations200ResponseOrganizationsInner from a JSON string -list_organizations200_response_organizations_inner_instance = ListOrganizations200ResponseOrganizationsInner.from_json(json) -# print the JSON string representation of the object -print(ListOrganizations200ResponseOrganizationsInner.to_json()) - -# convert the object into a dict -list_organizations200_response_organizations_inner_dict = list_organizations200_response_organizations_inner_instance.to_dict() -# create an instance of ListOrganizations200ResponseOrganizationsInner from a dict -list_organizations200_response_organizations_inner_from_dict = ListOrganizations200ResponseOrganizationsInner.from_dict(list_organizations200_response_organizations_inner_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/sdk/python/src/docs/LoginRequest.md b/sdk/python/src/docs/LoginRequest.md deleted file mode 100644 index 05728618..00000000 --- a/sdk/python/src/docs/LoginRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# LoginRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.login_request import LoginRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of LoginRequest from a JSON string -login_request_instance = LoginRequest.from_json(json) -# print the JSON string representation of the object -print(LoginRequest.to_json()) - -# convert the object into a dict -login_request_dict = login_request_instance.to_dict() -# create an instance of LoginRequest from a dict -login_request_from_dict = LoginRequest.from_dict(login_request_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/sdk/python/src/docs/MetadataApi.md b/sdk/python/src/docs/MetadataApi.md deleted file mode 100644 index ecb0cf8b..00000000 --- a/sdk/python/src/docs/MetadataApi.md +++ /dev/null @@ -1,1171 +0,0 @@ -# zrok_api.MetadataApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**client_version_check**](MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | -[**configuration**](MetadataApi.md#configuration) | **GET** /configuration | -[**get_account_detail**](MetadataApi.md#get_account_detail) | **GET** /detail/account | -[**get_account_metrics**](MetadataApi.md#get_account_metrics) | **GET** /metrics/account | -[**get_environment_detail**](MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | -[**get_environment_metrics**](MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | -[**get_frontend_detail**](MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | -[**get_share_detail**](MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | -[**get_share_metrics**](MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | -[**get_sparklines**](MetadataApi.md#get_sparklines) | **POST** /sparklines | -[**list_memberships**](MetadataApi.md#list_memberships) | **GET** /memberships | -[**list_org_members**](MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | -[**org_account_overview**](MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | -[**overview**](MetadataApi.md#overview) | **GET** /overview | -[**version**](MetadataApi.md#version) | **GET** /version | -[**version_inventory**](MetadataApi.md#version_inventory) | **GET** /versions | - - -# **client_version_check** -> client_version_check(body=body) - -### Example - - -```python -import zrok_api -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - body = zrok_api.ClientVersionCheckRequest() # ClientVersionCheckRequest | (optional) - - try: - api_instance.client_version_check(body=body) - except Exception as e: - print("Exception when calling MetadataApi->client_version_check: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ClientVersionCheckRequest**](ClientVersionCheckRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | compatible | - | -**400** | not compatible | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **configuration** -> Configuration configuration() - -### Example - - -```python -import zrok_api -from zrok_api.models.configuration import Configuration -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.configuration() - print("The response of MetadataApi->configuration:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->configuration: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Configuration**](Configuration.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | current configuration | - | - -[[Back to top]](#) [[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_account_detail** -> List[Environment] get_account_detail() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.environment import Environment -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.get_account_detail() - print("The response of MetadataApi->get_account_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_account_detail: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[Environment]**](Environment.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_account_metrics** -> Metrics get_account_metrics(duration=duration) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.metrics import Metrics -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - duration = 'duration_example' # str | (optional) - - try: - api_response = api_instance.get_account_metrics(duration=duration) - print("The response of MetadataApi->get_account_metrics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | account metrics | - | -**400** | bad request | - | -**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_environment_detail** -> EnvironmentAndResources get_environment_detail(env_zid) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - env_zid = 'env_zid_example' # str | - - try: - api_response = api_instance.get_environment_detail(env_zid) - print("The response of MetadataApi->get_environment_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_zid** | **str**| | - -### Return type - -[**EnvironmentAndResources**](EnvironmentAndResources.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_environment_metrics** -> Metrics get_environment_metrics(env_id, duration=duration) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.metrics import Metrics -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - env_id = 'env_id_example' # str | - duration = 'duration_example' # str | (optional) - - try: - api_response = api_instance.get_environment_metrics(env_id, duration=duration) - print("The response of MetadataApi->get_environment_metrics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_id** | **str**| | - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | environment metrics | - | -**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) - -# **get_frontend_detail** -> Frontend get_frontend_detail(frontend_id) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.frontend import Frontend -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - frontend_id = 56 # int | - - try: - api_response = api_instance.get_frontend_detail(frontend_id) - print("The response of MetadataApi->get_frontend_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **frontend_id** | **int**| | - -### Return type - -[**Frontend**](Frontend.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_share_detail** -> Share get_share_detail(share_token) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.share import Share -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - share_token = 'share_token_example' # str | - - try: - api_response = api_instance.get_share_detail(share_token) - print("The response of MetadataApi->get_share_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_share_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_token** | **str**| | - -### Return type - -[**Share**](Share.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_share_metrics** -> Metrics get_share_metrics(share_token, duration=duration) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.metrics import Metrics -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - share_token = 'share_token_example' # str | - duration = 'duration_example' # str | (optional) - - try: - api_response = api_instance.get_share_metrics(share_token, duration=duration) - print("The response of MetadataApi->get_share_metrics:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_token** | **str**| | - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | share metrics | - | -**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) - -# **get_sparklines** -> GetSparklines200Response get_sparklines(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - body = zrok_api.GetSparklinesRequest() # GetSparklinesRequest | (optional) - - try: - api_response = api_instance.get_sparklines(body=body) - print("The response of MetadataApi->get_sparklines:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->get_sparklines: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**GetSparklinesRequest**](GetSparklinesRequest.md)| | [optional] - -### Return type - -[**GetSparklines200Response**](GetSparklines200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | sparklines data | - | -**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) - -# **list_memberships** -> ListMemberships200Response list_memberships() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.list_memberships() - print("The response of MetadataApi->list_memberships:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->list_memberships: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ListMemberships200Response**](ListMemberships200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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_org_members** -> ListOrganizationMembers200Response list_org_members(organization_token) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - organization_token = 'organization_token_example' # str | - - try: - api_response = api_instance.list_org_members(organization_token) - print("The response of MetadataApi->list_org_members:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->list_org_members: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_token** | **str**| | - -### Return type - -[**ListOrganizationMembers200Response**](ListOrganizationMembers200Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **org_account_overview** -> Overview org_account_overview(organization_token, account_email) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.overview import Overview -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - organization_token = 'organization_token_example' # str | - account_email = 'account_email_example' # str | - - try: - api_response = api_instance.org_account_overview(organization_token, account_email) - print("The response of MetadataApi->org_account_overview:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->org_account_overview: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_token** | **str**| | - **account_email** | **str**| | - -### Return type - -[**Overview**](Overview.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | -**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) - -# **overview** -> Overview overview() - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.overview import Overview -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.overview() - print("The response of MetadataApi->overview:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->overview: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Overview**](Overview.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | overview returned | - | -**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) - -# **version** -> str version() - -### Example - - -```python -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.version() - print("The response of MetadataApi->version:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->version: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**str** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | legacy upgrade required | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **version_inventory** -> VersionInventory200Response version_inventory() - -### Example - - -```python -import zrok_api -from zrok_api.models.version_inventory200_response import VersionInventory200Response -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/v1" -) - - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.MetadataApi(api_client) - - try: - api_response = api_instance.version_inventory() - print("The response of MetadataApi->version_inventory:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MetadataApi->version_inventory: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**VersionInventory200Response**](VersionInventory200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | ok | - | - -[[Back to top]](#) [[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/sdk/python/src/docs/Metrics.md b/sdk/python/src/docs/Metrics.md deleted file mode 100644 index 9216f700..00000000 --- a/sdk/python/src/docs/Metrics.md +++ /dev/null @@ -1,32 +0,0 @@ -# Metrics - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope** | **str** | | [optional] -**id** | **str** | | [optional] -**period** | **float** | | [optional] -**samples** | [**List[MetricsSample]**](MetricsSample.md) | | [optional] - -## Example - -```python -from zrok_api.models.metrics import Metrics - -# TODO update the JSON string below -json = "{}" -# create an instance of Metrics from a JSON string -metrics_instance = Metrics.from_json(json) -# print the JSON string representation of the object -print(Metrics.to_json()) - -# convert the object into a dict -metrics_dict = metrics_instance.to_dict() -# create an instance of Metrics from a dict -metrics_from_dict = Metrics.from_dict(metrics_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/sdk/python/src/docs/MetricsSample.md b/sdk/python/src/docs/MetricsSample.md deleted file mode 100644 index 96c1d94e..00000000 --- a/sdk/python/src/docs/MetricsSample.md +++ /dev/null @@ -1,31 +0,0 @@ -# MetricsSample - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rx** | **float** | | [optional] -**tx** | **float** | | [optional] -**timestamp** | **float** | | [optional] - -## Example - -```python -from zrok_api.models.metrics_sample import MetricsSample - -# TODO update the JSON string below -json = "{}" -# create an instance of MetricsSample from a JSON string -metrics_sample_instance = MetricsSample.from_json(json) -# print the JSON string representation of the object -print(MetricsSample.to_json()) - -# convert the object into a dict -metrics_sample_dict = metrics_sample_instance.to_dict() -# create an instance of MetricsSample from a dict -metrics_sample_from_dict = MetricsSample.from_dict(metrics_sample_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/sdk/python/src/docs/Overview.md b/sdk/python/src/docs/Overview.md deleted file mode 100644 index f50d6232..00000000 --- a/sdk/python/src/docs/Overview.md +++ /dev/null @@ -1,30 +0,0 @@ -# Overview - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_limited** | **bool** | | [optional] -**environments** | [**List[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional] - -## Example - -```python -from zrok_api.models.overview import Overview - -# TODO update the JSON string below -json = "{}" -# create an instance of Overview from a JSON string -overview_instance = Overview.from_json(json) -# print the JSON string representation of the object -print(Overview.to_json()) - -# convert the object into a dict -overview_dict = overview_instance.to_dict() -# create an instance of Overview from a dict -overview_from_dict = Overview.from_dict(overview_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/sdk/python/src/docs/Principal.md b/sdk/python/src/docs/Principal.md deleted file mode 100644 index 0a6d399c..00000000 --- a/sdk/python/src/docs/Principal.md +++ /dev/null @@ -1,33 +0,0 @@ -# Principal - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**email** | **str** | | [optional] -**token** | **str** | | [optional] -**limitless** | **bool** | | [optional] -**admin** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.principal import Principal - -# TODO update the JSON string below -json = "{}" -# create an instance of Principal from a JSON string -principal_instance = Principal.from_json(json) -# print the JSON string representation of the object -print(Principal.to_json()) - -# convert the object into a dict -principal_dict = principal_instance.to_dict() -# create an instance of Principal from a dict -principal_from_dict = Principal.from_dict(principal_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/sdk/python/src/docs/RegenerateAccountToken200Response.md b/sdk/python/src/docs/RegenerateAccountToken200Response.md deleted file mode 100644 index e86cc294..00000000 --- a/sdk/python/src/docs/RegenerateAccountToken200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# RegenerateAccountToken200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of RegenerateAccountToken200Response from a JSON string -regenerate_account_token200_response_instance = RegenerateAccountToken200Response.from_json(json) -# print the JSON string representation of the object -print(RegenerateAccountToken200Response.to_json()) - -# convert the object into a dict -regenerate_account_token200_response_dict = regenerate_account_token200_response_instance.to_dict() -# create an instance of RegenerateAccountToken200Response from a dict -regenerate_account_token200_response_from_dict = RegenerateAccountToken200Response.from_dict(regenerate_account_token200_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/sdk/python/src/docs/RegenerateAccountTokenRequest.md b/sdk/python/src/docs/RegenerateAccountTokenRequest.md deleted file mode 100644 index 113262a6..00000000 --- a/sdk/python/src/docs/RegenerateAccountTokenRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# RegenerateAccountTokenRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RegenerateAccountTokenRequest from a JSON string -regenerate_account_token_request_instance = RegenerateAccountTokenRequest.from_json(json) -# print the JSON string representation of the object -print(RegenerateAccountTokenRequest.to_json()) - -# convert the object into a dict -regenerate_account_token_request_dict = regenerate_account_token_request_instance.to_dict() -# create an instance of RegenerateAccountTokenRequest from a dict -regenerate_account_token_request_from_dict = RegenerateAccountTokenRequest.from_dict(regenerate_account_token_request_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/sdk/python/src/docs/RegisterRequest.md b/sdk/python/src/docs/RegisterRequest.md deleted file mode 100644 index 6e268aff..00000000 --- a/sdk/python/src/docs/RegisterRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# RegisterRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.register_request import RegisterRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RegisterRequest from a JSON string -register_request_instance = RegisterRequest.from_json(json) -# print the JSON string representation of the object -print(RegisterRequest.to_json()) - -# convert the object into a dict -register_request_dict = register_request_instance.to_dict() -# create an instance of RegisterRequest from a dict -register_request_from_dict = RegisterRequest.from_dict(register_request_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/sdk/python/src/docs/RemoveOrganizationMemberRequest.md b/sdk/python/src/docs/RemoveOrganizationMemberRequest.md deleted file mode 100644 index 75743291..00000000 --- a/sdk/python/src/docs/RemoveOrganizationMemberRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# RemoveOrganizationMemberRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RemoveOrganizationMemberRequest from a JSON string -remove_organization_member_request_instance = RemoveOrganizationMemberRequest.from_json(json) -# print the JSON string representation of the object -print(RemoveOrganizationMemberRequest.to_json()) - -# convert the object into a dict -remove_organization_member_request_dict = remove_organization_member_request_instance.to_dict() -# create an instance of RemoveOrganizationMemberRequest from a dict -remove_organization_member_request_from_dict = RemoveOrganizationMemberRequest.from_dict(remove_organization_member_request_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/sdk/python/src/docs/ResetPasswordRequest.md b/sdk/python/src/docs/ResetPasswordRequest.md deleted file mode 100644 index e91e841a..00000000 --- a/sdk/python/src/docs/ResetPasswordRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# ResetPasswordRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reset_token** | **str** | | [optional] -**password** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.reset_password_request import ResetPasswordRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ResetPasswordRequest from a JSON string -reset_password_request_instance = ResetPasswordRequest.from_json(json) -# print the JSON string representation of the object -print(ResetPasswordRequest.to_json()) - -# convert the object into a dict -reset_password_request_dict = reset_password_request_instance.to_dict() -# create an instance of ResetPasswordRequest from a dict -reset_password_request_from_dict = ResetPasswordRequest.from_dict(reset_password_request_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/sdk/python/src/docs/Share.md b/sdk/python/src/docs/Share.md deleted file mode 100644 index 4fbfc430..00000000 --- a/sdk/python/src/docs/Share.md +++ /dev/null @@ -1,40 +0,0 @@ -# Share - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**share_token** | **str** | | [optional] -**z_id** | **str** | | [optional] -**share_mode** | **str** | | [optional] -**backend_mode** | **str** | | [optional] -**frontend_selection** | **str** | | [optional] -**frontend_endpoint** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**reserved** | **bool** | | [optional] -**activity** | [**List[SparkDataSample]**](SparkDataSample.md) | | [optional] -**limited** | **bool** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -## Example - -```python -from zrok_api.models.share import Share - -# TODO update the JSON string below -json = "{}" -# create an instance of Share from a JSON string -share_instance = Share.from_json(json) -# print the JSON string representation of the object -print(Share.to_json()) - -# convert the object into a dict -share_dict = share_instance.to_dict() -# create an instance of Share from a dict -share_from_dict = Share.from_dict(share_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/sdk/python/src/docs/ShareApi.md b/sdk/python/src/docs/ShareApi.md deleted file mode 100644 index 2831f1d2..00000000 --- a/sdk/python/src/docs/ShareApi.md +++ /dev/null @@ -1,473 +0,0 @@ -# zrok_api.ShareApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**access**](ShareApi.md#access) | **POST** /access | -[**share**](ShareApi.md#share) | **POST** /share | -[**unaccess**](ShareApi.md#unaccess) | **DELETE** /unaccess | -[**unshare**](ShareApi.md#unshare) | **DELETE** /unshare | -[**update_access**](ShareApi.md#update_access) | **PATCH** /access | -[**update_share**](ShareApi.md#update_share) | **PATCH** /share | - - -# **access** -> Access201Response access(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.AccessRequest() # AccessRequest | (optional) - - try: - api_response = api_instance.access(body=body) - print("The response of ShareApi->access:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ShareApi->access: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AccessRequest**](AccessRequest.md)| | [optional] - -### Return type - -[**Access201Response**](Access201Response.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | access created | - | -**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) - -# **share** -> ShareResponse share(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.ShareRequest() # ShareRequest | (optional) - - try: - api_response = api_instance.share(body=body) - print("The response of ShareApi->share:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ShareApi->share: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ShareRequest**](ShareRequest.md)| | [optional] - -### Return type - -[**ShareResponse**](ShareResponse.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | share created | - | -**401** | unauthorized | - | -**404** | not found | - | -**409** | conflict | - | -**422** | unprocessable | - | -**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) - -# **unaccess** -> unaccess(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UnaccessRequest() # UnaccessRequest | (optional) - - try: - api_instance.unaccess(body=body) - except Exception as e: - print("Exception when calling ShareApi->unaccess: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UnaccessRequest**](UnaccessRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | access removed | - | -**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) - -# **unshare** -> unshare(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UnshareRequest() # UnshareRequest | (optional) - - try: - api_instance.unshare(body=body) - except Exception as e: - print("Exception when calling ShareApi->unshare: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UnshareRequest**](UnshareRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | share removed | - | -**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_access** -> update_access(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UpdateAccessRequest() # UpdateAccessRequest | (optional) - - try: - api_instance.update_access(body=body) - except Exception as e: - print("Exception when calling ShareApi->update_access: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UpdateAccessRequest**](UpdateAccessRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | access updated | - | -**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_share** -> update_share(body=body) - -### Example - -* Api Key Authentication (key): - -```python -import zrok_api -from zrok_api.models.update_share_request import UpdateShareRequest -from zrok_api.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to /api/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = zrok_api.Configuration( - host = "/api/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: key -configuration.api_key['key'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['key'] = 'Bearer' - -# Enter a context with an instance of the API client -with zrok_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = zrok_api.ShareApi(api_client) - body = zrok_api.UpdateShareRequest() # UpdateShareRequest | (optional) - - try: - api_instance.update_share(body=body) - except Exception as e: - print("Exception when calling ShareApi->update_share: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UpdateShareRequest**](UpdateShareRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | share updated | - | -**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/sdk/python/src/docs/ShareRequest.md b/sdk/python/src/docs/ShareRequest.md deleted file mode 100644 index eb92f07a..00000000 --- a/sdk/python/src/docs/ShareRequest.md +++ /dev/null @@ -1,42 +0,0 @@ -# ShareRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_mode** | **str** | | [optional] -**frontend_selection** | **List[str]** | | [optional] -**backend_mode** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**auth_scheme** | **str** | | [optional] -**auth_users** | [**List[AuthUser]**](AuthUser.md) | | [optional] -**oauth_provider** | **str** | | [optional] -**oauth_email_domains** | **List[str]** | | [optional] -**oauth_authorization_check_interval** | **str** | | [optional] -**reserved** | **bool** | | [optional] -**permission_mode** | **str** | | [optional] -**access_grants** | **List[str]** | | [optional] -**unique_name** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.share_request import ShareRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareRequest from a JSON string -share_request_instance = ShareRequest.from_json(json) -# print the JSON string representation of the object -print(ShareRequest.to_json()) - -# convert the object into a dict -share_request_dict = share_request_instance.to_dict() -# create an instance of ShareRequest from a dict -share_request_from_dict = ShareRequest.from_dict(share_request_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/sdk/python/src/docs/ShareResponse.md b/sdk/python/src/docs/ShareResponse.md deleted file mode 100644 index 9bbedd0c..00000000 --- a/sdk/python/src/docs/ShareResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# ShareResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_proxy_endpoints** | **List[str]** | | [optional] -**share_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.share_response import ShareResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareResponse from a JSON string -share_response_instance = ShareResponse.from_json(json) -# print the JSON string representation of the object -print(ShareResponse.to_json()) - -# convert the object into a dict -share_response_dict = share_response_instance.to_dict() -# create an instance of ShareResponse from a dict -share_response_from_dict = ShareResponse.from_dict(share_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/sdk/python/src/docs/SparkDataSample.md b/sdk/python/src/docs/SparkDataSample.md deleted file mode 100644 index 6479404c..00000000 --- a/sdk/python/src/docs/SparkDataSample.md +++ /dev/null @@ -1,30 +0,0 @@ -# SparkDataSample - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rx** | **float** | | [optional] -**tx** | **float** | | [optional] - -## Example - -```python -from zrok_api.models.spark_data_sample import SparkDataSample - -# TODO update the JSON string below -json = "{}" -# create an instance of SparkDataSample from a JSON string -spark_data_sample_instance = SparkDataSample.from_json(json) -# print the JSON string representation of the object -print(SparkDataSample.to_json()) - -# convert the object into a dict -spark_data_sample_dict = spark_data_sample_instance.to_dict() -# create an instance of SparkDataSample from a dict -spark_data_sample_from_dict = SparkDataSample.from_dict(spark_data_sample_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/sdk/python/src/docs/UnaccessRequest.md b/sdk/python/src/docs/UnaccessRequest.md deleted file mode 100644 index c7d57fd8..00000000 --- a/sdk/python/src/docs/UnaccessRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UnaccessRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.unaccess_request import UnaccessRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnaccessRequest from a JSON string -unaccess_request_instance = UnaccessRequest.from_json(json) -# print the JSON string representation of the object -print(UnaccessRequest.to_json()) - -# convert the object into a dict -unaccess_request_dict = unaccess_request_instance.to_dict() -# create an instance of UnaccessRequest from a dict -unaccess_request_from_dict = UnaccessRequest.from_dict(unaccess_request_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/sdk/python/src/docs/UnshareRequest.md b/sdk/python/src/docs/UnshareRequest.md deleted file mode 100644 index d376f008..00000000 --- a/sdk/python/src/docs/UnshareRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UnshareRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**reserved** | **bool** | | [optional] - -## Example - -```python -from zrok_api.models.unshare_request import UnshareRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnshareRequest from a JSON string -unshare_request_instance = UnshareRequest.from_json(json) -# print the JSON string representation of the object -print(UnshareRequest.to_json()) - -# convert the object into a dict -unshare_request_dict = unshare_request_instance.to_dict() -# create an instance of UnshareRequest from a dict -unshare_request_from_dict = UnshareRequest.from_dict(unshare_request_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/sdk/python/src/docs/UpdateAccessRequest.md b/sdk/python/src/docs/UpdateAccessRequest.md deleted file mode 100644 index 7d9027da..00000000 --- a/sdk/python/src/docs/UpdateAccessRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UpdateAccessRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.update_access_request import UpdateAccessRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateAccessRequest from a JSON string -update_access_request_instance = UpdateAccessRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateAccessRequest.to_json()) - -# convert the object into a dict -update_access_request_dict = update_access_request_instance.to_dict() -# create an instance of UpdateAccessRequest from a dict -update_access_request_from_dict = UpdateAccessRequest.from_dict(update_access_request_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/sdk/python/src/docs/UpdateFrontendRequest.md b/sdk/python/src/docs/UpdateFrontendRequest.md deleted file mode 100644 index 754bf4b6..00000000 --- a/sdk/python/src/docs/UpdateFrontendRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# UpdateFrontendRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**public_name** | **str** | | [optional] -**url_template** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.update_frontend_request import UpdateFrontendRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateFrontendRequest from a JSON string -update_frontend_request_instance = UpdateFrontendRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateFrontendRequest.to_json()) - -# convert the object into a dict -update_frontend_request_dict = update_frontend_request_instance.to_dict() -# create an instance of UpdateFrontendRequest from a dict -update_frontend_request_from_dict = UpdateFrontendRequest.from_dict(update_frontend_request_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/sdk/python/src/docs/UpdateShareRequest.md b/sdk/python/src/docs/UpdateShareRequest.md deleted file mode 100644 index 8719ab10..00000000 --- a/sdk/python/src/docs/UpdateShareRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# UpdateShareRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**share_token** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**add_access_grants** | **List[str]** | | [optional] -**remove_access_grants** | **List[str]** | | [optional] - -## Example - -```python -from zrok_api.models.update_share_request import UpdateShareRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateShareRequest from a JSON string -update_share_request_instance = UpdateShareRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateShareRequest.to_json()) - -# convert the object into a dict -update_share_request_dict = update_share_request_instance.to_dict() -# create an instance of UpdateShareRequest from a dict -update_share_request_from_dict = UpdateShareRequest.from_dict(update_share_request_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/sdk/python/src/docs/Verify200Response.md b/sdk/python/src/docs/Verify200Response.md deleted file mode 100644 index 5ca1769d..00000000 --- a/sdk/python/src/docs/Verify200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# Verify200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.verify200_response import Verify200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of Verify200Response from a JSON string -verify200_response_instance = Verify200Response.from_json(json) -# print the JSON string representation of the object -print(Verify200Response.to_json()) - -# convert the object into a dict -verify200_response_dict = verify200_response_instance.to_dict() -# create an instance of Verify200Response from a dict -verify200_response_from_dict = Verify200Response.from_dict(verify200_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/sdk/python/src/docs/VerifyRequest.md b/sdk/python/src/docs/VerifyRequest.md deleted file mode 100644 index da6a0728..00000000 --- a/sdk/python/src/docs/VerifyRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# VerifyRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.verify_request import VerifyRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of VerifyRequest from a JSON string -verify_request_instance = VerifyRequest.from_json(json) -# print the JSON string representation of the object -print(VerifyRequest.to_json()) - -# convert the object into a dict -verify_request_dict = verify_request_instance.to_dict() -# create an instance of VerifyRequest from a dict -verify_request_from_dict = VerifyRequest.from_dict(verify_request_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/sdk/python/src/docs/VersionInventory200Response.md b/sdk/python/src/docs/VersionInventory200Response.md deleted file mode 100644 index 2c08de2c..00000000 --- a/sdk/python/src/docs/VersionInventory200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# VersionInventory200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**controller_version** | **str** | | [optional] - -## Example - -```python -from zrok_api.models.version_inventory200_response import VersionInventory200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of VersionInventory200Response from a JSON string -version_inventory200_response_instance = VersionInventory200Response.from_json(json) -# print the JSON string representation of the object -print(VersionInventory200Response.to_json()) - -# convert the object into a dict -version_inventory200_response_dict = version_inventory200_response_instance.to_dict() -# create an instance of VersionInventory200Response from a dict -version_inventory200_response_from_dict = VersionInventory200Response.from_dict(version_inventory200_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/sdk/python/src/test/__init__.py b/sdk/python/src/test/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/sdk/python/src/test/test_access201_response.py b/sdk/python/src/test/test_access201_response.py deleted file mode 100644 index 9b698d1c..00000000 --- a/sdk/python/src/test/test_access201_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.access201_response import Access201Response - -class TestAccess201Response(unittest.TestCase): - """Access201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Access201Response: - """Test Access201Response - include_optional 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 `Access201Response` - """ - model = Access201Response() - if include_optional: - return Access201Response( - frontend_token = '', - backend_mode = '' - ) - else: - return Access201Response( - ) - """ - - def testAccess201Response(self): - """Test Access201Response""" - # 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/sdk/python/src/test/test_access_request.py b/sdk/python/src/test/test_access_request.py deleted file mode 100644 index 070903e9..00000000 --- a/sdk/python/src/test/test_access_request.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.access_request import AccessRequest - -class TestAccessRequest(unittest.TestCase): - """AccessRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccessRequest: - """Test AccessRequest - include_optional 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 `AccessRequest` - """ - model = AccessRequest() - if include_optional: - return AccessRequest( - env_zid = '', - share_token = '', - bind_address = '', - description = '' - ) - else: - return AccessRequest( - ) - """ - - def testAccessRequest(self): - """Test AccessRequest""" - # 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/sdk/python/src/test/test_account_api.py b/sdk/python/src/test/test_account_api.py deleted file mode 100644 index 419e1f1b..00000000 --- a/sdk/python/src/test/test_account_api.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.account_api import AccountApi - - -class TestAccountApi(unittest.TestCase): - """AccountApi unit test stubs""" - - def setUp(self) -> None: - self.api = AccountApi() - - def tearDown(self) -> None: - pass - - def test_change_password(self) -> None: - """Test case for change_password - - """ - pass - - def test_invite(self) -> None: - """Test case for invite - - """ - pass - - def test_login(self) -> None: - """Test case for login - - """ - pass - - def test_regenerate_account_token(self) -> None: - """Test case for regenerate_account_token - - """ - pass - - def test_register(self) -> None: - """Test case for register - - """ - pass - - def test_reset_password(self) -> None: - """Test case for reset_password - - """ - pass - - def test_reset_password_request(self) -> None: - """Test case for reset_password_request - - """ - pass - - def test_verify(self) -> None: - """Test case for verify - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/src/test/test_add_organization_member_request.py b/sdk/python/src/test/test_add_organization_member_request.py deleted file mode 100644 index 7a08de67..00000000 --- a/sdk/python/src/test/test_add_organization_member_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest - -class TestAddOrganizationMemberRequest(unittest.TestCase): - """AddOrganizationMemberRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AddOrganizationMemberRequest: - """Test AddOrganizationMemberRequest - include_optional 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 `AddOrganizationMemberRequest` - """ - model = AddOrganizationMemberRequest() - if include_optional: - return AddOrganizationMemberRequest( - organization_token = '', - email = '', - admin = True - ) - else: - return AddOrganizationMemberRequest( - ) - """ - - def testAddOrganizationMemberRequest(self): - """Test AddOrganizationMemberRequest""" - # 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/sdk/python/src/test/test_admin_api.py b/sdk/python/src/test/test_admin_api.py deleted file mode 100644 index 720e8832..00000000 --- a/sdk/python/src/test/test_admin_api.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.admin_api import AdminApi - - -class TestAdminApi(unittest.TestCase): - """AdminApi unit test stubs""" - - def setUp(self) -> None: - self.api = AdminApi() - - def tearDown(self) -> None: - pass - - def test_add_organization_member(self) -> None: - """Test case for add_organization_member - - """ - pass - - def test_create_account(self) -> None: - """Test case for create_account - - """ - pass - - def test_create_frontend(self) -> None: - """Test case for create_frontend - - """ - pass - - def test_create_identity(self) -> None: - """Test case for create_identity - - """ - pass - - def test_create_organization(self) -> None: - """Test case for create_organization - - """ - pass - - def test_delete_frontend(self) -> None: - """Test case for delete_frontend - - """ - pass - - def test_delete_organization(self) -> None: - """Test case for delete_organization - - """ - pass - - def test_grants(self) -> None: - """Test case for grants - - """ - pass - - def test_invite_token_generate(self) -> None: - """Test case for invite_token_generate - - """ - pass - - def test_list_frontends(self) -> None: - """Test case for list_frontends - - """ - pass - - def test_list_organization_members(self) -> None: - """Test case for list_organization_members - - """ - pass - - def test_list_organizations(self) -> None: - """Test case for list_organizations - - """ - pass - - def test_remove_organization_member(self) -> None: - """Test case for remove_organization_member - - """ - pass - - def test_update_frontend(self) -> None: - """Test case for update_frontend - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/src/test/test_auth_user.py b/sdk/python/src/test/test_auth_user.py deleted file mode 100644 index e5d70b26..00000000 --- a/sdk/python/src/test/test_auth_user.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.auth_user import AuthUser - -class TestAuthUser(unittest.TestCase): - """AuthUser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AuthUser: - """Test AuthUser - include_optional 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 `AuthUser` - """ - model = AuthUser() - if include_optional: - return AuthUser( - username = '', - password = '' - ) - else: - return AuthUser( - ) - """ - - def testAuthUser(self): - """Test AuthUser""" - # 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/sdk/python/src/test/test_change_password_request.py b/sdk/python/src/test/test_change_password_request.py deleted file mode 100644 index 592e8be1..00000000 --- a/sdk/python/src/test/test_change_password_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.change_password_request import ChangePasswordRequest - -class TestChangePasswordRequest(unittest.TestCase): - """ChangePasswordRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ChangePasswordRequest: - """Test ChangePasswordRequest - include_optional 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 `ChangePasswordRequest` - """ - model = ChangePasswordRequest() - if include_optional: - return ChangePasswordRequest( - email = '', - old_password = '', - new_password = '' - ) - else: - return ChangePasswordRequest( - ) - """ - - def testChangePasswordRequest(self): - """Test ChangePasswordRequest""" - # 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/sdk/python/src/test/test_client_version_check_request.py b/sdk/python/src/test/test_client_version_check_request.py deleted file mode 100644 index 169017d6..00000000 --- a/sdk/python/src/test/test_client_version_check_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest - -class TestClientVersionCheckRequest(unittest.TestCase): - """ClientVersionCheckRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClientVersionCheckRequest: - """Test ClientVersionCheckRequest - include_optional 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 `ClientVersionCheckRequest` - """ - model = ClientVersionCheckRequest() - if include_optional: - return ClientVersionCheckRequest( - client_version = '' - ) - else: - return ClientVersionCheckRequest( - ) - """ - - def testClientVersionCheckRequest(self): - """Test ClientVersionCheckRequest""" - # 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/sdk/python/src/test/test_configuration.py b/sdk/python/src/test/test_configuration.py deleted file mode 100644 index bf80210e..00000000 --- a/sdk/python/src/test/test_configuration.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.configuration import Configuration - -class TestConfiguration(unittest.TestCase): - """Configuration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Configuration: - """Test Configuration - include_optional 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 `Configuration` - """ - model = Configuration() - if include_optional: - return Configuration( - version = '', - tou_link = '', - invites_open = True, - requires_invite_token = True, - invite_token_contact = '' - ) - else: - return Configuration( - ) - """ - - def testConfiguration(self): - """Test Configuration""" - # 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/sdk/python/src/test/test_create_frontend201_response.py b/sdk/python/src/test/test_create_frontend201_response.py deleted file mode 100644 index 3f983a1a..00000000 --- a/sdk/python/src/test/test_create_frontend201_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_frontend201_response import CreateFrontend201Response - -class TestCreateFrontend201Response(unittest.TestCase): - """CreateFrontend201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateFrontend201Response: - """Test CreateFrontend201Response - include_optional 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 `CreateFrontend201Response` - """ - model = CreateFrontend201Response() - if include_optional: - return CreateFrontend201Response( - frontend_token = '' - ) - else: - return CreateFrontend201Response( - ) - """ - - def testCreateFrontend201Response(self): - """Test CreateFrontend201Response""" - # 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/sdk/python/src/test/test_create_frontend_request.py b/sdk/python/src/test/test_create_frontend_request.py deleted file mode 100644 index 8fc35754..00000000 --- a/sdk/python/src/test/test_create_frontend_request.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_frontend_request import CreateFrontendRequest - -class TestCreateFrontendRequest(unittest.TestCase): - """CreateFrontendRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateFrontendRequest: - """Test CreateFrontendRequest - include_optional 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 `CreateFrontendRequest` - """ - model = CreateFrontendRequest() - if include_optional: - return CreateFrontendRequest( - z_id = '', - url_template = '', - public_name = '', - permission_mode = 'open' - ) - else: - return CreateFrontendRequest( - ) - """ - - def testCreateFrontendRequest(self): - """Test CreateFrontendRequest""" - # 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/sdk/python/src/test/test_create_identity201_response.py b/sdk/python/src/test/test_create_identity201_response.py deleted file mode 100644 index 2a9c8f2b..00000000 --- a/sdk/python/src/test/test_create_identity201_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_identity201_response import CreateIdentity201Response - -class TestCreateIdentity201Response(unittest.TestCase): - """CreateIdentity201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateIdentity201Response: - """Test CreateIdentity201Response - include_optional 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 `CreateIdentity201Response` - """ - model = CreateIdentity201Response() - if include_optional: - return CreateIdentity201Response( - identity = '', - cfg = '' - ) - else: - return CreateIdentity201Response( - ) - """ - - def testCreateIdentity201Response(self): - """Test CreateIdentity201Response""" - # 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/sdk/python/src/test/test_create_identity_request.py b/sdk/python/src/test/test_create_identity_request.py deleted file mode 100644 index 9bf33031..00000000 --- a/sdk/python/src/test/test_create_identity_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_identity_request import CreateIdentityRequest - -class TestCreateIdentityRequest(unittest.TestCase): - """CreateIdentityRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateIdentityRequest: - """Test CreateIdentityRequest - include_optional 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 `CreateIdentityRequest` - """ - model = CreateIdentityRequest() - if include_optional: - return CreateIdentityRequest( - name = '' - ) - else: - return CreateIdentityRequest( - ) - """ - - def testCreateIdentityRequest(self): - """Test CreateIdentityRequest""" - # 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/sdk/python/src/test/test_create_organization201_response.py b/sdk/python/src/test/test_create_organization201_response.py deleted file mode 100644 index d4dc7c81..00000000 --- a/sdk/python/src/test/test_create_organization201_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_organization201_response import CreateOrganization201Response - -class TestCreateOrganization201Response(unittest.TestCase): - """CreateOrganization201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateOrganization201Response: - """Test CreateOrganization201Response - include_optional 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 `CreateOrganization201Response` - """ - model = CreateOrganization201Response() - if include_optional: - return CreateOrganization201Response( - organization_token = '' - ) - else: - return CreateOrganization201Response( - ) - """ - - def testCreateOrganization201Response(self): - """Test CreateOrganization201Response""" - # 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/sdk/python/src/test/test_create_organization_request.py b/sdk/python/src/test/test_create_organization_request.py deleted file mode 100644 index da880237..00000000 --- a/sdk/python/src/test/test_create_organization_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.create_organization_request import CreateOrganizationRequest - -class TestCreateOrganizationRequest(unittest.TestCase): - """CreateOrganizationRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateOrganizationRequest: - """Test CreateOrganizationRequest - include_optional 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 `CreateOrganizationRequest` - """ - model = CreateOrganizationRequest() - if include_optional: - return CreateOrganizationRequest( - description = '' - ) - else: - return CreateOrganizationRequest( - ) - """ - - def testCreateOrganizationRequest(self): - """Test CreateOrganizationRequest""" - # 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/sdk/python/src/test/test_disable_request.py b/sdk/python/src/test/test_disable_request.py deleted file mode 100644 index c4837b4b..00000000 --- a/sdk/python/src/test/test_disable_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.disable_request import DisableRequest - -class TestDisableRequest(unittest.TestCase): - """DisableRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DisableRequest: - """Test DisableRequest - include_optional 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 `DisableRequest` - """ - model = DisableRequest() - if include_optional: - return DisableRequest( - identity = '' - ) - else: - return DisableRequest( - ) - """ - - def testDisableRequest(self): - """Test DisableRequest""" - # 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/sdk/python/src/test/test_enable_request.py b/sdk/python/src/test/test_enable_request.py deleted file mode 100644 index 49689df4..00000000 --- a/sdk/python/src/test/test_enable_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.enable_request import EnableRequest - -class TestEnableRequest(unittest.TestCase): - """EnableRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnableRequest: - """Test EnableRequest - include_optional 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 `EnableRequest` - """ - model = EnableRequest() - if include_optional: - return EnableRequest( - description = '', - host = '' - ) - else: - return EnableRequest( - ) - """ - - def testEnableRequest(self): - """Test EnableRequest""" - # 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/sdk/python/src/test/test_environment.py b/sdk/python/src/test/test_environment.py deleted file mode 100644 index d2e28280..00000000 --- a/sdk/python/src/test/test_environment.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.environment import Environment - -class TestEnvironment(unittest.TestCase): - """Environment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Environment: - """Test Environment - include_optional 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 `Environment` - """ - model = Environment() - if include_optional: - return Environment( - description = '', - host = '', - address = '', - z_id = '', - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56 - ) - else: - return Environment( - ) - """ - - def testEnvironment(self): - """Test Environment""" - # 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/sdk/python/src/test/test_environment_and_resources.py b/sdk/python/src/test/test_environment_and_resources.py deleted file mode 100644 index 56cafdac..00000000 --- a/sdk/python/src/test/test_environment_and_resources.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.environment_and_resources import EnvironmentAndResources - -class TestEnvironmentAndResources(unittest.TestCase): - """EnvironmentAndResources unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnvironmentAndResources: - """Test EnvironmentAndResources - include_optional 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 `EnvironmentAndResources` - """ - model = EnvironmentAndResources() - if include_optional: - return EnvironmentAndResources( - environment = zrok_api.models.environment.environment( - description = '', - host = '', - address = '', - z_id = '', - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56, ), - frontends = [ - zrok_api.models.frontend.frontend( - id = 56, - frontend_token = '', - share_token = '', - backend_mode = '', - bind_address = '', - description = '', - z_id = '', - created_at = 56, - updated_at = 56, ) - ], - shares = [ - zrok_api.models.share.share( - share_token = '', - z_id = '', - share_mode = '', - backend_mode = '', - frontend_selection = '', - frontend_endpoint = '', - backend_proxy_endpoint = '', - reserved = True, - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56, ) - ] - ) - else: - return EnvironmentAndResources( - ) - """ - - def testEnvironmentAndResources(self): - """Test EnvironmentAndResources""" - # 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/sdk/python/src/test/test_environment_api.py b/sdk/python/src/test/test_environment_api.py deleted file mode 100644 index 83aeacd8..00000000 --- a/sdk/python/src/test/test_environment_api.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.environment_api import EnvironmentApi - - -class TestEnvironmentApi(unittest.TestCase): - """EnvironmentApi unit test stubs""" - - def setUp(self) -> None: - self.api = EnvironmentApi() - - def tearDown(self) -> None: - pass - - def test_disable(self) -> None: - """Test case for disable - - """ - pass - - def test_enable(self) -> None: - """Test case for enable - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/src/test/test_frontend.py b/sdk/python/src/test/test_frontend.py deleted file mode 100644 index eba715d9..00000000 --- a/sdk/python/src/test/test_frontend.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.frontend import Frontend - -class TestFrontend(unittest.TestCase): - """Frontend unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Frontend: - """Test Frontend - include_optional 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 `Frontend` - """ - model = Frontend() - if include_optional: - return Frontend( - id = 56, - frontend_token = '', - share_token = '', - backend_mode = '', - bind_address = '', - description = '', - z_id = '', - created_at = 56, - updated_at = 56 - ) - else: - return Frontend( - ) - """ - - def testFrontend(self): - """Test Frontend""" - # 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/sdk/python/src/test/test_get_sparklines200_response.py b/sdk/python/src/test/test_get_sparklines200_response.py deleted file mode 100644 index 8367cc34..00000000 --- a/sdk/python/src/test/test_get_sparklines200_response.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.get_sparklines200_response import GetSparklines200Response - -class TestGetSparklines200Response(unittest.TestCase): - """GetSparklines200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetSparklines200Response: - """Test GetSparklines200Response - include_optional 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 `GetSparklines200Response` - """ - model = GetSparklines200Response() - if include_optional: - return GetSparklines200Response( - sparklines = [ - zrok_api.models.metrics.metrics( - scope = '', - id = '', - period = 1.337, - samples = [ - zrok_api.models.metrics_sample.metricsSample( - rx = 1.337, - tx = 1.337, - timestamp = 1.337, ) - ], ) - ] - ) - else: - return GetSparklines200Response( - ) - """ - - def testGetSparklines200Response(self): - """Test GetSparklines200Response""" - # 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/sdk/python/src/test/test_get_sparklines_request.py b/sdk/python/src/test/test_get_sparklines_request.py deleted file mode 100644 index cd46979b..00000000 --- a/sdk/python/src/test/test_get_sparklines_request.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.get_sparklines_request import GetSparklinesRequest - -class TestGetSparklinesRequest(unittest.TestCase): - """GetSparklinesRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetSparklinesRequest: - """Test GetSparklinesRequest - include_optional 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 `GetSparklinesRequest` - """ - model = GetSparklinesRequest() - if include_optional: - return GetSparklinesRequest( - account = True, - environments = [ - '' - ], - shares = [ - '' - ] - ) - else: - return GetSparklinesRequest( - ) - """ - - def testGetSparklinesRequest(self): - """Test GetSparklinesRequest""" - # 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/sdk/python/src/test/test_invite_request.py b/sdk/python/src/test/test_invite_request.py deleted file mode 100644 index a181ad3b..00000000 --- a/sdk/python/src/test/test_invite_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.invite_request import InviteRequest - -class TestInviteRequest(unittest.TestCase): - """InviteRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InviteRequest: - """Test InviteRequest - include_optional 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 `InviteRequest` - """ - model = InviteRequest() - if include_optional: - return InviteRequest( - email = '', - invite_token = '' - ) - else: - return InviteRequest( - ) - """ - - def testInviteRequest(self): - """Test InviteRequest""" - # 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/sdk/python/src/test/test_invite_token_generate_request.py b/sdk/python/src/test/test_invite_token_generate_request.py deleted file mode 100644 index 1a8c2c10..00000000 --- a/sdk/python/src/test/test_invite_token_generate_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest - -class TestInviteTokenGenerateRequest(unittest.TestCase): - """InviteTokenGenerateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InviteTokenGenerateRequest: - """Test InviteTokenGenerateRequest - include_optional 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 `InviteTokenGenerateRequest` - """ - model = InviteTokenGenerateRequest() - if include_optional: - return InviteTokenGenerateRequest( - invite_tokens = [ - '' - ] - ) - else: - return InviteTokenGenerateRequest( - ) - """ - - def testInviteTokenGenerateRequest(self): - """Test InviteTokenGenerateRequest""" - # 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/sdk/python/src/test/test_list_frontends200_response_inner.py b/sdk/python/src/test/test_list_frontends200_response_inner.py deleted file mode 100644 index 2e21b24d..00000000 --- a/sdk/python/src/test/test_list_frontends200_response_inner.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner - -class TestListFrontends200ResponseInner(unittest.TestCase): - """ListFrontends200ResponseInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListFrontends200ResponseInner: - """Test ListFrontends200ResponseInner - include_optional 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 `ListFrontends200ResponseInner` - """ - model = ListFrontends200ResponseInner() - if include_optional: - return ListFrontends200ResponseInner( - frontend_token = '', - z_id = '', - url_template = '', - public_name = '', - created_at = 56, - updated_at = 56 - ) - else: - return ListFrontends200ResponseInner( - ) - """ - - def testListFrontends200ResponseInner(self): - """Test ListFrontends200ResponseInner""" - # 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/sdk/python/src/test/test_list_memberships200_response.py b/sdk/python/src/test/test_list_memberships200_response.py deleted file mode 100644 index d23ac2dd..00000000 --- a/sdk/python/src/test/test_list_memberships200_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_memberships200_response import ListMemberships200Response - -class TestListMemberships200Response(unittest.TestCase): - """ListMemberships200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListMemberships200Response: - """Test ListMemberships200Response - include_optional 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 `ListMemberships200Response` - """ - model = ListMemberships200Response() - if include_optional: - return ListMemberships200Response( - memberships = [ - zrok_api.models.list_memberships_200_response_memberships_inner.listMemberships_200_response_memberships_inner( - organization_token = '', - description = '', - admin = True, ) - ] - ) - else: - return ListMemberships200Response( - ) - """ - - def testListMemberships200Response(self): - """Test ListMemberships200Response""" - # 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/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py b/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py deleted file mode 100644 index 2f7cf7ff..00000000 --- a/sdk/python/src/test/test_list_memberships200_response_memberships_inner.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner - -class TestListMemberships200ResponseMembershipsInner(unittest.TestCase): - """ListMemberships200ResponseMembershipsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListMemberships200ResponseMembershipsInner: - """Test ListMemberships200ResponseMembershipsInner - include_optional 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 `ListMemberships200ResponseMembershipsInner` - """ - model = ListMemberships200ResponseMembershipsInner() - if include_optional: - return ListMemberships200ResponseMembershipsInner( - organization_token = '', - description = '', - admin = True - ) - else: - return ListMemberships200ResponseMembershipsInner( - ) - """ - - def testListMemberships200ResponseMembershipsInner(self): - """Test ListMemberships200ResponseMembershipsInner""" - # 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/sdk/python/src/test/test_list_organization_members200_response.py b/sdk/python/src/test/test_list_organization_members200_response.py deleted file mode 100644 index 8020c6c7..00000000 --- a/sdk/python/src/test/test_list_organization_members200_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response - -class TestListOrganizationMembers200Response(unittest.TestCase): - """ListOrganizationMembers200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizationMembers200Response: - """Test ListOrganizationMembers200Response - include_optional 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 `ListOrganizationMembers200Response` - """ - model = ListOrganizationMembers200Response() - if include_optional: - return ListOrganizationMembers200Response( - members = [ - zrok_api.models.list_organization_members_200_response_members_inner.listOrganizationMembers_200_response_members_inner( - email = '', - admin = True, ) - ] - ) - else: - return ListOrganizationMembers200Response( - ) - """ - - def testListOrganizationMembers200Response(self): - """Test ListOrganizationMembers200Response""" - # 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/sdk/python/src/test/test_list_organization_members200_response_members_inner.py b/sdk/python/src/test/test_list_organization_members200_response_members_inner.py deleted file mode 100644 index 28cea33f..00000000 --- a/sdk/python/src/test/test_list_organization_members200_response_members_inner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner - -class TestListOrganizationMembers200ResponseMembersInner(unittest.TestCase): - """ListOrganizationMembers200ResponseMembersInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizationMembers200ResponseMembersInner: - """Test ListOrganizationMembers200ResponseMembersInner - include_optional 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 `ListOrganizationMembers200ResponseMembersInner` - """ - model = ListOrganizationMembers200ResponseMembersInner() - if include_optional: - return ListOrganizationMembers200ResponseMembersInner( - email = '', - admin = True - ) - else: - return ListOrganizationMembers200ResponseMembersInner( - ) - """ - - def testListOrganizationMembers200ResponseMembersInner(self): - """Test ListOrganizationMembers200ResponseMembersInner""" - # 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/sdk/python/src/test/test_list_organizations200_response.py b/sdk/python/src/test/test_list_organizations200_response.py deleted file mode 100644 index 7133529e..00000000 --- a/sdk/python/src/test/test_list_organizations200_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organizations200_response import ListOrganizations200Response - -class TestListOrganizations200Response(unittest.TestCase): - """ListOrganizations200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizations200Response: - """Test ListOrganizations200Response - include_optional 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 `ListOrganizations200Response` - """ - model = ListOrganizations200Response() - if include_optional: - return ListOrganizations200Response( - organizations = [ - zrok_api.models.list_organizations_200_response_organizations_inner.listOrganizations_200_response_organizations_inner( - organization_token = '', - description = '', ) - ] - ) - else: - return ListOrganizations200Response( - ) - """ - - def testListOrganizations200Response(self): - """Test ListOrganizations200Response""" - # 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/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py b/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py deleted file mode 100644 index 6d857ae1..00000000 --- a/sdk/python/src/test/test_list_organizations200_response_organizations_inner.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner - -class TestListOrganizations200ResponseOrganizationsInner(unittest.TestCase): - """ListOrganizations200ResponseOrganizationsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListOrganizations200ResponseOrganizationsInner: - """Test ListOrganizations200ResponseOrganizationsInner - include_optional 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 `ListOrganizations200ResponseOrganizationsInner` - """ - model = ListOrganizations200ResponseOrganizationsInner() - if include_optional: - return ListOrganizations200ResponseOrganizationsInner( - organization_token = '', - description = '' - ) - else: - return ListOrganizations200ResponseOrganizationsInner( - ) - """ - - def testListOrganizations200ResponseOrganizationsInner(self): - """Test ListOrganizations200ResponseOrganizationsInner""" - # 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/sdk/python/src/test/test_login_request.py b/sdk/python/src/test/test_login_request.py deleted file mode 100644 index 1a4c2642..00000000 --- a/sdk/python/src/test/test_login_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.login_request import LoginRequest - -class TestLoginRequest(unittest.TestCase): - """LoginRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LoginRequest: - """Test LoginRequest - include_optional 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 `LoginRequest` - """ - model = LoginRequest() - if include_optional: - return LoginRequest( - email = '', - password = '' - ) - else: - return LoginRequest( - ) - """ - - def testLoginRequest(self): - """Test LoginRequest""" - # 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/sdk/python/src/test/test_metadata_api.py b/sdk/python/src/test/test_metadata_api.py deleted file mode 100644 index 2424ae4c..00000000 --- a/sdk/python/src/test/test_metadata_api.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.metadata_api import MetadataApi - - -class TestMetadataApi(unittest.TestCase): - """MetadataApi unit test stubs""" - - def setUp(self) -> None: - self.api = MetadataApi() - - def tearDown(self) -> None: - pass - - def test_client_version_check(self) -> None: - """Test case for client_version_check - - """ - pass - - def test_configuration(self) -> None: - """Test case for configuration - - """ - pass - - def test_get_account_detail(self) -> None: - """Test case for get_account_detail - - """ - pass - - def test_get_account_metrics(self) -> None: - """Test case for get_account_metrics - - """ - pass - - def test_get_environment_detail(self) -> None: - """Test case for get_environment_detail - - """ - pass - - def test_get_environment_metrics(self) -> None: - """Test case for get_environment_metrics - - """ - pass - - def test_get_frontend_detail(self) -> None: - """Test case for get_frontend_detail - - """ - pass - - def test_get_share_detail(self) -> None: - """Test case for get_share_detail - - """ - pass - - def test_get_share_metrics(self) -> None: - """Test case for get_share_metrics - - """ - pass - - def test_get_sparklines(self) -> None: - """Test case for get_sparklines - - """ - pass - - def test_list_memberships(self) -> None: - """Test case for list_memberships - - """ - pass - - def test_list_org_members(self) -> None: - """Test case for list_org_members - - """ - pass - - def test_org_account_overview(self) -> None: - """Test case for org_account_overview - - """ - pass - - def test_overview(self) -> None: - """Test case for overview - - """ - pass - - def test_version(self) -> None: - """Test case for version - - """ - pass - - def test_version_inventory(self) -> None: - """Test case for version_inventory - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/src/test/test_metrics.py b/sdk/python/src/test/test_metrics.py deleted file mode 100644 index 04179009..00000000 --- a/sdk/python/src/test/test_metrics.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.metrics import Metrics - -class TestMetrics(unittest.TestCase): - """Metrics unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Metrics: - """Test Metrics - include_optional 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 `Metrics` - """ - model = Metrics() - if include_optional: - return Metrics( - scope = '', - id = '', - period = 1.337, - samples = [ - zrok_api.models.metrics_sample.metricsSample( - rx = 1.337, - tx = 1.337, - timestamp = 1.337, ) - ] - ) - else: - return Metrics( - ) - """ - - def testMetrics(self): - """Test Metrics""" - # 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/sdk/python/src/test/test_metrics_sample.py b/sdk/python/src/test/test_metrics_sample.py deleted file mode 100644 index 0b58e38d..00000000 --- a/sdk/python/src/test/test_metrics_sample.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.metrics_sample import MetricsSample - -class TestMetricsSample(unittest.TestCase): - """MetricsSample unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MetricsSample: - """Test MetricsSample - include_optional 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 `MetricsSample` - """ - model = MetricsSample() - if include_optional: - return MetricsSample( - rx = 1.337, - tx = 1.337, - timestamp = 1.337 - ) - else: - return MetricsSample( - ) - """ - - def testMetricsSample(self): - """Test MetricsSample""" - # 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/sdk/python/src/test/test_overview.py b/sdk/python/src/test/test_overview.py deleted file mode 100644 index 804007cd..00000000 --- a/sdk/python/src/test/test_overview.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.overview import Overview - -class TestOverview(unittest.TestCase): - """Overview unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Overview: - """Test Overview - include_optional 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 `Overview` - """ - model = Overview() - if include_optional: - return Overview( - account_limited = True, - environments = [ - zrok_api.models.environment_and_resources.environmentAndResources( - environment = zrok_api.models.environment.environment( - description = '', - host = '', - address = '', - z_id = '', - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56, ), - frontends = [ - zrok_api.models.frontend.frontend( - id = 56, - frontend_token = '', - share_token = '', - backend_mode = '', - bind_address = '', - description = '', - z_id = '', - created_at = 56, - updated_at = 56, ) - ], - shares = [ - zrok_api.models.share.share( - share_token = '', - z_id = '', - share_mode = '', - backend_mode = '', - frontend_selection = '', - frontend_endpoint = '', - backend_proxy_endpoint = '', - reserved = True, - limited = True, - created_at = 56, - updated_at = 56, ) - ], ) - ] - ) - else: - return Overview( - ) - """ - - def testOverview(self): - """Test Overview""" - # 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/sdk/python/src/test/test_principal.py b/sdk/python/src/test/test_principal.py deleted file mode 100644 index f92c159c..00000000 --- a/sdk/python/src/test/test_principal.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.principal import Principal - -class TestPrincipal(unittest.TestCase): - """Principal unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Principal: - """Test Principal - include_optional 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 `Principal` - """ - model = Principal() - if include_optional: - return Principal( - id = 56, - email = '', - token = '', - limitless = True, - admin = True - ) - else: - return Principal( - ) - """ - - def testPrincipal(self): - """Test Principal""" - # 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/sdk/python/src/test/test_regenerate_account_token200_response.py b/sdk/python/src/test/test_regenerate_account_token200_response.py deleted file mode 100644 index a94c4678..00000000 --- a/sdk/python/src/test/test_regenerate_account_token200_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response - -class TestRegenerateAccountToken200Response(unittest.TestCase): - """RegenerateAccountToken200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RegenerateAccountToken200Response: - """Test RegenerateAccountToken200Response - include_optional 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 `RegenerateAccountToken200Response` - """ - model = RegenerateAccountToken200Response() - if include_optional: - return RegenerateAccountToken200Response( - account_token = '' - ) - else: - return RegenerateAccountToken200Response( - ) - """ - - def testRegenerateAccountToken200Response(self): - """Test RegenerateAccountToken200Response""" - # 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/sdk/python/src/test/test_regenerate_account_token_request.py b/sdk/python/src/test/test_regenerate_account_token_request.py deleted file mode 100644 index b6e0b4bd..00000000 --- a/sdk/python/src/test/test_regenerate_account_token_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest - -class TestRegenerateAccountTokenRequest(unittest.TestCase): - """RegenerateAccountTokenRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RegenerateAccountTokenRequest: - """Test RegenerateAccountTokenRequest - include_optional 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 `RegenerateAccountTokenRequest` - """ - model = RegenerateAccountTokenRequest() - if include_optional: - return RegenerateAccountTokenRequest( - email_address = '' - ) - else: - return RegenerateAccountTokenRequest( - ) - """ - - def testRegenerateAccountTokenRequest(self): - """Test RegenerateAccountTokenRequest""" - # 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/sdk/python/src/test/test_register_request.py b/sdk/python/src/test/test_register_request.py deleted file mode 100644 index e026b200..00000000 --- a/sdk/python/src/test/test_register_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.register_request import RegisterRequest - -class TestRegisterRequest(unittest.TestCase): - """RegisterRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RegisterRequest: - """Test RegisterRequest - include_optional 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 `RegisterRequest` - """ - model = RegisterRequest() - if include_optional: - return RegisterRequest( - register_token = '', - password = '' - ) - else: - return RegisterRequest( - ) - """ - - def testRegisterRequest(self): - """Test RegisterRequest""" - # 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/sdk/python/src/test/test_remove_organization_member_request.py b/sdk/python/src/test/test_remove_organization_member_request.py deleted file mode 100644 index abf89606..00000000 --- a/sdk/python/src/test/test_remove_organization_member_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest - -class TestRemoveOrganizationMemberRequest(unittest.TestCase): - """RemoveOrganizationMemberRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RemoveOrganizationMemberRequest: - """Test RemoveOrganizationMemberRequest - include_optional 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 `RemoveOrganizationMemberRequest` - """ - model = RemoveOrganizationMemberRequest() - if include_optional: - return RemoveOrganizationMemberRequest( - organization_token = '', - email = '' - ) - else: - return RemoveOrganizationMemberRequest( - ) - """ - - def testRemoveOrganizationMemberRequest(self): - """Test RemoveOrganizationMemberRequest""" - # 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/sdk/python/src/test/test_reset_password_request.py b/sdk/python/src/test/test_reset_password_request.py deleted file mode 100644 index 2c047502..00000000 --- a/sdk/python/src/test/test_reset_password_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.reset_password_request import ResetPasswordRequest - -class TestResetPasswordRequest(unittest.TestCase): - """ResetPasswordRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ResetPasswordRequest: - """Test ResetPasswordRequest - include_optional 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 `ResetPasswordRequest` - """ - model = ResetPasswordRequest() - if include_optional: - return ResetPasswordRequest( - reset_token = '', - password = '' - ) - else: - return ResetPasswordRequest( - ) - """ - - def testResetPasswordRequest(self): - """Test ResetPasswordRequest""" - # 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/sdk/python/src/test/test_share.py b/sdk/python/src/test/test_share.py deleted file mode 100644 index ed498dc0..00000000 --- a/sdk/python/src/test/test_share.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.share import Share - -class TestShare(unittest.TestCase): - """Share unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Share: - """Test Share - include_optional 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 `Share` - """ - model = Share() - if include_optional: - return Share( - share_token = '', - z_id = '', - share_mode = '', - backend_mode = '', - frontend_selection = '', - frontend_endpoint = '', - backend_proxy_endpoint = '', - reserved = True, - activity = [ - zrok_api.models.spark_data_sample.sparkDataSample( - rx = 1.337, - tx = 1.337, ) - ], - limited = True, - created_at = 56, - updated_at = 56 - ) - else: - return Share( - ) - """ - - def testShare(self): - """Test Share""" - # 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/sdk/python/src/test/test_share_api.py b/sdk/python/src/test/test_share_api.py deleted file mode 100644 index a22ef8bf..00000000 --- a/sdk/python/src/test/test_share_api.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.api.share_api import ShareApi - - -class TestShareApi(unittest.TestCase): - """ShareApi unit test stubs""" - - def setUp(self) -> None: - self.api = ShareApi() - - def tearDown(self) -> None: - pass - - def test_access(self) -> None: - """Test case for access - - """ - pass - - def test_share(self) -> None: - """Test case for share - - """ - pass - - def test_unaccess(self) -> None: - """Test case for unaccess - - """ - pass - - def test_unshare(self) -> None: - """Test case for unshare - - """ - pass - - def test_update_access(self) -> None: - """Test case for update_access - - """ - pass - - def test_update_share(self) -> None: - """Test case for update_share - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/src/test/test_share_request.py b/sdk/python/src/test/test_share_request.py deleted file mode 100644 index c543ae26..00000000 --- a/sdk/python/src/test/test_share_request.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.share_request import ShareRequest - -class TestShareRequest(unittest.TestCase): - """ShareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareRequest: - """Test ShareRequest - include_optional 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 `ShareRequest` - """ - model = ShareRequest() - if include_optional: - return ShareRequest( - env_zid = '', - share_mode = 'public', - frontend_selection = [ - '' - ], - backend_mode = 'proxy', - backend_proxy_endpoint = '', - auth_scheme = '', - auth_users = [ - zrok_api.models.auth_user.authUser( - username = '', - password = '', ) - ], - oauth_provider = 'github', - oauth_email_domains = [ - '' - ], - oauth_authorization_check_interval = '', - reserved = True, - permission_mode = 'open', - access_grants = [ - '' - ], - unique_name = '' - ) - else: - return ShareRequest( - ) - """ - - def testShareRequest(self): - """Test ShareRequest""" - # 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/sdk/python/src/test/test_share_response.py b/sdk/python/src/test/test_share_response.py deleted file mode 100644 index 46bb5af5..00000000 --- a/sdk/python/src/test/test_share_response.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.share_response import ShareResponse - -class TestShareResponse(unittest.TestCase): - """ShareResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareResponse: - """Test ShareResponse - include_optional 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 `ShareResponse` - """ - model = ShareResponse() - if include_optional: - return ShareResponse( - frontend_proxy_endpoints = [ - '' - ], - share_token = '' - ) - else: - return ShareResponse( - ) - """ - - def testShareResponse(self): - """Test ShareResponse""" - # 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/sdk/python/src/test/test_spark_data_sample.py b/sdk/python/src/test/test_spark_data_sample.py deleted file mode 100644 index 421d5dcd..00000000 --- a/sdk/python/src/test/test_spark_data_sample.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.spark_data_sample import SparkDataSample - -class TestSparkDataSample(unittest.TestCase): - """SparkDataSample unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SparkDataSample: - """Test SparkDataSample - include_optional 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 `SparkDataSample` - """ - model = SparkDataSample() - if include_optional: - return SparkDataSample( - rx = 1.337, - tx = 1.337 - ) - else: - return SparkDataSample( - ) - """ - - def testSparkDataSample(self): - """Test SparkDataSample""" - # 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/sdk/python/src/test/test_unaccess_request.py b/sdk/python/src/test/test_unaccess_request.py deleted file mode 100644 index ade50dff..00000000 --- a/sdk/python/src/test/test_unaccess_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.unaccess_request import UnaccessRequest - -class TestUnaccessRequest(unittest.TestCase): - """UnaccessRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnaccessRequest: - """Test UnaccessRequest - include_optional 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 `UnaccessRequest` - """ - model = UnaccessRequest() - if include_optional: - return UnaccessRequest( - frontend_token = '', - env_zid = '', - share_token = '' - ) - else: - return UnaccessRequest( - ) - """ - - def testUnaccessRequest(self): - """Test UnaccessRequest""" - # 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/sdk/python/src/test/test_unshare_request.py b/sdk/python/src/test/test_unshare_request.py deleted file mode 100644 index f0eccf47..00000000 --- a/sdk/python/src/test/test_unshare_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.unshare_request import UnshareRequest - -class TestUnshareRequest(unittest.TestCase): - """UnshareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnshareRequest: - """Test UnshareRequest - include_optional 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 `UnshareRequest` - """ - model = UnshareRequest() - if include_optional: - return UnshareRequest( - env_zid = '', - share_token = '', - reserved = True - ) - else: - return UnshareRequest( - ) - """ - - def testUnshareRequest(self): - """Test UnshareRequest""" - # 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/sdk/python/src/test/test_update_access_request.py b/sdk/python/src/test/test_update_access_request.py deleted file mode 100644 index 02c028bf..00000000 --- a/sdk/python/src/test/test_update_access_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.update_access_request import UpdateAccessRequest - -class TestUpdateAccessRequest(unittest.TestCase): - """UpdateAccessRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateAccessRequest: - """Test UpdateAccessRequest - include_optional 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 `UpdateAccessRequest` - """ - model = UpdateAccessRequest() - if include_optional: - return UpdateAccessRequest( - frontend_token = '', - bind_address = '', - description = '' - ) - else: - return UpdateAccessRequest( - ) - """ - - def testUpdateAccessRequest(self): - """Test UpdateAccessRequest""" - # 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/sdk/python/src/test/test_update_frontend_request.py b/sdk/python/src/test/test_update_frontend_request.py deleted file mode 100644 index 9546bbac..00000000 --- a/sdk/python/src/test/test_update_frontend_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.update_frontend_request import UpdateFrontendRequest - -class TestUpdateFrontendRequest(unittest.TestCase): - """UpdateFrontendRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateFrontendRequest: - """Test UpdateFrontendRequest - include_optional 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 `UpdateFrontendRequest` - """ - model = UpdateFrontendRequest() - if include_optional: - return UpdateFrontendRequest( - frontend_token = '', - public_name = '', - url_template = '' - ) - else: - return UpdateFrontendRequest( - ) - """ - - def testUpdateFrontendRequest(self): - """Test UpdateFrontendRequest""" - # 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/sdk/python/src/test/test_update_share_request.py b/sdk/python/src/test/test_update_share_request.py deleted file mode 100644 index 1d8df185..00000000 --- a/sdk/python/src/test/test_update_share_request.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.update_share_request import UpdateShareRequest - -class TestUpdateShareRequest(unittest.TestCase): - """UpdateShareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateShareRequest: - """Test UpdateShareRequest - include_optional 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 `UpdateShareRequest` - """ - model = UpdateShareRequest() - if include_optional: - return UpdateShareRequest( - share_token = '', - backend_proxy_endpoint = '', - add_access_grants = [ - '' - ], - remove_access_grants = [ - '' - ] - ) - else: - return UpdateShareRequest( - ) - """ - - def testUpdateShareRequest(self): - """Test UpdateShareRequest""" - # 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/sdk/python/src/test/test_verify200_response.py b/sdk/python/src/test/test_verify200_response.py deleted file mode 100644 index bf257b65..00000000 --- a/sdk/python/src/test/test_verify200_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.verify200_response import Verify200Response - -class TestVerify200Response(unittest.TestCase): - """Verify200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Verify200Response: - """Test Verify200Response - include_optional 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 `Verify200Response` - """ - model = Verify200Response() - if include_optional: - return Verify200Response( - email = '' - ) - else: - return Verify200Response( - ) - """ - - def testVerify200Response(self): - """Test Verify200Response""" - # 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/sdk/python/src/test/test_verify_request.py b/sdk/python/src/test/test_verify_request.py deleted file mode 100644 index c6f45d94..00000000 --- a/sdk/python/src/test/test_verify_request.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.verify_request import VerifyRequest - -class TestVerifyRequest(unittest.TestCase): - """VerifyRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VerifyRequest: - """Test VerifyRequest - include_optional 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 `VerifyRequest` - """ - model = VerifyRequest() - if include_optional: - return VerifyRequest( - register_token = '' - ) - else: - return VerifyRequest( - ) - """ - - def testVerifyRequest(self): - """Test VerifyRequest""" - # 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/sdk/python/src/test/test_version_inventory200_response.py b/sdk/python/src/test/test_version_inventory200_response.py deleted file mode 100644 index 7343fd1f..00000000 --- a/sdk/python/src/test/test_version_inventory200_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from zrok_api.models.version_inventory200_response import VersionInventory200Response - -class TestVersionInventory200Response(unittest.TestCase): - """VersionInventory200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VersionInventory200Response: - """Test VersionInventory200Response - include_optional 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 `VersionInventory200Response` - """ - model = VersionInventory200Response() - if include_optional: - return VersionInventory200Response( - controller_version = '' - ) - else: - return VersionInventory200Response( - ) - """ - - def testVersionInventory200Response(self): - """Test VersionInventory200Response""" - # 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/sdk/python/src/zrok_api/__init__.py b/sdk/python/src/zrok_api/__init__.py deleted file mode 100644 index bf54fba9..00000000 --- a/sdk/python/src/zrok_api/__init__.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "1.0.0" - -# import apis into sdk package -from zrok_api.api.account_api import AccountApi -from zrok_api.api.admin_api import AdminApi -from zrok_api.api.environment_api import EnvironmentApi -from zrok_api.api.metadata_api import MetadataApi -from zrok_api.api.share_api import ShareApi - -# import ApiClient -from zrok_api.api_response import ApiResponse -from zrok_api.api_client import ApiClient -from zrok_api.configuration import Configuration -from zrok_api.exceptions import OpenApiException -from zrok_api.exceptions import ApiTypeError -from zrok_api.exceptions import ApiValueError -from zrok_api.exceptions import ApiKeyError -from zrok_api.exceptions import ApiAttributeError -from zrok_api.exceptions import ApiException - -# import models into sdk package -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.models.configuration import Configuration -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.models.disable_request import DisableRequest -from zrok_api.models.enable_request import EnableRequest -from zrok_api.models.environment import Environment -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.frontend import Frontend -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.models.invite_request import InviteRequest -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.metrics import Metrics -from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.overview import Overview -from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.models.register_request import RegisterRequest -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.models.share import Share -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.models.update_share_request import UpdateShareRequest -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest -from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/src/zrok_api/api/__init__.py b/sdk/python/src/zrok_api/api/__init__.py deleted file mode 100644 index 714f0a37..00000000 --- a/sdk/python/src/zrok_api/api/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# flake8: noqa - -# import apis into api package -from zrok_api.api.account_api import AccountApi -from zrok_api.api.admin_api import AdminApi -from zrok_api.api.environment_api import EnvironmentApi -from zrok_api.api.metadata_api import MetadataApi -from zrok_api.api.share_api import ShareApi - diff --git a/sdk/python/src/zrok_api/api/account_api.py b/sdk/python/src/zrok_api/api/account_api.py deleted file mode 100644 index d6a93a82..00000000 --- a/sdk/python/src/zrok_api/api/account_api.py +++ /dev/null @@ -1,2261 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 StrictStr -from typing import Optional -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.models.invite_request import InviteRequest -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.models.register_request import RegisterRequest -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class AccountApi: - """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 change_password( - self, - body: Optional[ChangePasswordRequest] = 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, - ) -> None: - """change_password - - - :param body: - :type body: ChangePasswordRequest - :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._change_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '422': "str", - '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 change_password_with_http_info( - self, - body: Optional[ChangePasswordRequest] = 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[None]: - """change_password - - - :param body: - :type body: ChangePasswordRequest - :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._change_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '422': "str", - '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 change_password_without_preload_content( - self, - body: Optional[ChangePasswordRequest] = 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: - """change_password - - - :param body: - :type body: ChangePasswordRequest - :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._change_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '422': "str", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _change_password_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/changePassword', - 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 invite( - self, - body: Optional[InviteRequest] = 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, - ) -> None: - """invite - - - :param body: - :type body: InviteRequest - :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._invite_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': "str", - '401': None, - '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 invite_with_http_info( - self, - body: Optional[InviteRequest] = 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[None]: - """invite - - - :param body: - :type body: InviteRequest - :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._invite_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': "str", - '401': None, - '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 invite_without_preload_content( - self, - body: Optional[InviteRequest] = 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: - """invite - - - :param body: - :type body: InviteRequest - :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._invite_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': "str", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _invite_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/invite', - 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 login( - self, - body: Optional[LoginRequest] = 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, - ) -> str: - """login - - - :param body: - :type body: LoginRequest - :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._login_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': 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 login_with_http_info( - self, - body: Optional[LoginRequest] = 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[str]: - """login - - - :param body: - :type body: LoginRequest - :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._login_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': 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 login_without_preload_content( - self, - body: Optional[LoginRequest] = 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: - """login - - - :param body: - :type body: LoginRequest - :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._login_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _login_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/login', - 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 regenerate_account_token( - self, - body: Optional[RegenerateAccountTokenRequest] = 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, - ) -> RegenerateAccountToken200Response: - """regenerate_account_token - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._regenerate_account_token_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '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 regenerate_account_token_with_http_info( - self, - body: Optional[RegenerateAccountTokenRequest] = 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[RegenerateAccountToken200Response]: - """regenerate_account_token - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._regenerate_account_token_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '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 regenerate_account_token_without_preload_content( - self, - body: Optional[RegenerateAccountTokenRequest] = 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: - """regenerate_account_token - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._regenerate_account_token_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _regenerate_account_token_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/regenerateAccountToken', - 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 register( - self, - body: Optional[RegisterRequest] = 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, - ) -> RegenerateAccountToken200Response: - """register - - - :param body: - :type body: RegisterRequest - :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._register_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '422': "str", - '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 register_with_http_info( - self, - body: Optional[RegisterRequest] = 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[RegenerateAccountToken200Response]: - """register - - - :param body: - :type body: RegisterRequest - :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._register_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '422': "str", - '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 register_without_preload_content( - self, - body: Optional[RegisterRequest] = 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: - """register - - - :param body: - :type body: RegisterRequest - :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._register_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RegenerateAccountToken200Response", - '404': None, - '422': "str", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _register_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/register', - 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 reset_password( - self, - body: Optional[ResetPasswordRequest] = 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, - ) -> None: - """reset_password - - - :param body: - :type body: ResetPasswordRequest - :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._reset_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '404': None, - '422': "str", - '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 reset_password_with_http_info( - self, - body: Optional[ResetPasswordRequest] = 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[None]: - """reset_password - - - :param body: - :type body: ResetPasswordRequest - :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._reset_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '404': None, - '422': "str", - '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 reset_password_without_preload_content( - self, - body: Optional[ResetPasswordRequest] = 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: - """reset_password - - - :param body: - :type body: ResetPasswordRequest - :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._reset_password_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '404': None, - '422': "str", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _reset_password_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/resetPassword', - 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 reset_password_request( - self, - body: Optional[RegenerateAccountTokenRequest] = 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, - ) -> None: - """reset_password_request - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._reset_password_request_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '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 reset_password_request_with_http_info( - self, - body: Optional[RegenerateAccountTokenRequest] = 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[None]: - """reset_password_request - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._reset_password_request_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '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 reset_password_request_without_preload_content( - self, - body: Optional[RegenerateAccountTokenRequest] = 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: - """reset_password_request - - - :param body: - :type body: RegenerateAccountTokenRequest - :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._reset_password_request_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _reset_password_request_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/resetPasswordRequest', - 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 verify( - self, - body: Optional[VerifyRequest] = 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, - ) -> Verify200Response: - """verify - - - :param body: - :type body: VerifyRequest - :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._verify_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Verify200Response", - '404': None, - '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 verify_with_http_info( - self, - body: Optional[VerifyRequest] = 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[Verify200Response]: - """verify - - - :param body: - :type body: VerifyRequest - :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._verify_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Verify200Response", - '404': None, - '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 verify_without_preload_content( - self, - body: Optional[VerifyRequest] = 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: - """verify - - - :param body: - :type body: VerifyRequest - :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._verify_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Verify200Response", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _verify_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/verify', - 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/sdk/python/src/zrok_api/api/admin_api.py b/sdk/python/src/zrok_api/api/admin_api.py deleted file mode 100644 index 6e0952fe..00000000 --- a/sdk/python/src/zrok_api/api/admin_api.py +++ /dev/null @@ -1,3855 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import List, Optional -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.models.verify200_response import Verify200Response - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class AdminApi: - """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_organization_member( - self, - body: Optional[AddOrganizationMemberRequest] = 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, - ) -> None: - """add_organization_member - - - :param body: - :type body: AddOrganizationMemberRequest - :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_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '401': None, - '404': None, - '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_organization_member_with_http_info( - self, - body: Optional[AddOrganizationMemberRequest] = 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[None]: - """add_organization_member - - - :param body: - :type body: AddOrganizationMemberRequest - :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_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '401': None, - '404': None, - '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_organization_member_without_preload_content( - self, - body: Optional[AddOrganizationMemberRequest] = 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: - """add_organization_member - - - :param body: - :type body: AddOrganizationMemberRequest - :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_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _add_organization_member_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization/add', - 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_account( - self, - body: Optional[LoginRequest] = 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, - ) -> RegenerateAccountToken200Response: - """create_account - - - :param body: - :type body: LoginRequest - :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_account_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "RegenerateAccountToken200Response", - '401': None, - '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_account_with_http_info( - self, - body: Optional[LoginRequest] = 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[RegenerateAccountToken200Response]: - """create_account - - - :param body: - :type body: LoginRequest - :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_account_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "RegenerateAccountToken200Response", - '401': None, - '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_account_without_preload_content( - self, - body: Optional[LoginRequest] = 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: - """create_account - - - :param body: - :type body: LoginRequest - :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_account_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "RegenerateAccountToken200Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_account_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/account', - 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_frontend( - self, - body: Optional[CreateFrontendRequest] = 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, - ) -> CreateFrontend201Response: - """create_frontend - - - :param body: - :type body: CreateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateFrontend201Response", - '400': None, - '401': None, - '404': None, - '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_frontend_with_http_info( - self, - body: Optional[CreateFrontendRequest] = 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[CreateFrontend201Response]: - """create_frontend - - - :param body: - :type body: CreateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateFrontend201Response", - '400': None, - '401': None, - '404': None, - '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_frontend_without_preload_content( - self, - body: Optional[CreateFrontendRequest] = 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: - """create_frontend - - - :param body: - :type body: CreateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateFrontend201Response", - '400': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_frontend_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/frontend', - 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_identity( - self, - body: Optional[CreateIdentityRequest] = 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, - ) -> CreateIdentity201Response: - """create_identity - - - :param body: - :type body: CreateIdentityRequest - :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_identity_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '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_identity_with_http_info( - self, - body: Optional[CreateIdentityRequest] = 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[CreateIdentity201Response]: - """create_identity - - - :param body: - :type body: CreateIdentityRequest - :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_identity_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '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_identity_without_preload_content( - self, - body: Optional[CreateIdentityRequest] = 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: - """create_identity - - - :param body: - :type body: CreateIdentityRequest - :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_identity_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_identity_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/identity', - 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_organization( - self, - body: Optional[CreateOrganizationRequest] = 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, - ) -> CreateOrganization201Response: - """create_organization - - - :param body: - :type body: CreateOrganizationRequest - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateOrganization201Response", - '401': None, - '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_organization_with_http_info( - self, - body: Optional[CreateOrganizationRequest] = 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[CreateOrganization201Response]: - """create_organization - - - :param body: - :type body: CreateOrganizationRequest - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateOrganization201Response", - '401': None, - '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_organization_without_preload_content( - self, - body: Optional[CreateOrganizationRequest] = 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: - """create_organization - - - :param body: - :type body: CreateOrganizationRequest - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateOrganization201Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_organization_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization', - 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_frontend( - self, - body: Optional[CreateFrontend201Response] = 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, - ) -> None: - """delete_frontend - - - :param body: - :type body: CreateFrontend201Response - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_with_http_info( - self, - body: Optional[CreateFrontend201Response] = 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[None]: - """delete_frontend - - - :param body: - :type body: CreateFrontend201Response - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_without_preload_content( - self, - body: Optional[CreateFrontend201Response] = 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: - """delete_frontend - - - :param body: - :type body: CreateFrontend201Response - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_frontend_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/frontend', - 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_organization( - self, - body: Optional[CreateOrganization201Response] = 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, - ) -> None: - """delete_organization - - - :param body: - :type body: CreateOrganization201Response - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_organization_with_http_info( - self, - body: Optional[CreateOrganization201Response] = 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[None]: - """delete_organization - - - :param body: - :type body: CreateOrganization201Response - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_organization_without_preload_content( - self, - body: Optional[CreateOrganization201Response] = 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: - """delete_organization - - - :param body: - :type body: CreateOrganization201Response - :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_organization_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_organization_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/organization', - 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 grants( - self, - body: Optional[Verify200Response] = 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, - ) -> None: - """grants - - - :param body: - :type body: Verify200Response - :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._grants_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 grants_with_http_info( - self, - body: Optional[Verify200Response] = 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[None]: - """grants - - - :param body: - :type body: Verify200Response - :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._grants_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 grants_without_preload_content( - self, - body: Optional[Verify200Response] = 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: - """grants - - - :param body: - :type body: Verify200Response - :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._grants_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _grants_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/grants', - 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 invite_token_generate( - self, - body: Optional[InviteTokenGenerateRequest] = 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, - ) -> None: - """invite_token_generate - - - :param body: - :type body: InviteTokenGenerateRequest - :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._invite_token_generate_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '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 invite_token_generate_with_http_info( - self, - body: Optional[InviteTokenGenerateRequest] = 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[None]: - """invite_token_generate - - - :param body: - :type body: InviteTokenGenerateRequest - :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._invite_token_generate_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '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 invite_token_generate_without_preload_content( - self, - body: Optional[InviteTokenGenerateRequest] = 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: - """invite_token_generate - - - :param body: - :type body: InviteTokenGenerateRequest - :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._invite_token_generate_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': None, - '400': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _invite_token_generate_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/invite/token/generate', - 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_frontends( - 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, - ) -> List[ListFrontends200ResponseInner]: - """list_frontends - - - :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_frontends_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFrontends200ResponseInner]", - '401': None, - '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_frontends_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[List[ListFrontends200ResponseInner]]: - """list_frontends - - - :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_frontends_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFrontends200ResponseInner]", - '401': None, - '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_frontends_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: - """list_frontends - - - :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_frontends_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListFrontends200ResponseInner]", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_frontends_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/frontends', - 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_organization_members( - self, - body: Optional[CreateOrganization201Response] = 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, - ) -> ListOrganizationMembers200Response: - """list_organization_members - - - :param body: - :type body: CreateOrganization201Response - :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_organization_members_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '401': None, - '404': None, - '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_organization_members_with_http_info( - self, - body: Optional[CreateOrganization201Response] = 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[ListOrganizationMembers200Response]: - """list_organization_members - - - :param body: - :type body: CreateOrganization201Response - :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_organization_members_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '401': None, - '404': None, - '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_organization_members_without_preload_content( - self, - body: Optional[CreateOrganization201Response] = 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_organization_members - - - :param body: - :type body: CreateOrganization201Response - :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_organization_members_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_organization_members_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization/list', - 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_organizations( - 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, - ) -> ListOrganizations200Response: - """list_organizations - - - :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_organizations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizations200Response", - '401': None, - '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_organizations_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[ListOrganizations200Response]: - """list_organizations - - - :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_organizations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizations200Response", - '401': None, - '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_organizations_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: - """list_organizations - - - :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_organizations_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizations200Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_organizations_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/organizations', - 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 remove_organization_member( - self, - body: Optional[RemoveOrganizationMemberRequest] = 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, - ) -> None: - """remove_organization_member - - - :param body: - :type body: RemoveOrganizationMemberRequest - :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._remove_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 remove_organization_member_with_http_info( - self, - body: Optional[RemoveOrganizationMemberRequest] = 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[None]: - """remove_organization_member - - - :param body: - :type body: RemoveOrganizationMemberRequest - :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._remove_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 remove_organization_member_without_preload_content( - self, - body: Optional[RemoveOrganizationMemberRequest] = 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: - """remove_organization_member - - - :param body: - :type body: RemoveOrganizationMemberRequest - :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._remove_organization_member_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _remove_organization_member_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/organization/remove', - 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_frontend( - self, - body: Optional[UpdateFrontendRequest] = 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, - ) -> None: - """update_frontend - - - :param body: - :type body: UpdateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_with_http_info( - self, - body: Optional[UpdateFrontendRequest] = 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[None]: - """update_frontend - - - :param body: - :type body: UpdateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_frontend_without_preload_content( - self, - body: Optional[UpdateFrontendRequest] = 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: - """update_frontend - - - :param body: - :type body: UpdateFrontendRequest - :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_frontend_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_frontend_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/frontend', - 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/sdk/python/src/zrok_api/api/environment_api.py b/sdk/python/src/zrok_api/api/environment_api.py deleted file mode 100644 index 4495d736..00000000 --- a/sdk/python/src/zrok_api/api/environment_api.py +++ /dev/null @@ -1,589 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.disable_request import DisableRequest -from zrok_api.models.enable_request import EnableRequest - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class EnvironmentApi: - """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 disable( - self, - body: Optional[DisableRequest] = 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, - ) -> None: - """disable - - - :param body: - :type body: DisableRequest - :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._disable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '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 disable_with_http_info( - self, - body: Optional[DisableRequest] = 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[None]: - """disable - - - :param body: - :type body: DisableRequest - :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._disable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '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 disable_without_preload_content( - self, - body: Optional[DisableRequest] = 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: - """disable - - - :param body: - :type body: DisableRequest - :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._disable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _disable_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/disable', - 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 enable( - self, - body: Optional[EnableRequest] = 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, - ) -> CreateIdentity201Response: - """enable - - - :param body: - :type body: EnableRequest - :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._enable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '404': None, - '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 enable_with_http_info( - self, - body: Optional[EnableRequest] = 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[CreateIdentity201Response]: - """enable - - - :param body: - :type body: EnableRequest - :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._enable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '404': None, - '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 enable_without_preload_content( - self, - body: Optional[EnableRequest] = 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: - """enable - - - :param body: - :type body: EnableRequest - :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._enable_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateIdentity201Response", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _enable_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/enable', - 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/sdk/python/src/zrok_api/api/metadata_api.py b/sdk/python/src/zrok_api/api/metadata_api.py deleted file mode 100644 index ae780e05..00000000 --- a/sdk/python/src/zrok_api/api/metadata_api.py +++ /dev/null @@ -1,4242 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import List, Optional -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.models.configuration import Configuration -from zrok_api.models.environment import Environment -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.frontend import Frontend -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.metrics import Metrics -from zrok_api.models.overview import Overview -from zrok_api.models.share import Share -from zrok_api.models.version_inventory200_response import VersionInventory200Response - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class MetadataApi: - """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 client_version_check( - self, - body: Optional[ClientVersionCheckRequest] = 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, - ) -> None: - """client_version_check - - - :param body: - :type body: ClientVersionCheckRequest - :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._client_version_check_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - 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 client_version_check_with_http_info( - self, - body: Optional[ClientVersionCheckRequest] = 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[None]: - """client_version_check - - - :param body: - :type body: ClientVersionCheckRequest - :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._client_version_check_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - 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 client_version_check_without_preload_content( - self, - body: Optional[ClientVersionCheckRequest] = 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: - """client_version_check - - - :param body: - :type body: ClientVersionCheckRequest - :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._client_version_check_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _client_version_check_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/clientVersionCheck', - 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 configuration( - 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, - ) -> Configuration: - """configuration - - - :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._configuration_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Configuration", - } - 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 configuration_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[Configuration]: - """configuration - - - :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._configuration_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Configuration", - } - 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 configuration_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: - """configuration - - - :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._configuration_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Configuration", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _configuration_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/configuration', - 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 get_account_detail( - 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, - ) -> List[Environment]: - """get_account_detail - - - :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_account_detail_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Environment]", - '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_account_detail_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[List[Environment]]: - """get_account_detail - - - :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_account_detail_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Environment]", - '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_account_detail_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_account_detail - - - :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_account_detail_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[Environment]", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_account_detail_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/account', - 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 get_account_metrics( - self, - 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, - ) -> Metrics: - """get_account_metrics - - - :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._get_account_metrics_serialize( - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '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_account_metrics_with_http_info( - self, - 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[Metrics]: - """get_account_metrics - - - :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._get_account_metrics_serialize( - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '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_account_metrics_without_preload_content( - self, - 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: - """get_account_metrics - - - :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._get_account_metrics_serialize( - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_account_metrics_serialize( - self, - 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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/metrics/account', - 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 get_environment_detail( - self, - env_zid: StrictStr, - _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, - ) -> EnvironmentAndResources: - """get_environment_detail - - - :param env_zid: (required) - :type env_zid: 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._get_environment_detail_serialize( - env_zid=env_zid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentAndResources", - '401': None, - '404': None, - '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_environment_detail_with_http_info( - self, - env_zid: StrictStr, - _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[EnvironmentAndResources]: - """get_environment_detail - - - :param env_zid: (required) - :type env_zid: 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._get_environment_detail_serialize( - env_zid=env_zid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentAndResources", - '401': None, - '404': None, - '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_environment_detail_without_preload_content( - self, - env_zid: StrictStr, - _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_environment_detail - - - :param env_zid: (required) - :type env_zid: 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._get_environment_detail_serialize( - env_zid=env_zid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EnvironmentAndResources", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_environment_detail_serialize( - self, - env_zid, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env_zid is not None: - _path_params['envZId'] = env_zid - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/environment/{envZId}', - 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 get_environment_metrics( - self, - env_id: StrictStr, - 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, - ) -> Metrics: - """get_environment_metrics - - - :param env_id: (required) - :type env_id: str - :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._get_environment_metrics_serialize( - env_id=env_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': "Metrics", - '400': None, - '401': None, - '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_environment_metrics_with_http_info( - self, - env_id: StrictStr, - 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[Metrics]: - """get_environment_metrics - - - :param env_id: (required) - :type env_id: str - :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._get_environment_metrics_serialize( - env_id=env_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': "Metrics", - '400': None, - '401': None, - '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_environment_metrics_without_preload_content( - self, - env_id: StrictStr, - 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: - """get_environment_metrics - - - :param env_id: (required) - :type env_id: str - :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._get_environment_metrics_serialize( - env_id=env_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': "Metrics", - '400': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_environment_metrics_serialize( - self, - env_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env_id is not None: - _path_params['envId'] = env_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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/metrics/environment/{envId}', - 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 get_frontend_detail( - self, - frontend_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, - ) -> Frontend: - """get_frontend_detail - - - :param frontend_id: (required) - :type frontend_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._get_frontend_detail_serialize( - frontend_id=frontend_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Frontend", - '401': None, - '404': None, - '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_frontend_detail_with_http_info( - self, - frontend_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[Frontend]: - """get_frontend_detail - - - :param frontend_id: (required) - :type frontend_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._get_frontend_detail_serialize( - frontend_id=frontend_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Frontend", - '401': None, - '404': None, - '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_frontend_detail_without_preload_content( - self, - frontend_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: - """get_frontend_detail - - - :param frontend_id: (required) - :type frontend_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._get_frontend_detail_serialize( - frontend_id=frontend_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Frontend", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_frontend_detail_serialize( - self, - frontend_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if frontend_id is not None: - _path_params['frontendId'] = frontend_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/frontend/{frontendId}', - 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 get_share_detail( - self, - share_token: StrictStr, - _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, - ) -> Share: - """get_share_detail - - - :param share_token: (required) - :type share_token: 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._get_share_detail_serialize( - share_token=share_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Share", - '401': None, - '404': None, - '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_share_detail_with_http_info( - self, - share_token: StrictStr, - _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[Share]: - """get_share_detail - - - :param share_token: (required) - :type share_token: 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._get_share_detail_serialize( - share_token=share_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Share", - '401': None, - '404': None, - '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_share_detail_without_preload_content( - self, - share_token: StrictStr, - _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_share_detail - - - :param share_token: (required) - :type share_token: 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._get_share_detail_serialize( - share_token=share_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Share", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_share_detail_serialize( - self, - share_token, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if share_token is not None: - _path_params['shareToken'] = share_token - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detail/share/{shareToken}', - 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 get_share_metrics( - self, - share_token: StrictStr, - 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, - ) -> Metrics: - """get_share_metrics - - - :param share_token: (required) - :type share_token: str - :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._get_share_metrics_serialize( - share_token=share_token, - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '401': None, - '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_share_metrics_with_http_info( - self, - share_token: StrictStr, - 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[Metrics]: - """get_share_metrics - - - :param share_token: (required) - :type share_token: str - :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._get_share_metrics_serialize( - share_token=share_token, - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '401': None, - '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_share_metrics_without_preload_content( - self, - share_token: StrictStr, - 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: - """get_share_metrics - - - :param share_token: (required) - :type share_token: str - :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._get_share_metrics_serialize( - share_token=share_token, - duration=duration, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Metrics", - '400': None, - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_share_metrics_serialize( - self, - share_token, - 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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if share_token is not None: - _path_params['shareToken'] = share_token - # 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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/metrics/share/{shareToken}', - 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 get_sparklines( - self, - body: Optional[GetSparklinesRequest] = 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, - ) -> GetSparklines200Response: - """get_sparklines - - - :param body: - :type body: GetSparklinesRequest - :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_sparklines_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSparklines200Response", - '401': None, - '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_sparklines_with_http_info( - self, - body: Optional[GetSparklinesRequest] = 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[GetSparklines200Response]: - """get_sparklines - - - :param body: - :type body: GetSparklinesRequest - :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_sparklines_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSparklines200Response", - '401': None, - '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_sparklines_without_preload_content( - self, - body: Optional[GetSparklinesRequest] = 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: - """get_sparklines - - - :param body: - :type body: GetSparklinesRequest - :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_sparklines_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSparklines200Response", - '401': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_sparklines_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/sparklines', - 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_memberships( - 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, - ) -> ListMemberships200Response: - """list_memberships - - - :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_memberships_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMemberships200Response", - '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_memberships_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[ListMemberships200Response]: - """list_memberships - - - :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_memberships_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMemberships200Response", - '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_memberships_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: - """list_memberships - - - :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_memberships_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMemberships200Response", - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_memberships_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/memberships', - 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_org_members( - self, - organization_token: StrictStr, - _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, - ) -> ListOrganizationMembers200Response: - """list_org_members - - - :param organization_token: (required) - :type organization_token: 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._list_org_members_serialize( - organization_token=organization_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '404': None, - '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_org_members_with_http_info( - self, - organization_token: StrictStr, - _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[ListOrganizationMembers200Response]: - """list_org_members - - - :param organization_token: (required) - :type organization_token: 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._list_org_members_serialize( - organization_token=organization_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '404': None, - '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_org_members_without_preload_content( - self, - organization_token: StrictStr, - _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_org_members - - - :param organization_token: (required) - :type organization_token: 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._list_org_members_serialize( - organization_token=organization_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOrganizationMembers200Response", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_org_members_serialize( - self, - organization_token, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if organization_token is not None: - _path_params['organizationToken'] = organization_token - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/members/{organizationToken}', - 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 org_account_overview( - self, - organization_token: StrictStr, - account_email: StrictStr, - _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, - ) -> Overview: - """org_account_overview - - - :param organization_token: (required) - :type organization_token: str - :param account_email: (required) - :type account_email: 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._org_account_overview_serialize( - organization_token=organization_token, - account_email=account_email, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '404': None, - '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 org_account_overview_with_http_info( - self, - organization_token: StrictStr, - account_email: StrictStr, - _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[Overview]: - """org_account_overview - - - :param organization_token: (required) - :type organization_token: str - :param account_email: (required) - :type account_email: 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._org_account_overview_serialize( - organization_token=organization_token, - account_email=account_email, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '404': None, - '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 org_account_overview_without_preload_content( - self, - organization_token: StrictStr, - account_email: StrictStr, - _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: - """org_account_overview - - - :param organization_token: (required) - :type organization_token: str - :param account_email: (required) - :type account_email: 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._org_account_overview_serialize( - organization_token=organization_token, - account_email=account_email, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _org_account_overview_serialize( - self, - organization_token, - account_email, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if organization_token is not None: - _path_params['organizationToken'] = organization_token - if account_email is not None: - _path_params['accountEmail'] = account_email - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/overview/{organizationToken}/{accountEmail}', - 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 overview( - 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, - ) -> Overview: - """overview - - - :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._overview_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '500': "str", - } - 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 overview_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[Overview]: - """overview - - - :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._overview_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '500': "str", - } - 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 overview_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: - """overview - - - :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._overview_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Overview", - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _overview_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/overview', - 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 version( - 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, - ) -> str: - """version - - - :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._version_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - 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 version_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[str]: - """version - - - :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._version_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - 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 version_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: - """version - - - :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._version_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _version_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/version', - 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 version_inventory( - 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, - ) -> VersionInventory200Response: - """version_inventory - - - :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._version_inventory_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionInventory200Response", - } - 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 version_inventory_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[VersionInventory200Response]: - """version_inventory - - - :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._version_inventory_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionInventory200Response", - } - 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 version_inventory_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: - """version_inventory - - - :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._version_inventory_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionInventory200Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _version_inventory_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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/versions', - 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/sdk/python/src/zrok_api/api/share_api.py b/sdk/python/src/zrok_api/api/share_api.py deleted file mode 100644 index 626035ee..00000000 --- a/sdk/python/src/zrok_api/api/share_api.py +++ /dev/null @@ -1,1712 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.models.update_share_request import UpdateShareRequest - -from zrok_api.api_client import ApiClient, RequestSerialized -from zrok_api.api_response import ApiResponse -from zrok_api.rest import RESTResponseType - - -class ShareApi: - """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 access( - self, - body: Optional[AccessRequest] = 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, - ) -> Access201Response: - """access - - - :param body: - :type body: AccessRequest - :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._access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "Access201Response", - '401': None, - '404': None, - '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 access_with_http_info( - self, - body: Optional[AccessRequest] = 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[Access201Response]: - """access - - - :param body: - :type body: AccessRequest - :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._access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "Access201Response", - '401': None, - '404': None, - '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 access_without_preload_content( - self, - body: Optional[AccessRequest] = 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: - """access - - - :param body: - :type body: AccessRequest - :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._access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "Access201Response", - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _access_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/access', - 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 share( - self, - body: Optional[ShareRequest] = 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, - ) -> ShareResponse: - """share - - - :param body: - :type body: ShareRequest - :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._share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareResponse", - '401': None, - '404': None, - '409': None, - '422': None, - '500': "str", - } - 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 share_with_http_info( - self, - body: Optional[ShareRequest] = 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[ShareResponse]: - """share - - - :param body: - :type body: ShareRequest - :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._share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareResponse", - '401': None, - '404': None, - '409': None, - '422': None, - '500': "str", - } - 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 share_without_preload_content( - self, - body: Optional[ShareRequest] = 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: - """share - - - :param body: - :type body: ShareRequest - :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._share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareResponse", - '401': None, - '404': None, - '409': None, - '422': None, - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _share_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/share', - 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 unaccess( - self, - body: Optional[UnaccessRequest] = 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, - ) -> None: - """unaccess - - - :param body: - :type body: UnaccessRequest - :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._unaccess_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 unaccess_with_http_info( - self, - body: Optional[UnaccessRequest] = 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[None]: - """unaccess - - - :param body: - :type body: UnaccessRequest - :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._unaccess_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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 unaccess_without_preload_content( - self, - body: Optional[UnaccessRequest] = 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: - """unaccess - - - :param body: - :type body: UnaccessRequest - :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._unaccess_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _unaccess_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/unaccess', - 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 unshare( - self, - body: Optional[UnshareRequest] = 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, - ) -> None: - """unshare - - - :param body: - :type body: UnshareRequest - :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._unshare_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': "str", - } - 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 unshare_with_http_info( - self, - body: Optional[UnshareRequest] = 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[None]: - """unshare - - - :param body: - :type body: UnshareRequest - :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._unshare_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': "str", - } - 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 unshare_without_preload_content( - self, - body: Optional[UnshareRequest] = 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: - """unshare - - - :param body: - :type body: UnshareRequest - :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._unshare_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _unshare_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/zrok.v1+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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/unshare', - 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_access( - self, - body: Optional[UpdateAccessRequest] = 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, - ) -> None: - """update_access - - - :param body: - :type body: UpdateAccessRequest - :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_access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_access_with_http_info( - self, - body: Optional[UpdateAccessRequest] = 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[None]: - """update_access - - - :param body: - :type body: UpdateAccessRequest - :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_access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '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_access_without_preload_content( - self, - body: Optional[UpdateAccessRequest] = 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: - """update_access - - - :param body: - :type body: UpdateAccessRequest - :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_access_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_access_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/access', - 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_share( - self, - body: Optional[UpdateShareRequest] = 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, - ) -> None: - """update_share - - - :param body: - :type body: UpdateShareRequest - :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_share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '404': None, - '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_share_with_http_info( - self, - body: Optional[UpdateShareRequest] = 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[None]: - """update_share - - - :param body: - :type body: UpdateShareRequest - :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_share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '404': None, - '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_share_without_preload_content( - self, - body: Optional[UpdateShareRequest] = 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: - """update_share - - - :param body: - :type body: UpdateShareRequest - :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_share_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '401': None, - '404': None, - '500': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_share_serialize( - self, - body, - _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, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _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 body is not None: - _body_params = body - - - - # 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/zrok.v1+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'key' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/share', - 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/sdk/python/src/zrok_api/api_client.py b/sdk/python/src/zrok_api/api_client.py deleted file mode 100644 index 7b417812..00000000 --- a/sdk/python/src/zrok_api/api_client.py +++ /dev/null @@ -1,797 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import datetime -from dateutil.parser import parse -from enum import Enum -import decimal -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union -from pydantic import SecretStr - -from zrok_api.configuration import Configuration -from zrok_api.api_response import ApiResponse, T as ApiResponseT -import zrok_api.models -from zrok_api import rest -from zrok_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - -RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> RequestSerialized: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - if files: - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None or self.configuration.ignore_operation_servers: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - raise e - - return response_data - - def response_deserialize( - self, - response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None - ) -> ApiResponse[ApiResponseT]: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - msg = "RESTResponse.read() must be called before passing it to response_deserialize()" - assert response_data.data is not None, msg - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - # deserialize response data - response_text = None - return_data = None - try: - if response_type == "bytearray": - return_data = response_data.data - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - elif response_type is not None: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type, content_type) - finally: - if not 200 <= response_data.status <= 299: - raise ApiException.from_response( - http_resp=response_data, - body=response_text, - data=return_data, - ) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is SecretStr, return obj.get_secret_value() - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is decimal.Decimal return string representation. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, Enum): - return obj.value - elif isinstance(obj, SecretStr): - return obj.get_secret_value() - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - elif isinstance(obj, decimal.Decimal): - return str(obj) - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): - obj_dict = obj.to_dict() - else: - obj_dict = obj.__dict__ - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - :param content_type: content type of response. - - :return: deserialized object. - """ - - # fetch data from response object - if content_type is None: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): - if response_text == "": - data = "" - else: - data = json.loads(response_text) - elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): - data = response_text - else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) - assert m is not None, "Malformed List type definition" - sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) - assert m is not None, "Malformed Dict type definition" - sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(zrok_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - elif klass == decimal.Decimal: - return decimal.Decimal(data) - elif issubclass(klass, Enum): - return self.__deserialize_enum(data, klass) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, quote(str(value))) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(map(str, item)) for item in new_params]) - - def files_parameters( - self, - files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], - ): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - for k, v in files.items(): - if isinstance(v, str): - with open(v, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - elif isinstance(v, bytes): - filename = k - filedata = v - elif isinstance(v, tuple): - filename, filedata = v - elif isinstance(v, list): - for file_param in v: - params.extend(self.files_parameters({k: file_param})) - continue - else: - raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) - assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __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. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/sdk/python/src/zrok_api/api_response.py b/sdk/python/src/zrok_api/api_response.py deleted file mode 100644 index 9bc7c11f..00000000 --- a/sdk/python/src/zrok_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Optional, Generic, Mapping, TypeVar -from pydantic import Field, StrictInt, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/sdk/python/src/zrok_api/configuration.py b/sdk/python/src/zrok_api/configuration.py deleted file mode 100644 index d504babc..00000000 --- a/sdk/python/src/zrok_api/configuration.py +++ /dev/null @@ -1,602 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import http.client as httplib -import logging -from logging import FileHandler -import multiprocessing -import sys -from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from typing_extensions import NotRequired, Self - -import urllib3 - - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -ServerVariablesT = Dict[str, str] - -GenericAuthSetting = TypedDict( - "GenericAuthSetting", - { - "type": str, - "in": str, - "key": str, - "value": str, - }, -) - - -OAuth2AuthSetting = TypedDict( - "OAuth2AuthSetting", - { - "type": Literal["oauth2"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -APIKeyAuthSetting = TypedDict( - "APIKeyAuthSetting", - { - "type": Literal["api_key"], - "in": str, - "key": str, - "value": Optional[str], - }, -) - - -BasicAuthSetting = TypedDict( - "BasicAuthSetting", - { - "type": Literal["basic"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": Optional[str], - }, -) - - -BearerFormatAuthSetting = TypedDict( - "BearerFormatAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "format": Literal["JWT"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -BearerAuthSetting = TypedDict( - "BearerAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -HTTPSignatureAuthSetting = TypedDict( - "HTTPSignatureAuthSetting", - { - "type": Literal["http-signature"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": None, - }, -) - - -AuthSettings = TypedDict( - "AuthSettings", - { - "key": APIKeyAuthSetting, - }, - total=False, -) - - -class HostSettingVariable(TypedDict): - description: str - default_value: str - enum_values: List[str] - - -class HostSetting(TypedDict): - url: str - description: str - variables: NotRequired[Dict[str, HostSettingVariable]] - - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: Number of retries for API requests. - :param ca_cert_data: verify the peer using concatenated CA certificate data - in PEM (str) or DER (bytes) format. - - :Example: - - API Key Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - cookieAuth: # name for the security scheme - type: apiKey - in: cookie - name: JSESSIONID # cookie name - - You can programmatically set the cookie: - -conf = zrok_api.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} -) - - The following cookie will be added to the HTTP request: - Cookie: JSESSIONID abc123 - """ - - _default: ClassVar[Optional[Self]] = None - - def __init__( - self, - host: Optional[str]=None, - api_key: Optional[Dict[str, str]]=None, - api_key_prefix: Optional[Dict[str, str]]=None, - username: Optional[str]=None, - password: Optional[str]=None, - access_token: Optional[str]=None, - server_index: Optional[int]=None, - server_variables: Optional[ServerVariablesT]=None, - server_operation_index: Optional[Dict[int, int]]=None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, - ignore_operation_servers: bool=False, - ssl_ca_cert: Optional[str]=None, - retries: Optional[int] = None, - ca_cert_data: Optional[Union[str, bytes]] = None, - *, - debug: Optional[bool] = None, - ) -> None: - """Constructor - """ - self._base_path = "/api/v1" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.ignore_operation_servers = ignore_operation_servers - """Ignore operation servers - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("zrok_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler: Optional[FileHandler] = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - if debug is not None: - self.debug = debug - else: - self.__debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.ca_cert_data = ca_cert_data - """Set this to verify the peer using PEM (str) or DER (bytes) - certificate data. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy: Optional[str] = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = retries - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name: str, value: Any) -> None: - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default: Optional[Self]) -> None: - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls) -> Self: - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls) -> Self: - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = cls() - return cls._default - - @property - def logger_file(self) -> Optional[str]: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value: Optional[str]) -> None: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self) -> bool: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value: bool) -> None: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self) -> str: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value: str) -> None: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - return None - - def get_basic_auth_token(self) -> Optional[str]: - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self)-> AuthSettings: - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth: AuthSettings = {} - if 'key' in self.api_key: - auth['key'] = { - 'type': 'api_key', - 'in': 'header', - 'key': 'x-token', - 'value': self.get_api_key_with_prefix( - 'key', - ), - } - return auth - - def to_debug_report(self) -> str: - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self) -> List[HostSetting]: - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "/api/v1", - 'description': "No description provided", - } - ] - - def get_host_from_settings( - self, - index: Optional[int], - variables: Optional[ServerVariablesT]=None, - servers: Optional[List[HostSetting]]=None, - ) -> str: - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self) -> str: - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value: str) -> None: - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/sdk/python/src/zrok_api/exceptions.py b/sdk/python/src/zrok_api/exceptions.py deleted file mode 100644 index 1b37d862..00000000 --- a/sdk/python/src/zrok_api/exceptions.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -from typing import Any, Optional -from typing_extensions import Self - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__( - self, - status=None, - reason=None, - http_resp=None, - *, - body: Optional[str] = None, - data: Optional[Any] = None, - ) -> None: - self.status = status - self.reason = reason - self.body = body - self.data = data - self.headers = None - - if http_resp: - if self.status is None: - self.status = http_resp.status - if self.reason is None: - self.reason = http_resp.reason - if self.body is None: - try: - self.body = http_resp.data.decode('utf-8') - except Exception: - pass - self.headers = http_resp.getheaders() - - @classmethod - def from_response( - cls, - *, - http_resp, - body: Optional[str], - data: Optional[Any], - ) -> Self: - if http_resp.status == 400: - raise BadRequestException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 401: - raise UnauthorizedException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 403: - raise ForbiddenException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 404: - raise NotFoundException(http_resp=http_resp, body=body, data=data) - - # Added new conditions for 409 and 422 - if http_resp.status == 409: - raise ConflictException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 422: - raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) - - if 500 <= http_resp.status <= 599: - raise ServiceException(http_resp=http_resp, body=body, data=data) - raise ApiException(http_resp=http_resp, body=body, data=data) - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.data or self.body: - error_message += "HTTP response body: {0}\n".format(self.data or self.body) - - return error_message - - -class BadRequestException(ApiException): - pass - - -class NotFoundException(ApiException): - pass - - -class UnauthorizedException(ApiException): - pass - - -class ForbiddenException(ApiException): - pass - - -class ServiceException(ApiException): - pass - - -class ConflictException(ApiException): - """Exception for HTTP 409 Conflict.""" - pass - - -class UnprocessableEntityException(ApiException): - """Exception for HTTP 422 Unprocessable Entity.""" - pass - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/sdk/python/src/zrok_api/models/__init__.py b/sdk/python/src/zrok_api/models/__init__.py deleted file mode 100644 index c4f5e3c4..00000000 --- a/sdk/python/src/zrok_api/models/__init__.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from zrok_api.models.access201_response import Access201Response -from zrok_api.models.access_request import AccessRequest -from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest -from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_request import ChangePasswordRequest -from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -from zrok_api.models.configuration import Configuration -from zrok_api.models.create_frontend201_response import CreateFrontend201Response -from zrok_api.models.create_frontend_request import CreateFrontendRequest -from zrok_api.models.create_identity201_response import CreateIdentity201Response -from zrok_api.models.create_identity_request import CreateIdentityRequest -from zrok_api.models.create_organization201_response import CreateOrganization201Response -from zrok_api.models.create_organization_request import CreateOrganizationRequest -from zrok_api.models.disable_request import DisableRequest -from zrok_api.models.enable_request import EnableRequest -from zrok_api.models.environment import Environment -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.frontend import Frontend -from zrok_api.models.get_sparklines200_response import GetSparklines200Response -from zrok_api.models.get_sparklines_request import GetSparklinesRequest -from zrok_api.models.invite_request import InviteRequest -from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest -from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner -from zrok_api.models.list_memberships200_response import ListMemberships200Response -from zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner -from zrok_api.models.list_organization_members200_response import ListOrganizationMembers200Response -from zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner -from zrok_api.models.list_organizations200_response import ListOrganizations200Response -from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner -from zrok_api.models.login_request import LoginRequest -from zrok_api.models.metrics import Metrics -from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.overview import Overview -from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token200_response import RegenerateAccountToken200Response -from zrok_api.models.regenerate_account_token_request import RegenerateAccountTokenRequest -from zrok_api.models.register_request import RegisterRequest -from zrok_api.models.remove_organization_member_request import RemoveOrganizationMemberRequest -from zrok_api.models.reset_password_request import ResetPasswordRequest -from zrok_api.models.share import Share -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.unaccess_request import UnaccessRequest -from zrok_api.models.unshare_request import UnshareRequest -from zrok_api.models.update_access_request import UpdateAccessRequest -from zrok_api.models.update_frontend_request import UpdateFrontendRequest -from zrok_api.models.update_share_request import UpdateShareRequest -from zrok_api.models.verify200_response import Verify200Response -from zrok_api.models.verify_request import VerifyRequest -from zrok_api.models.version_inventory200_response import VersionInventory200Response diff --git a/sdk/python/src/zrok_api/models/access201_response.py b/sdk/python/src/zrok_api/models/access201_response.py deleted file mode 100644 index 6058082c..00000000 --- a/sdk/python/src/zrok_api/models/access201_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class Access201Response(BaseModel): - """ - Access201Response - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - __properties: ClassVar[List[str]] = ["frontendToken", "backendMode"] - - 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 Access201Response 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 Access201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "backendMode": obj.get("backendMode") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/access_request.py b/sdk/python/src/zrok_api/models/access_request.py deleted file mode 100644 index 18eb9837..00000000 --- a/sdk/python/src/zrok_api/models/access_request.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class AccessRequest(BaseModel): - """ - AccessRequest - """ # noqa: E501 - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["envZId", "shareToken", "bindAddress", "description"] - - 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 AccessRequest 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 AccessRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "envZId": obj.get("envZId"), - "shareToken": obj.get("shareToken"), - "bindAddress": obj.get("bindAddress"), - "description": obj.get("description") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/add_organization_member_request.py b/sdk/python/src/zrok_api/models/add_organization_member_request.py deleted file mode 100644 index d6db9e38..00000000 --- a/sdk/python/src/zrok_api/models/add_organization_member_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class AddOrganizationMemberRequest(BaseModel): - """ - AddOrganizationMemberRequest - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - email: Optional[StrictStr] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["organizationToken", "email", "admin"] - - 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 AddOrganizationMemberRequest 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 AddOrganizationMemberRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "email": obj.get("email"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/auth_user.py b/sdk/python/src/zrok_api/models/auth_user.py deleted file mode 100644 index b8e1718d..00000000 --- a/sdk/python/src/zrok_api/models/auth_user.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 AuthUser(BaseModel): - """ - AuthUser - """ # noqa: E501 - username: Optional[StrictStr] = None - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["username", "password"] - - 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 AuthUser 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 AuthUser from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "username": obj.get("username"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/change_password_request.py b/sdk/python/src/zrok_api/models/change_password_request.py deleted file mode 100644 index dcbdafb3..00000000 --- a/sdk/python/src/zrok_api/models/change_password_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ChangePasswordRequest(BaseModel): - """ - ChangePasswordRequest - """ # noqa: E501 - email: Optional[StrictStr] = None - old_password: Optional[StrictStr] = Field(default=None, alias="oldPassword") - new_password: Optional[StrictStr] = Field(default=None, alias="newPassword") - __properties: ClassVar[List[str]] = ["email", "oldPassword", "newPassword"] - - 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 ChangePasswordRequest 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 ChangePasswordRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "oldPassword": obj.get("oldPassword"), - "newPassword": obj.get("newPassword") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/client_version_check_request.py b/sdk/python/src/zrok_api/models/client_version_check_request.py deleted file mode 100644 index 813e57ac..00000000 --- a/sdk/python/src/zrok_api/models/client_version_check_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ClientVersionCheckRequest(BaseModel): - """ - ClientVersionCheckRequest - """ # noqa: E501 - client_version: Optional[StrictStr] = Field(default=None, alias="clientVersion") - __properties: ClassVar[List[str]] = ["clientVersion"] - - 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 ClientVersionCheckRequest 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 ClientVersionCheckRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "clientVersion": obj.get("clientVersion") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/configuration.py b/sdk/python/src/zrok_api/models/configuration.py deleted file mode 100644 index ed5ece38..00000000 --- a/sdk/python/src/zrok_api/models/configuration.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class Configuration(BaseModel): - """ - Configuration - """ # noqa: E501 - version: Optional[StrictStr] = None - tou_link: Optional[StrictStr] = Field(default=None, alias="touLink") - invites_open: Optional[StrictBool] = Field(default=None, alias="invitesOpen") - requires_invite_token: Optional[StrictBool] = Field(default=None, alias="requiresInviteToken") - invite_token_contact: Optional[StrictStr] = Field(default=None, alias="inviteTokenContact") - __properties: ClassVar[List[str]] = ["version", "touLink", "invitesOpen", "requiresInviteToken", "inviteTokenContact"] - - 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 Configuration 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 Configuration from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "version": obj.get("version"), - "touLink": obj.get("touLink"), - "invitesOpen": obj.get("invitesOpen"), - "requiresInviteToken": obj.get("requiresInviteToken"), - "inviteTokenContact": obj.get("inviteTokenContact") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/create_frontend201_response.py b/sdk/python/src/zrok_api/models/create_frontend201_response.py deleted file mode 100644 index 61fc364c..00000000 --- a/sdk/python/src/zrok_api/models/create_frontend201_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CreateFrontend201Response(BaseModel): - """ - CreateFrontend201Response - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - __properties: ClassVar[List[str]] = ["frontendToken"] - - 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 CreateFrontend201Response 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 CreateFrontend201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/create_frontend_request.py b/sdk/python/src/zrok_api/models/create_frontend_request.py deleted file mode 100644 index 5f7072e8..00000000 --- a/sdk/python/src/zrok_api/models/create_frontend_request.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CreateFrontendRequest(BaseModel): - """ - CreateFrontendRequest - """ # noqa: E501 - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - url_template: Optional[StrictStr] = None - public_name: Optional[StrictStr] = None - permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") - __properties: ClassVar[List[str]] = ["zId", "url_template", "public_name", "permissionMode"] - - @field_validator('permission_mode') - def permission_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['open', 'closed']): - raise ValueError("must be one of enum values ('open', 'closed')") - return value - - 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 CreateFrontendRequest 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 CreateFrontendRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "zId": obj.get("zId"), - "url_template": obj.get("url_template"), - "public_name": obj.get("public_name"), - "permissionMode": obj.get("permissionMode") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/create_identity201_response.py b/sdk/python/src/zrok_api/models/create_identity201_response.py deleted file mode 100644 index f2811bbf..00000000 --- a/sdk/python/src/zrok_api/models/create_identity201_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 CreateIdentity201Response(BaseModel): - """ - CreateIdentity201Response - """ # noqa: E501 - identity: Optional[StrictStr] = None - cfg: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["identity", "cfg"] - - 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 CreateIdentity201Response 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 CreateIdentity201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "identity": obj.get("identity"), - "cfg": obj.get("cfg") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/create_identity_request.py b/sdk/python/src/zrok_api/models/create_identity_request.py deleted file mode 100644 index 9f21d0a8..00000000 --- a/sdk/python/src/zrok_api/models/create_identity_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 CreateIdentityRequest(BaseModel): - """ - CreateIdentityRequest - """ # noqa: E501 - name: Optional[StrictStr] = None - __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 CreateIdentityRequest 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 CreateIdentityRequest 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/sdk/python/src/zrok_api/models/create_organization201_response.py b/sdk/python/src/zrok_api/models/create_organization201_response.py deleted file mode 100644 index 431bf57a..00000000 --- a/sdk/python/src/zrok_api/models/create_organization201_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class CreateOrganization201Response(BaseModel): - """ - CreateOrganization201Response - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - __properties: ClassVar[List[str]] = ["organizationToken"] - - 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 CreateOrganization201Response 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 CreateOrganization201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/create_organization_request.py b/sdk/python/src/zrok_api/models/create_organization_request.py deleted file mode 100644 index de5d6572..00000000 --- a/sdk/python/src/zrok_api/models/create_organization_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 CreateOrganizationRequest(BaseModel): - """ - CreateOrganizationRequest - """ # noqa: E501 - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["description"] - - 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 CreateOrganizationRequest 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 CreateOrganizationRequest 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") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/disable_request.py b/sdk/python/src/zrok_api/models/disable_request.py deleted file mode 100644 index a6c30a01..00000000 --- a/sdk/python/src/zrok_api/models/disable_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 DisableRequest(BaseModel): - """ - DisableRequest - """ # noqa: E501 - identity: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["identity"] - - 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 DisableRequest 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 DisableRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "identity": obj.get("identity") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/enable_request.py b/sdk/python/src/zrok_api/models/enable_request.py deleted file mode 100644 index ad54886c..00000000 --- a/sdk/python/src/zrok_api/models/enable_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 EnableRequest(BaseModel): - """ - EnableRequest - """ # noqa: E501 - description: Optional[StrictStr] = None - host: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["description", "host"] - - 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 EnableRequest 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 EnableRequest 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"), - "host": obj.get("host") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/environment.py b/sdk/python/src/zrok_api/models/environment.py deleted file mode 100644 index 063ff59e..00000000 --- a/sdk/python/src/zrok_api/models/environment.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.spark_data_sample import SparkDataSample -from typing import Optional, Set -from typing_extensions import Self - -class Environment(BaseModel): - """ - Environment - """ # noqa: E501 - description: Optional[StrictStr] = None - host: Optional[StrictStr] = None - address: Optional[StrictStr] = None - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - activity: Optional[List[SparkDataSample]] = None - limited: Optional[StrictBool] = None - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["description", "host", "address", "zId", "activity", "limited", "createdAt", "updatedAt"] - - 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 Environment 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 activity (list) - _items = [] - if self.activity: - for _item_activity in self.activity: - if _item_activity: - _items.append(_item_activity.to_dict()) - _dict['activity'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Environment 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"), - "host": obj.get("host"), - "address": obj.get("address"), - "zId": obj.get("zId"), - "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, - "limited": obj.get("limited"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/environment_and_resources.py b/sdk/python/src/zrok_api/models/environment_and_resources.py deleted file mode 100644 index 65e4f257..00000000 --- a/sdk/python/src/zrok_api/models/environment_and_resources.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.environment import Environment -from zrok_api.models.frontend import Frontend -from zrok_api.models.share import Share -from typing import Optional, Set -from typing_extensions import Self - -class EnvironmentAndResources(BaseModel): - """ - EnvironmentAndResources - """ # noqa: E501 - environment: Optional[Environment] = None - frontends: Optional[List[Frontend]] = None - shares: Optional[List[Share]] = None - __properties: ClassVar[List[str]] = ["environment", "frontends", "shares"] - - 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 EnvironmentAndResources 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 frontends (list) - _items = [] - if self.frontends: - for _item_frontends in self.frontends: - if _item_frontends: - _items.append(_item_frontends.to_dict()) - _dict['frontends'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shares (list) - _items = [] - if self.shares: - for _item_shares in self.shares: - if _item_shares: - _items.append(_item_shares.to_dict()) - _dict['shares'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EnvironmentAndResources from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "environment": Environment.from_dict(obj["environment"]) if obj.get("environment") is not None else None, - "frontends": [Frontend.from_dict(_item) for _item in obj["frontends"]] if obj.get("frontends") is not None else None, - "shares": [Share.from_dict(_item) for _item in obj["shares"]] if obj.get("shares") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/frontend.py b/sdk/python/src/zrok_api/models/frontend.py deleted file mode 100644 index ae3c4c5d..00000000 --- a/sdk/python/src/zrok_api/models/frontend.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class Frontend(BaseModel): - """ - Frontend - """ # noqa: E501 - id: Optional[StrictInt] = None - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") - description: Optional[StrictStr] = None - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["id", "frontendToken", "shareToken", "backendMode", "bindAddress", "description", "zId", "createdAt", "updatedAt"] - - 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 Frontend 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 Frontend 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"), - "frontendToken": obj.get("frontendToken"), - "shareToken": obj.get("shareToken"), - "backendMode": obj.get("backendMode"), - "bindAddress": obj.get("bindAddress"), - "description": obj.get("description"), - "zId": obj.get("zId"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/get_sparklines200_response.py b/sdk/python/src/zrok_api/models/get_sparklines200_response.py deleted file mode 100644 index 177b0efa..00000000 --- a/sdk/python/src/zrok_api/models/get_sparklines200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics import Metrics -from typing import Optional, Set -from typing_extensions import Self - -class GetSparklines200Response(BaseModel): - """ - GetSparklines200Response - """ # noqa: E501 - sparklines: Optional[List[Metrics]] = None - __properties: ClassVar[List[str]] = ["sparklines"] - - 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 GetSparklines200Response 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 sparklines (list) - _items = [] - if self.sparklines: - for _item_sparklines in self.sparklines: - if _item_sparklines: - _items.append(_item_sparklines.to_dict()) - _dict['sparklines'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetSparklines200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "sparklines": [Metrics.from_dict(_item) for _item in obj["sparklines"]] if obj.get("sparklines") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/get_sparklines_request.py b/sdk/python/src/zrok_api/models/get_sparklines_request.py deleted file mode 100644 index d9bef43d..00000000 --- a/sdk/python/src/zrok_api/models/get_sparklines_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 GetSparklinesRequest(BaseModel): - """ - GetSparklinesRequest - """ # noqa: E501 - account: Optional[StrictBool] = None - environments: Optional[List[StrictStr]] = None - shares: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["account", "environments", "shares"] - - 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 GetSparklinesRequest 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 GetSparklinesRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "account": obj.get("account"), - "environments": obj.get("environments"), - "shares": obj.get("shares") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/invite_request.py b/sdk/python/src/zrok_api/models/invite_request.py deleted file mode 100644 index 1c5bcc76..00000000 --- a/sdk/python/src/zrok_api/models/invite_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class InviteRequest(BaseModel): - """ - InviteRequest - """ # noqa: E501 - email: Optional[StrictStr] = None - invite_token: Optional[StrictStr] = Field(default=None, alias="inviteToken") - __properties: ClassVar[List[str]] = ["email", "inviteToken"] - - 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 InviteRequest 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 InviteRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "inviteToken": obj.get("inviteToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/invite_token_generate_request.py b/sdk/python/src/zrok_api/models/invite_token_generate_request.py deleted file mode 100644 index dd876de6..00000000 --- a/sdk/python/src/zrok_api/models/invite_token_generate_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class InviteTokenGenerateRequest(BaseModel): - """ - InviteTokenGenerateRequest - """ # noqa: E501 - invite_tokens: Optional[List[StrictStr]] = Field(default=None, alias="inviteTokens") - __properties: ClassVar[List[str]] = ["inviteTokens"] - - 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 InviteTokenGenerateRequest 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 InviteTokenGenerateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "inviteTokens": obj.get("inviteTokens") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py b/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py deleted file mode 100644 index ff9d1bb4..00000000 --- a/sdk/python/src/zrok_api/models/list_frontends200_response_inner.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ListFrontends200ResponseInner(BaseModel): - """ - ListFrontends200ResponseInner - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") - public_name: Optional[StrictStr] = Field(default=None, alias="publicName") - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["frontendToken", "zId", "urlTemplate", "publicName", "createdAt", "updatedAt"] - - 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 ListFrontends200ResponseInner 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 ListFrontends200ResponseInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "zId": obj.get("zId"), - "urlTemplate": obj.get("urlTemplate"), - "publicName": obj.get("publicName"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_memberships200_response.py b/sdk/python/src/zrok_api/models/list_memberships200_response.py deleted file mode 100644 index f3db8fa7..00000000 --- a/sdk/python/src/zrok_api/models/list_memberships200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.list_memberships200_response_memberships_inner import ListMemberships200ResponseMembershipsInner -from typing import Optional, Set -from typing_extensions import Self - -class ListMemberships200Response(BaseModel): - """ - ListMemberships200Response - """ # noqa: E501 - memberships: Optional[List[ListMemberships200ResponseMembershipsInner]] = None - __properties: ClassVar[List[str]] = ["memberships"] - - 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 ListMemberships200Response 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 memberships (list) - _items = [] - if self.memberships: - for _item_memberships in self.memberships: - if _item_memberships: - _items.append(_item_memberships.to_dict()) - _dict['memberships'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListMemberships200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "memberships": [ListMemberships200ResponseMembershipsInner.from_dict(_item) for _item in obj["memberships"]] if obj.get("memberships") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py b/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py deleted file mode 100644 index e39b07b8..00000000 --- a/sdk/python/src/zrok_api/models/list_memberships200_response_memberships_inner.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class ListMemberships200ResponseMembershipsInner(BaseModel): - """ - ListMemberships200ResponseMembershipsInner - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - description: Optional[StrictStr] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["organizationToken", "description", "admin"] - - 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 ListMemberships200ResponseMembershipsInner 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 ListMemberships200ResponseMembershipsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "description": obj.get("description"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_organization_members200_response.py b/sdk/python/src/zrok_api/models/list_organization_members200_response.py deleted file mode 100644 index 6058124c..00000000 --- a/sdk/python/src/zrok_api/models/list_organization_members200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organization_members200_response_members_inner import ListOrganizationMembers200ResponseMembersInner -from typing import Optional, Set -from typing_extensions import Self - -class ListOrganizationMembers200Response(BaseModel): - """ - ListOrganizationMembers200Response - """ # noqa: E501 - members: Optional[List[ListOrganizationMembers200ResponseMembersInner]] = None - __properties: ClassVar[List[str]] = ["members"] - - 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 ListOrganizationMembers200Response 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 members (list) - _items = [] - if self.members: - for _item_members in self.members: - if _item_members: - _items.append(_item_members.to_dict()) - _dict['members'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListOrganizationMembers200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "members": [ListOrganizationMembers200ResponseMembersInner.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py b/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py deleted file mode 100644 index 0266e878..00000000 --- a/sdk/python/src/zrok_api/models/list_organization_members200_response_members_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 ListOrganizationMembers200ResponseMembersInner(BaseModel): - """ - ListOrganizationMembers200ResponseMembersInner - """ # noqa: E501 - email: Optional[StrictStr] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["email", "admin"] - - 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 ListOrganizationMembers200ResponseMembersInner 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 ListOrganizationMembers200ResponseMembersInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_organizations200_response.py b/sdk/python/src/zrok_api/models/list_organizations200_response.py deleted file mode 100644 index 03fe63da..00000000 --- a/sdk/python/src/zrok_api/models/list_organizations200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner -from typing import Optional, Set -from typing_extensions import Self - -class ListOrganizations200Response(BaseModel): - """ - ListOrganizations200Response - """ # noqa: E501 - organizations: Optional[List[ListOrganizations200ResponseOrganizationsInner]] = None - __properties: ClassVar[List[str]] = ["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 ListOrganizations200Response 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_organizations in self.organizations: - if _item_organizations: - _items.append(_item_organizations.to_dict()) - _dict['organizations'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListOrganizations200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizations": [ListOrganizations200ResponseOrganizationsInner.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py b/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py deleted file mode 100644 index 463e142a..00000000 --- a/sdk/python/src/zrok_api/models/list_organizations200_response_organizations_inner.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ListOrganizations200ResponseOrganizationsInner(BaseModel): - """ - ListOrganizations200ResponseOrganizationsInner - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["organizationToken", "description"] - - 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 ListOrganizations200ResponseOrganizationsInner 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 ListOrganizations200ResponseOrganizationsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "description": obj.get("description") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/login_request.py b/sdk/python/src/zrok_api/models/login_request.py deleted file mode 100644 index 6ef640ea..00000000 --- a/sdk/python/src/zrok_api/models/login_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 LoginRequest(BaseModel): - """ - LoginRequest - """ # noqa: E501 - email: Optional[StrictStr] = None - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["email", "password"] - - 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 LoginRequest 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 LoginRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/metrics.py b/sdk/python/src/zrok_api/models/metrics.py deleted file mode 100644 index 40db696c..00000000 --- a/sdk/python/src/zrok_api/models/metrics.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 zrok_api.models.metrics_sample import MetricsSample -from typing import Optional, Set -from typing_extensions import Self - -class Metrics(BaseModel): - """ - Metrics - """ # noqa: E501 - scope: Optional[StrictStr] = None - id: Optional[StrictStr] = None - period: Optional[Union[StrictFloat, StrictInt]] = None - samples: Optional[List[MetricsSample]] = None - __properties: ClassVar[List[str]] = ["scope", "id", "period", "samples"] - - 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 Metrics 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 samples (list) - _items = [] - if self.samples: - for _item_samples in self.samples: - if _item_samples: - _items.append(_item_samples.to_dict()) - _dict['samples'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Metrics from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "scope": obj.get("scope"), - "id": obj.get("id"), - "period": obj.get("period"), - "samples": [MetricsSample.from_dict(_item) for _item in obj["samples"]] if obj.get("samples") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/metrics_sample.py b/sdk/python/src/zrok_api/models/metrics_sample.py deleted file mode 100644 index 678d0c1e..00000000 --- a/sdk/python/src/zrok_api/models/metrics_sample.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self - -class MetricsSample(BaseModel): - """ - MetricsSample - """ # noqa: E501 - rx: Optional[Union[StrictFloat, StrictInt]] = None - tx: Optional[Union[StrictFloat, StrictInt]] = None - timestamp: Optional[Union[StrictFloat, StrictInt]] = None - __properties: ClassVar[List[str]] = ["rx", "tx", "timestamp"] - - 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 MetricsSample 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 MetricsSample from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "rx": obj.get("rx"), - "tx": obj.get("tx"), - "timestamp": obj.get("timestamp") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/overview.py b/sdk/python/src/zrok_api/models/overview.py deleted file mode 100644 index 2feb65cc..00000000 --- a/sdk/python/src/zrok_api/models/overview.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from typing import Optional, Set -from typing_extensions import Self - -class Overview(BaseModel): - """ - Overview - """ # noqa: E501 - account_limited: Optional[StrictBool] = Field(default=None, alias="accountLimited") - environments: Optional[List[EnvironmentAndResources]] = None - __properties: ClassVar[List[str]] = ["accountLimited", "environments"] - - 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 Overview 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 environments (list) - _items = [] - if self.environments: - for _item_environments in self.environments: - if _item_environments: - _items.append(_item_environments.to_dict()) - _dict['environments'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Overview from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "accountLimited": obj.get("accountLimited"), - "environments": [EnvironmentAndResources.from_dict(_item) for _item in obj["environments"]] if obj.get("environments") is not None else None - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/principal.py b/sdk/python/src/zrok_api/models/principal.py deleted file mode 100644 index 6ff9f756..00000000 --- a/sdk/python/src/zrok_api/models/principal.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 Principal(BaseModel): - """ - Principal - """ # noqa: E501 - id: Optional[StrictInt] = None - email: Optional[StrictStr] = None - token: Optional[StrictStr] = None - limitless: Optional[StrictBool] = None - admin: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["id", "email", "token", "limitless", "admin"] - - 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 Principal 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 Principal 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"), - "email": obj.get("email"), - "token": obj.get("token"), - "limitless": obj.get("limitless"), - "admin": obj.get("admin") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py b/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py deleted file mode 100644 index ccaf7ff4..00000000 --- a/sdk/python/src/zrok_api/models/regenerate_account_token200_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RegenerateAccountToken200Response(BaseModel): - """ - RegenerateAccountToken200Response - """ # noqa: E501 - account_token: Optional[StrictStr] = Field(default=None, alias="accountToken") - __properties: ClassVar[List[str]] = ["accountToken"] - - 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 RegenerateAccountToken200Response 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 RegenerateAccountToken200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "accountToken": obj.get("accountToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/regenerate_account_token_request.py b/sdk/python/src/zrok_api/models/regenerate_account_token_request.py deleted file mode 100644 index 32f2029f..00000000 --- a/sdk/python/src/zrok_api/models/regenerate_account_token_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RegenerateAccountTokenRequest(BaseModel): - """ - RegenerateAccountTokenRequest - """ # noqa: E501 - email_address: Optional[StrictStr] = Field(default=None, alias="emailAddress") - __properties: ClassVar[List[str]] = ["emailAddress"] - - 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 RegenerateAccountTokenRequest 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 RegenerateAccountTokenRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "emailAddress": obj.get("emailAddress") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/register_request.py b/sdk/python/src/zrok_api/models/register_request.py deleted file mode 100644 index f2bf90bd..00000000 --- a/sdk/python/src/zrok_api/models/register_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RegisterRequest(BaseModel): - """ - RegisterRequest - """ # noqa: E501 - register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["registerToken", "password"] - - 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 RegisterRequest 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 RegisterRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "registerToken": obj.get("registerToken"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/remove_organization_member_request.py b/sdk/python/src/zrok_api/models/remove_organization_member_request.py deleted file mode 100644 index 28b6bd25..00000000 --- a/sdk/python/src/zrok_api/models/remove_organization_member_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RemoveOrganizationMemberRequest(BaseModel): - """ - RemoveOrganizationMemberRequest - """ # noqa: E501 - organization_token: Optional[StrictStr] = Field(default=None, alias="organizationToken") - email: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["organizationToken", "email"] - - 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 RemoveOrganizationMemberRequest 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 RemoveOrganizationMemberRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationToken": obj.get("organizationToken"), - "email": obj.get("email") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/reset_password_request.py b/sdk/python/src/zrok_api/models/reset_password_request.py deleted file mode 100644 index a81c4bd3..00000000 --- a/sdk/python/src/zrok_api/models/reset_password_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ResetPasswordRequest(BaseModel): - """ - ResetPasswordRequest - """ # noqa: E501 - reset_token: Optional[StrictStr] = Field(default=None, alias="resetToken") - password: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["resetToken", "password"] - - 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 ResetPasswordRequest 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 ResetPasswordRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "resetToken": obj.get("resetToken"), - "password": obj.get("password") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/share.py b/sdk/python/src/zrok_api/models/share.py deleted file mode 100644 index aaf72fb8..00000000 --- a/sdk/python/src/zrok_api/models/share.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.spark_data_sample import SparkDataSample -from typing import Optional, Set -from typing_extensions import Self - -class Share(BaseModel): - """ - Share - """ # noqa: E501 - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - z_id: Optional[StrictStr] = Field(default=None, alias="zId") - share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - frontend_selection: Optional[StrictStr] = Field(default=None, alias="frontendSelection") - frontend_endpoint: Optional[StrictStr] = Field(default=None, alias="frontendEndpoint") - backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") - reserved: Optional[StrictBool] = None - activity: Optional[List[SparkDataSample]] = None - limited: Optional[StrictBool] = None - created_at: Optional[StrictInt] = Field(default=None, alias="createdAt") - updated_at: Optional[StrictInt] = Field(default=None, alias="updatedAt") - __properties: ClassVar[List[str]] = ["shareToken", "zId", "shareMode", "backendMode", "frontendSelection", "frontendEndpoint", "backendProxyEndpoint", "reserved", "activity", "limited", "createdAt", "updatedAt"] - - 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 Share 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 activity (list) - _items = [] - if self.activity: - for _item_activity in self.activity: - if _item_activity: - _items.append(_item_activity.to_dict()) - _dict['activity'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Share from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "shareToken": obj.get("shareToken"), - "zId": obj.get("zId"), - "shareMode": obj.get("shareMode"), - "backendMode": obj.get("backendMode"), - "frontendSelection": obj.get("frontendSelection"), - "frontendEndpoint": obj.get("frontendEndpoint"), - "backendProxyEndpoint": obj.get("backendProxyEndpoint"), - "reserved": obj.get("reserved"), - "activity": [SparkDataSample.from_dict(_item) for _item in obj["activity"]] if obj.get("activity") is not None else None, - "limited": obj.get("limited"), - "createdAt": obj.get("createdAt"), - "updatedAt": obj.get("updatedAt") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/share_request.py b/sdk/python/src/zrok_api/models/share_request.py deleted file mode 100644 index 7ea8d828..00000000 --- a/sdk/python/src/zrok_api/models/share_request.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from zrok_api.models.auth_user import AuthUser -from typing import Optional, Set -from typing_extensions import Self - -class ShareRequest(BaseModel): - """ - ShareRequest - """ # noqa: E501 - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_mode: Optional[StrictStr] = Field(default=None, alias="shareMode") - frontend_selection: Optional[List[StrictStr]] = Field(default=None, alias="frontendSelection") - backend_mode: Optional[StrictStr] = Field(default=None, alias="backendMode") - backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") - auth_scheme: Optional[StrictStr] = Field(default=None, alias="authScheme") - auth_users: Optional[List[AuthUser]] = Field(default=None, alias="authUsers") - oauth_provider: Optional[StrictStr] = Field(default=None, alias="oauthProvider") - oauth_email_domains: Optional[List[StrictStr]] = Field(default=None, alias="oauthEmailDomains") - oauth_authorization_check_interval: Optional[StrictStr] = Field(default=None, alias="oauthAuthorizationCheckInterval") - reserved: Optional[StrictBool] = None - permission_mode: Optional[StrictStr] = Field(default=None, alias="permissionMode") - access_grants: Optional[List[StrictStr]] = Field(default=None, alias="accessGrants") - unique_name: Optional[StrictStr] = Field(default=None, alias="uniqueName") - __properties: ClassVar[List[str]] = ["envZId", "shareMode", "frontendSelection", "backendMode", "backendProxyEndpoint", "authScheme", "authUsers", "oauthProvider", "oauthEmailDomains", "oauthAuthorizationCheckInterval", "reserved", "permissionMode", "accessGrants", "uniqueName"] - - @field_validator('share_mode') - def share_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['public', 'private']): - raise ValueError("must be one of enum values ('public', 'private')") - return value - - @field_validator('backend_mode') - def backend_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn']): - raise ValueError("must be one of enum values ('proxy', 'web', 'tcpTunnel', 'udpTunnel', 'caddy', 'drive', 'socks', 'vpn')") - return value - - @field_validator('oauth_provider') - def oauth_provider_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['github', 'google']): - raise ValueError("must be one of enum values ('github', 'google')") - return value - - @field_validator('permission_mode') - def permission_mode_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['open', 'closed']): - raise ValueError("must be one of enum values ('open', 'closed')") - return value - - 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 ShareRequest 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 auth_users (list) - _items = [] - if self.auth_users: - for _item_auth_users in self.auth_users: - if _item_auth_users: - _items.append(_item_auth_users.to_dict()) - _dict['authUsers'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ShareRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "envZId": obj.get("envZId"), - "shareMode": obj.get("shareMode"), - "frontendSelection": obj.get("frontendSelection"), - "backendMode": obj.get("backendMode"), - "backendProxyEndpoint": obj.get("backendProxyEndpoint"), - "authScheme": obj.get("authScheme"), - "authUsers": [AuthUser.from_dict(_item) for _item in obj["authUsers"]] if obj.get("authUsers") is not None else None, - "oauthProvider": obj.get("oauthProvider"), - "oauthEmailDomains": obj.get("oauthEmailDomains"), - "oauthAuthorizationCheckInterval": obj.get("oauthAuthorizationCheckInterval"), - "reserved": obj.get("reserved"), - "permissionMode": obj.get("permissionMode"), - "accessGrants": obj.get("accessGrants"), - "uniqueName": obj.get("uniqueName") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/share_response.py b/sdk/python/src/zrok_api/models/share_response.py deleted file mode 100644 index 8fa25d60..00000000 --- a/sdk/python/src/zrok_api/models/share_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ShareResponse(BaseModel): - """ - ShareResponse - """ # noqa: E501 - frontend_proxy_endpoints: Optional[List[StrictStr]] = Field(default=None, alias="frontendProxyEndpoints") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - __properties: ClassVar[List[str]] = ["frontendProxyEndpoints", "shareToken"] - - 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 ShareResponse 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 ShareResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendProxyEndpoints": obj.get("frontendProxyEndpoints"), - "shareToken": obj.get("shareToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/spark_data_sample.py b/sdk/python/src/zrok_api/models/spark_data_sample.py deleted file mode 100644 index 23c4ef51..00000000 --- a/sdk/python/src/zrok_api/models/spark_data_sample.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self - -class SparkDataSample(BaseModel): - """ - SparkDataSample - """ # noqa: E501 - rx: Optional[Union[StrictFloat, StrictInt]] = None - tx: Optional[Union[StrictFloat, StrictInt]] = None - __properties: ClassVar[List[str]] = ["rx", "tx"] - - 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 SparkDataSample 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 SparkDataSample from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "rx": obj.get("rx"), - "tx": obj.get("tx") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/unaccess_request.py b/sdk/python/src/zrok_api/models/unaccess_request.py deleted file mode 100644 index 19a3f5df..00000000 --- a/sdk/python/src/zrok_api/models/unaccess_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UnaccessRequest(BaseModel): - """ - UnaccessRequest - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - __properties: ClassVar[List[str]] = ["frontendToken", "envZId", "shareToken"] - - 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 UnaccessRequest 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 UnaccessRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "envZId": obj.get("envZId"), - "shareToken": obj.get("shareToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/unshare_request.py b/sdk/python/src/zrok_api/models/unshare_request.py deleted file mode 100644 index 3ff557e1..00000000 --- a/sdk/python/src/zrok_api/models/unshare_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 typing import Optional, Set -from typing_extensions import Self - -class UnshareRequest(BaseModel): - """ - UnshareRequest - """ # noqa: E501 - env_zid: Optional[StrictStr] = Field(default=None, alias="envZId") - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - reserved: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["envZId", "shareToken", "reserved"] - - 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 UnshareRequest 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 UnshareRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "envZId": obj.get("envZId"), - "shareToken": obj.get("shareToken"), - "reserved": obj.get("reserved") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/update_access_request.py b/sdk/python/src/zrok_api/models/update_access_request.py deleted file mode 100644 index a27f9623..00000000 --- a/sdk/python/src/zrok_api/models/update_access_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UpdateAccessRequest(BaseModel): - """ - UpdateAccessRequest - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - bind_address: Optional[StrictStr] = Field(default=None, alias="bindAddress") - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["frontendToken", "bindAddress", "description"] - - 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 UpdateAccessRequest 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 UpdateAccessRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "bindAddress": obj.get("bindAddress"), - "description": obj.get("description") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/update_frontend_request.py b/sdk/python/src/zrok_api/models/update_frontend_request.py deleted file mode 100644 index 52916296..00000000 --- a/sdk/python/src/zrok_api/models/update_frontend_request.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UpdateFrontendRequest(BaseModel): - """ - UpdateFrontendRequest - """ # noqa: E501 - frontend_token: Optional[StrictStr] = Field(default=None, alias="frontendToken") - public_name: Optional[StrictStr] = Field(default=None, alias="publicName") - url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate") - __properties: ClassVar[List[str]] = ["frontendToken", "publicName", "urlTemplate"] - - 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 UpdateFrontendRequest 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 UpdateFrontendRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frontendToken": obj.get("frontendToken"), - "publicName": obj.get("publicName"), - "urlTemplate": obj.get("urlTemplate") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/update_share_request.py b/sdk/python/src/zrok_api/models/update_share_request.py deleted file mode 100644 index 9e3de749..00000000 --- a/sdk/python/src/zrok_api/models/update_share_request.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class UpdateShareRequest(BaseModel): - """ - UpdateShareRequest - """ # noqa: E501 - share_token: Optional[StrictStr] = Field(default=None, alias="shareToken") - backend_proxy_endpoint: Optional[StrictStr] = Field(default=None, alias="backendProxyEndpoint") - add_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="addAccessGrants") - remove_access_grants: Optional[List[StrictStr]] = Field(default=None, alias="removeAccessGrants") - __properties: ClassVar[List[str]] = ["shareToken", "backendProxyEndpoint", "addAccessGrants", "removeAccessGrants"] - - 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 UpdateShareRequest 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 UpdateShareRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "shareToken": obj.get("shareToken"), - "backendProxyEndpoint": obj.get("backendProxyEndpoint"), - "addAccessGrants": obj.get("addAccessGrants"), - "removeAccessGrants": obj.get("removeAccessGrants") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/verify200_response.py b/sdk/python/src/zrok_api/models/verify200_response.py deleted file mode 100644 index 4709d646..00000000 --- a/sdk/python/src/zrok_api/models/verify200_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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 Verify200Response(BaseModel): - """ - Verify200Response - """ # noqa: E501 - email: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["email"] - - 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 Verify200Response 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 Verify200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/verify_request.py b/sdk/python/src/zrok_api/models/verify_request.py deleted file mode 100644 index 76def799..00000000 --- a/sdk/python/src/zrok_api/models/verify_request.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class VerifyRequest(BaseModel): - """ - VerifyRequest - """ # noqa: E501 - register_token: Optional[StrictStr] = Field(default=None, alias="registerToken") - __properties: ClassVar[List[str]] = ["registerToken"] - - 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 VerifyRequest 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 VerifyRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "registerToken": obj.get("registerToken") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/models/version_inventory200_response.py b/sdk/python/src/zrok_api/models/version_inventory200_response.py deleted file mode 100644 index 8cbf4288..00000000 --- a/sdk/python/src/zrok_api/models/version_inventory200_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class VersionInventory200Response(BaseModel): - """ - VersionInventory200Response - """ # noqa: E501 - controller_version: Optional[StrictStr] = Field(default=None, alias="controllerVersion") - __properties: ClassVar[List[str]] = ["controllerVersion"] - - 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 VersionInventory200Response 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 VersionInventory200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "controllerVersion": obj.get("controllerVersion") - }) - return _obj - - diff --git a/sdk/python/src/zrok_api/py.typed b/sdk/python/src/zrok_api/py.typed deleted file mode 100644 index e69de29b..00000000 diff --git a/sdk/python/src/zrok_api/rest.py b/sdk/python/src/zrok_api/rest.py deleted file mode 100644 index f09faee7..00000000 --- a/sdk/python/src/zrok_api/rest.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from zrok_api.exceptions import ApiException, ApiValueError - -SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} -RESTResponseType = urllib3.HTTPResponse - - -def is_socks_proxy_url(url): - if url is None: - return False - split_section = url.split("://") - if len(split_section) < 2: - return False - else: - return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES - - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - pool_args = { - "cert_reqs": cert_reqs, - "ca_certs": configuration.ssl_ca_cert, - "cert_file": configuration.cert_file, - "key_file": configuration.key_file, - "ca_cert_data": configuration.ca_cert_data, - } - if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options - - if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize - - # https pool manager - self.pool_manager: urllib3.PoolManager - - if configuration.proxy: - if is_socks_proxy_url(configuration.proxy): - from urllib3.contrib.socks import SOCKSProxyManager - pool_args["proxy_url"] = configuration.proxy - pool_args["headers"] = configuration.proxy_headers - self.pool_manager = SOCKSProxyManager(**pool_args) - else: - pool_args["proxy_url"] = configuration.proxy - pool_args["proxy_headers"] = configuration.proxy_headers - self.pool_manager = urllib3.ProxyManager(**pool_args) - else: - self.pool_manager = urllib3.PoolManager(**pool_args) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than JSON when `body` argument is - # provided in serialized form. - elif isinstance(body, str) or isinstance(body, bytes): - r = self.pool_manager.request( - method, - url, - body=body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): - request_body = "true" if body else "false" - r = self.pool_manager.request( - method, - url, - body=request_body, - preload_content=False, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) From 7b66ac5c6290929a6af601088699821a9d6e4ffb Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 5 Mar 2025 08:21:35 -0500 Subject: [PATCH 48/56] upgrade the Node.js runner --- .github/workflows/node-sdk.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index 8645c3bf..4f3b7daa 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -31,7 +31,8 @@ jobs: needs: enforce_stable_semver if: always() name: Build for Node-${{ matrix.node_ver }} ${{ matrix.config.target }}/${{ matrix.config.arch }} - runs-on: ${{ matrix.config.os }} + runs-on: ${{ matrix.config.runs-on }} + container: ${{ matrix.config.container }} env: BUILD_NUMBER: ${{ github.run_number }} @@ -40,7 +41,7 @@ jobs: strategy: matrix: config: - - { os: ubuntu-20.04, target: "linux", arch: "x64" } + - { runs-on: ubuntu-24.04, container: openziti/ziti-builder:v2, target: "linux", arch: "x64" } node_ver: [ 20 ] fail-fast: false From 1b55a01b4d4e9a4593edb555771a016f81f95df6 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 5 Mar 2025 08:30:19 -0500 Subject: [PATCH 49/56] add GH token for fetching submodules --- .github/workflows/node-sdk.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index 4f3b7daa..7b9ea5ad 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -57,6 +57,7 @@ jobs: with: fetch-depth: 0 submodules: 'recursive' + token: ${{ secrets.GITHUB_TOKEN }} - name: Get current zrok repo tag id: tag From 29c6d85b19cf8395ccfbad625c6fb3abce284c16 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 5 Mar 2025 08:38:43 -0500 Subject: [PATCH 50/56] try to stop recursing submodules --- .github/workflows/node-sdk.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index 7b9ea5ad..06e3cbda 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -33,10 +33,10 @@ jobs: name: Build for Node-${{ matrix.node_ver }} ${{ matrix.config.target }}/${{ matrix.config.arch }} runs-on: ${{ matrix.config.runs-on }} container: ${{ matrix.config.container }} - env: BUILD_NUMBER: ${{ github.run_number }} AWS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + # GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} strategy: matrix: @@ -54,10 +54,14 @@ jobs: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 - submodules: 'recursive' - token: ${{ secrets.GITHUB_TOKEN }} + # with: + # fetch-depth: 0 + # submodules: recursive + # token: ${{ secrets.GITHUB_TOKEN }} + + # - name: Configure Git Authentication + # run: | + # git config --global url."https://x-access-token:${GITHUB_PAT}@github.com/".insteadOf "https://github.com/" - name: Get current zrok repo tag id: tag From 4948200c0ce8eb2c118c180f5309c018feb6a32a Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 5 Mar 2025 08:51:40 -0500 Subject: [PATCH 51/56] fix workspace paths in container runner --- .github/workflows/node-sdk.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index 06e3cbda..d490eedf 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -54,8 +54,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # with: - # fetch-depth: 0 + with: + fetch-depth: 0 # submodules: recursive # token: ${{ secrets.GITHUB_TOKEN }} @@ -64,13 +64,14 @@ jobs: # git config --global url."https://x-access-token:${GITHUB_PAT}@github.com/".insteadOf "https://github.com/" - name: Get current zrok repo tag + if: github.ref_type == 'tag' id: tag - run: echo "TAG=$(git describe --tags --abbrev=0)" | tee -a $GITHUB_OUTPUT + run: echo "TAG=$(git describe --tags --always)" | tee -a $GITHUB_OUTPUT - name: Update zrok NodeJS-SDK's package.json version based on current zrok repo git tag if: github.ref_type == 'tag' run: | - cd ${{ runner.workspace }}/${{ github.event.repository.name }}/sdk/nodejs/sdk + cd sdk/nodejs/sdk npm version ${{ steps.tag.outputs.TAG }} --no-git-tag-version --allow-same-version - name: Setup .npmrc @@ -83,7 +84,7 @@ jobs: - name: Build the zrok NodeJS-SDK run: | - cd ${{ runner.workspace }}/${{ github.event.repository.name }}/sdk/nodejs/sdk + cd sdk/nodejs/sdk npm install npm run build env: @@ -92,7 +93,7 @@ jobs: - name: NPM Publish if: github.ref_type == 'tag' run: | - cd ${{ runner.workspace }}/${{ github.event.repository.name }}/sdk/nodejs/sdk + cd sdk/nodejs/sdk npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From ed26f08d3b90cca14a3455951747b075ed61aa86 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 5 Mar 2025 08:53:54 -0500 Subject: [PATCH 52/56] stop recursing unused submodules --- .github/workflows/node-sdk.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index d490eedf..ed1eb995 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -36,15 +36,14 @@ jobs: env: BUILD_NUMBER: ${{ github.run_number }} AWS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - + strategy: matrix: config: - { runs-on: ubuntu-24.04, container: openziti/ziti-builder:v2, target: "linux", arch: "x64" } node_ver: [ 20 ] fail-fast: false - + steps: - name: Node Version @@ -56,12 +55,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - # submodules: recursive - # token: ${{ secrets.GITHUB_TOKEN }} - - # - name: Configure Git Authentication - # run: | - # git config --global url."https://x-access-token:${GITHUB_PAT}@github.com/".insteadOf "https://github.com/" - name: Get current zrok repo tag if: github.ref_type == 'tag' From 8bb0f970ec7f1f3fcc05f1bf5a687eadc60f2492 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 5 Mar 2025 09:04:26 -0500 Subject: [PATCH 53/56] let in-line shell run steps raise exceptions --- .github/workflows/node-sdk.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index ed1eb995..1457bf90 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -12,8 +12,6 @@ jobs: name: Require Stable Release Semver if: github.event.action == 'released' runs-on: ubuntu-24.04 - outputs: - version: ${{ steps.parse.outputs.version }} steps: - name: Parse Release Version id: parse @@ -59,10 +57,12 @@ jobs: - name: Get current zrok repo tag if: github.ref_type == 'tag' id: tag + shell: bash run: echo "TAG=$(git describe --tags --always)" | tee -a $GITHUB_OUTPUT - name: Update zrok NodeJS-SDK's package.json version based on current zrok repo git tag if: github.ref_type == 'tag' + shell: bash run: | cd sdk/nodejs/sdk npm version ${{ steps.tag.outputs.TAG }} --no-git-tag-version --allow-same-version @@ -76,6 +76,7 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Build the zrok NodeJS-SDK + shell: bash run: | cd sdk/nodejs/sdk npm install @@ -85,6 +86,7 @@ jobs: - name: NPM Publish if: github.ref_type == 'tag' + shell: bash run: | cd sdk/nodejs/sdk npm publish --access public From 8822082b1bbfb94a5fd9c700aeffb26c01d9e62e Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 5 Mar 2025 09:26:36 -0500 Subject: [PATCH 54/56] stop building Node.js in a container runner because the newest required glibc for dependencies is 2.29 and is pre-built --- .github/workflows/node-sdk.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index 1457bf90..65506125 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -29,8 +29,7 @@ jobs: needs: enforce_stable_semver if: always() name: Build for Node-${{ matrix.node_ver }} ${{ matrix.config.target }}/${{ matrix.config.arch }} - runs-on: ${{ matrix.config.runs-on }} - container: ${{ matrix.config.container }} + runs-on: ${{ matrix.config.os }} env: BUILD_NUMBER: ${{ github.run_number }} AWS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} @@ -38,7 +37,7 @@ jobs: strategy: matrix: config: - - { runs-on: ubuntu-24.04, container: openziti/ziti-builder:v2, target: "linux", arch: "x64" } + - { os: ubuntu-24.04, target: "linux", arch: "x64" } node_ver: [ 20 ] fail-fast: false From d7e0faa468cf73383d51b72201720d40bf112611 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 5 Mar 2025 09:31:46 -0500 Subject: [PATCH 55/56] stop publishing to npm registry with @latest on canary releases --- .github/workflows/node-sdk.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index 65506125..6612e389 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -88,6 +88,13 @@ jobs: shell: bash run: | cd sdk/nodejs/sdk - npm publish --access public + # Check if this is the official repository + if [[ "${{ github.repository_owner }}" == "openziti" ]]; then + echo "Publishing from official repository with @latest tag" + npm publish --access public + else + echo "Publishing from fork/test repository with @canary tag" + npm publish --access public --tag canary + fi env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From d37ecd982c66835042b395982828049d90e6e34d Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 5 Mar 2025 09:41:41 -0500 Subject: [PATCH 56/56] trigger release consistently with a release event --- .github/workflows/node-sdk.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index 6612e389..4d39f738 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -54,20 +54,20 @@ jobs: fetch-depth: 0 - name: Get current zrok repo tag - if: github.ref_type == 'tag' + if: github.event.action == 'released' id: tag shell: bash run: echo "TAG=$(git describe --tags --always)" | tee -a $GITHUB_OUTPUT - name: Update zrok NodeJS-SDK's package.json version based on current zrok repo git tag - if: github.ref_type == 'tag' + if: github.event.action == 'released' shell: bash run: | cd sdk/nodejs/sdk npm version ${{ steps.tag.outputs.TAG }} --no-git-tag-version --allow-same-version - name: Setup .npmrc - if: github.ref_type == 'tag' + if: github.event.action == 'released' # Setup .npmrc file to prepare for possible publish to npm uses: actions/setup-node@v4 with: @@ -84,7 +84,7 @@ jobs: BUILD_DATE: ${{ steps.date.outputs.date }} - name: NPM Publish - if: github.ref_type == 'tag' + if: github.event.action == 'released' shell: bash run: | cd sdk/nodejs/sdk