From 9dc4f89feb71814e6e23c3b1a4bd61efa3b11a22 Mon Sep 17 00:00:00 2001 From: Doppler Bot <57646694+doppler-bot@users.noreply.github.com> Date: Wed, 13 Sep 2023 23:36:49 -0700 Subject: [PATCH] SDK update generated by liblab --- .devcontainer/devcontainer.json | 12 + examples/README.md | 33 + examples/install.sh | 5 + examples/install_py3.sh | 5 + examples/sample.py | 11 + pyproject.toml | 2 +- src/dopplersdk/README.md | 740 +++++++++--------- .../models/ActivityLogsListResponse.py | 78 ++ src/dopplersdk/models/AddRequest.py | 6 +- src/dopplersdk/models/AddResponse.py | 21 +- src/dopplersdk/models/AddTrustedIpRequest.py | 13 + src/dopplersdk/models/AddTrustedIpResponse.py | 12 + src/dopplersdk/models/CloneResponse.py | 27 +- .../models/ConfigLogsGetResponse.py | 92 +++ .../models/ConfigLogsListResponse.py | 80 ++ .../models/ConfigsCreateResponse.py | 48 ++ src/dopplersdk/models/ConfigsGetResponse.py | 48 ++ src/dopplersdk/models/ConfigsListResponse.py | 56 ++ .../models/ConfigsUpdateResponse.py | 48 ++ src/dopplersdk/models/CreateRequest.py | 10 +- src/dopplersdk/models/CreateResponse.py | 97 +-- src/dopplersdk/models/DeleteRequest.py | 8 +- src/dopplersdk/models/DeleteResponse.py | 13 +- .../models/DeleteTrustedIpRequest.py | 13 + src/dopplersdk/models/DownloadResponse.py | 12 +- .../models/EnvironmentsCreateResponse.py | 39 + .../models/EnvironmentsGetResponse.py | 39 + .../models/EnvironmentsListResponse.py | 47 ++ src/dopplersdk/models/GetResponse.py | 97 +-- src/dopplersdk/models/GroupsCreateRequest.py | 15 + src/dopplersdk/models/GroupsCreateResponse.py | 93 +++ src/dopplersdk/models/GroupsGetResponse.py | 93 +++ src/dopplersdk/models/GroupsListResponse.py | 48 ++ src/dopplersdk/models/GroupsType.py | 8 + src/dopplersdk/models/GroupsUpdateRequest.py | 15 + src/dopplersdk/models/GroupsUpdateResponse.py | 93 +++ .../models/IntegrationsCreateRequest.py | 23 +- .../models/IntegrationsCreateResponse.py | 27 + .../models/IntegrationsDeleteResponse.py | 1 + .../models/IntegrationsGetResponse.py | 27 + .../models/IntegrationsListResponse.py | 47 ++ .../models/IntegrationsUpdateRequest.py | 6 +- .../models/IntegrationsUpdateResponse.py | 1 + src/dopplersdk/models/InvitesListResponse.py | 67 ++ src/dopplersdk/models/IssueLeaseResponse.py | 12 +- .../models/ListPermissionsResponse.py | 3 +- src/dopplersdk/models/ListResponse.py | 50 +- .../models/ListTrustedIpsResponse.py | 13 + src/dopplersdk/models/LockResponse.py | 27 +- src/dopplersdk/models/MeResponse.py | 27 +- src/dopplersdk/models/NamesResponse.py | 3 +- .../models/ProjectMembersGetResponse.py | 51 ++ .../models/ProjectMembersListResponse.py | 53 ++ .../models/ProjectMembersUpdateRequest.py | 17 + .../models/ProjectMembersUpdateResponse.py | 51 ++ .../models/ProjectRolesCreateResponse.py | 40 + .../models/ProjectRolesGetResponse.py | 40 + .../ProjectRolesListPermissionsResponse.py | 13 + .../models/ProjectRolesListResponse.py | 40 + .../models/ProjectRolesUpdateResponse.py | 40 + src/dopplersdk/models/README.md | 196 ++++- src/dopplersdk/models/RenameRequest.py | 6 +- src/dopplersdk/models/RenameResponse.py | 18 +- src/dopplersdk/models/RetrieveResponse.py | 36 +- src/dopplersdk/models/RevokeLeaseResponse.py | 3 +- src/dopplersdk/models/RollbackResponse.py | 51 +- src/dopplersdk/models/SecretsGetResponse.py | 31 + src/dopplersdk/models/SecretsListResponse.py | 104 +++ src/dopplersdk/models/SecretsUpdateRequest.py | 6 +- .../models/SecretsUpdateResponse.py | 84 ++ .../models/ServiceAccountsCreateRequest.py | 37 + .../models/ServiceAccountsCreateResponse.py | 67 ++ .../models/ServiceAccountsGetResponse.py | 67 ++ .../models/ServiceAccountsListResponse.py | 71 ++ .../models/ServiceAccountsUpdateRequest.py | 37 + .../models/ServiceAccountsUpdateResponse.py | 66 ++ .../models/ServiceTokensCreateRequest.py | 8 +- .../models/ServiceTokensCreateResponse.py | 41 + .../models/ServiceTokensDeleteRequest.py | 6 +- .../models/ServiceTokensListResponse.py | 47 ++ src/dopplersdk/models/SyncsCreateRequest.py | 21 +- src/dopplersdk/models/SyncsCreateResponse.py | 42 + src/dopplersdk/models/SyncsDeleteResponse.py | 1 + src/dopplersdk/models/SyncsGetResponse.py | 42 + src/dopplersdk/models/Type.py | 3 + src/dopplersdk/models/UnlockResponse.py | 27 +- src/dopplersdk/models/UpdateNoteResponse.py | 6 +- src/dopplersdk/models/UpdateRequest.py | 16 +- src/dopplersdk/models/UpdateResponse.py | 97 +-- .../models/WorkplaceRolesCreateResponse.py | 43 + .../models/WorkplaceRolesGetResponse.py | 43 + .../models/WorkplaceRolesListResponse.py | 43 + .../models/WorkplaceRolesUpdateResponse.py | 43 + src/dopplersdk/models/__init__.py | 66 +- src/dopplersdk/net/query_serializer.py | 73 ++ src/dopplersdk/sdk.py | 95 ++- src/dopplersdk/services/README.md | 719 ++++++++--------- src/dopplersdk/services/activity_logs.py | 21 +- src/dopplersdk/services/base.py | 22 +- src/dopplersdk/services/config_logs.py | 53 +- src/dopplersdk/services/configs.py | 179 ++++- src/dopplersdk/services/dynamic_secrets.py | 1 + src/dopplersdk/services/environments.py | 63 +- src/dopplersdk/services/groups.py | 96 ++- src/dopplersdk/services/integrations.py | 65 +- src/dopplersdk/services/invites.py | 15 +- src/dopplersdk/services/project_members.py | 109 ++- src/dopplersdk/services/project_roles.py | 56 +- src/dopplersdk/services/projects.py | 13 +- src/dopplersdk/services/secrets.py | 135 +++- src/dopplersdk/services/service_accounts.py | 70 +- src/dopplersdk/services/service_tokens.py | 39 +- src/dopplersdk/services/syncs.py | 61 +- src/dopplersdk/services/v_3.py | 1 + src/dopplersdk/services/workplace_roles.py | 48 +- src/dopplersdk/setup.py | 2 +- .../test_activity_logs_list_response.py | 17 + test/models/test_add_member_request.py | 4 +- test/models/test_add_request.py | 12 +- test/models/test_add_response.py | 4 +- test/models/test_add_trusted_ip_request.py | 21 + test/models/test_add_trusted_ip_response.py | 16 + test/models/test_clone_request.py | 8 +- test/models/test_clone_response.py | 4 +- test/models/test_config_logs_get_response.py | 16 + test/models/test_config_logs_list_response.py | 19 + test/models/test_configs_create_request.py | 8 +- test/models/test_configs_create_response.py | 16 + test/models/test_configs_delete_request.py | 6 +- test/models/test_configs_get_response.py | 16 + test/models/test_configs_list_response.py | 17 + test/models/test_configs_update_request.py | 8 +- test/models/test_configs_update_response.py | 16 + test/models/test_create_request.py | 6 +- test/models/test_create_response.py | 4 +- test/models/test_delete_request.py | 4 +- test/models/test_delete_response.py | 3 +- test/models/test_delete_trusted_ip_request.py | 21 + test/models/test_download_response.py | 10 +- .../test_environments_create_request.py | 6 +- .../test_environments_create_response.py | 16 + test/models/test_environments_get_response.py | 16 + .../models/test_environments_list_response.py | 19 + test/models/test_get_response.py | 4 +- test/models/test_groups_create_request.py | 24 + test/models/test_groups_create_response.py | 16 + test/models/test_groups_get_response.py | 16 + test/models/test_groups_list_response.py | 16 + test/models/test_groups_update_request.py | 17 + test/models/test_groups_update_response.py | 16 + .../test_integrations_create_request.py | 8 +- .../test_integrations_create_response.py | 16 + .../test_integrations_delete_response.py | 15 + test/models/test_integrations_get_response.py | 16 + .../models/test_integrations_list_response.py | 19 + .../test_integrations_update_request.py | 6 +- .../test_integrations_update_response.py | 15 + test/models/test_invites_list_response.py | 16 + test/models/test_issue_lease_request.py | 10 +- test/models/test_issue_lease_response.py | 8 +- test/models/test_list_permissions_response.py | 4 +- test/models/test_list_response.py | 5 +- test/models/test_list_trusted_ips_response.py | 16 + test/models/test_lock_request.py | 6 +- test/models/test_lock_response.py | 4 +- test/models/test_me_response.py | 28 +- test/models/test_names_response.py | 4 +- .../test_project_members_get_response.py | 16 + .../test_project_members_list_response.py | 16 + .../test_project_members_update_request.py | 21 + .../test_project_members_update_response.py | 18 + .../test_project_roles_create_response.py | 16 + .../models/test_project_roles_get_response.py | 16 + ...project_roles_list_permissions_response.py | 18 + .../test_project_roles_list_response.py | 16 + .../test_project_roles_update_response.py | 16 + test/models/test_rename_request.py | 6 +- test/models/test_rename_response.py | 4 +- test/models/test_retrieve_response.py | 4 +- test/models/test_revoke_lease_request.py | 10 +- test/models/test_rollback_response.py | 4 +- test/models/test_secrets_get_response.py | 17 + test/models/test_secrets_list_response.py | 16 + test/models/test_secrets_update_request.py | 8 +- test/models/test_secrets_update_response.py | 16 + .../test_service_accounts_create_request.py | 21 + .../test_service_accounts_create_response.py | 18 + .../test_service_accounts_get_response.py | 16 + .../test_service_accounts_list_response.py | 20 + .../test_service_accounts_update_request.py | 21 + .../test_service_accounts_update_response.py | 18 + .../test_service_tokens_create_request.py | 16 +- .../test_service_tokens_create_response.py | 36 + .../test_service_tokens_delete_request.py | 10 +- .../test_service_tokens_list_response.py | 16 + test/models/test_syncs_create_request.py | 6 +- test/models/test_syncs_create_response.py | 16 + test/models/test_syncs_delete_response.py | 15 + test/models/test_syncs_get_response.py | 16 + test/models/test_unlock_request.py | 6 +- test/models/test_unlock_response.py | 4 +- test/models/test_update_note_request.py | 10 +- test/models/test_update_note_response.py | 6 +- test/models/test_update_request.py | 12 +- test/models/test_update_response.py | 4 +- .../test_workplace_roles_create_response.py | 18 + .../test_workplace_roles_get_response.py | 16 + .../test_workplace_roles_list_response.py | 16 + .../test_workplace_roles_update_response.py | 18 + test/services/test_activity_logs.py | 8 +- test/services/test_config_logs.py | 12 +- test/services/test_configs.py | 110 ++- test/services/test_environments.py | 20 +- test/services/test_groups.py | 60 +- test/services/test_integrations.py | 12 +- test/services/test_invites.py | 4 +- test/services/test_project_members.py | 38 +- test/services/test_project_roles.py | 38 +- test/services/test_projects.py | 8 +- test/services/test_secrets.py | 22 +- test/services/test_service_accounts.py | 30 +- test/services/test_service_tokens.py | 4 +- test/services/test_syncs.py | 12 +- test/services/test_workplace_roles.py | 38 +- 224 files changed, 5916 insertions(+), 1878 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 examples/README.md create mode 100644 examples/install.sh create mode 100644 examples/install_py3.sh create mode 100644 examples/sample.py create mode 100644 src/dopplersdk/models/ActivityLogsListResponse.py create mode 100644 src/dopplersdk/models/AddTrustedIpRequest.py create mode 100644 src/dopplersdk/models/AddTrustedIpResponse.py create mode 100644 src/dopplersdk/models/ConfigLogsGetResponse.py create mode 100644 src/dopplersdk/models/ConfigLogsListResponse.py create mode 100644 src/dopplersdk/models/ConfigsCreateResponse.py create mode 100644 src/dopplersdk/models/ConfigsGetResponse.py create mode 100644 src/dopplersdk/models/ConfigsListResponse.py create mode 100644 src/dopplersdk/models/ConfigsUpdateResponse.py create mode 100644 src/dopplersdk/models/DeleteTrustedIpRequest.py create mode 100644 src/dopplersdk/models/EnvironmentsCreateResponse.py create mode 100644 src/dopplersdk/models/EnvironmentsGetResponse.py create mode 100644 src/dopplersdk/models/EnvironmentsListResponse.py create mode 100644 src/dopplersdk/models/GroupsCreateRequest.py create mode 100644 src/dopplersdk/models/GroupsCreateResponse.py create mode 100644 src/dopplersdk/models/GroupsGetResponse.py create mode 100644 src/dopplersdk/models/GroupsListResponse.py create mode 100644 src/dopplersdk/models/GroupsType.py create mode 100644 src/dopplersdk/models/GroupsUpdateRequest.py create mode 100644 src/dopplersdk/models/GroupsUpdateResponse.py create mode 100644 src/dopplersdk/models/IntegrationsCreateResponse.py create mode 100644 src/dopplersdk/models/IntegrationsDeleteResponse.py create mode 100644 src/dopplersdk/models/IntegrationsGetResponse.py create mode 100644 src/dopplersdk/models/IntegrationsListResponse.py create mode 100644 src/dopplersdk/models/IntegrationsUpdateResponse.py create mode 100644 src/dopplersdk/models/InvitesListResponse.py create mode 100644 src/dopplersdk/models/ListTrustedIpsResponse.py create mode 100644 src/dopplersdk/models/ProjectMembersGetResponse.py create mode 100644 src/dopplersdk/models/ProjectMembersListResponse.py create mode 100644 src/dopplersdk/models/ProjectMembersUpdateRequest.py create mode 100644 src/dopplersdk/models/ProjectMembersUpdateResponse.py create mode 100644 src/dopplersdk/models/ProjectRolesCreateResponse.py create mode 100644 src/dopplersdk/models/ProjectRolesGetResponse.py create mode 100644 src/dopplersdk/models/ProjectRolesListPermissionsResponse.py create mode 100644 src/dopplersdk/models/ProjectRolesListResponse.py create mode 100644 src/dopplersdk/models/ProjectRolesUpdateResponse.py create mode 100644 src/dopplersdk/models/SecretsGetResponse.py create mode 100644 src/dopplersdk/models/SecretsListResponse.py create mode 100644 src/dopplersdk/models/SecretsUpdateResponse.py create mode 100644 src/dopplersdk/models/ServiceAccountsCreateRequest.py create mode 100644 src/dopplersdk/models/ServiceAccountsCreateResponse.py create mode 100644 src/dopplersdk/models/ServiceAccountsGetResponse.py create mode 100644 src/dopplersdk/models/ServiceAccountsListResponse.py create mode 100644 src/dopplersdk/models/ServiceAccountsUpdateRequest.py create mode 100644 src/dopplersdk/models/ServiceAccountsUpdateResponse.py create mode 100644 src/dopplersdk/models/ServiceTokensCreateResponse.py create mode 100644 src/dopplersdk/models/ServiceTokensListResponse.py create mode 100644 src/dopplersdk/models/SyncsCreateResponse.py create mode 100644 src/dopplersdk/models/SyncsDeleteResponse.py create mode 100644 src/dopplersdk/models/SyncsGetResponse.py create mode 100644 src/dopplersdk/models/WorkplaceRolesCreateResponse.py create mode 100644 src/dopplersdk/models/WorkplaceRolesGetResponse.py create mode 100644 src/dopplersdk/models/WorkplaceRolesListResponse.py create mode 100644 src/dopplersdk/models/WorkplaceRolesUpdateResponse.py create mode 100644 src/dopplersdk/net/query_serializer.py create mode 100644 test/models/test_activity_logs_list_response.py create mode 100644 test/models/test_add_trusted_ip_request.py create mode 100644 test/models/test_add_trusted_ip_response.py create mode 100644 test/models/test_config_logs_get_response.py create mode 100644 test/models/test_config_logs_list_response.py create mode 100644 test/models/test_configs_create_response.py create mode 100644 test/models/test_configs_get_response.py create mode 100644 test/models/test_configs_list_response.py create mode 100644 test/models/test_configs_update_response.py create mode 100644 test/models/test_delete_trusted_ip_request.py create mode 100644 test/models/test_environments_create_response.py create mode 100644 test/models/test_environments_get_response.py create mode 100644 test/models/test_environments_list_response.py create mode 100644 test/models/test_groups_create_request.py create mode 100644 test/models/test_groups_create_response.py create mode 100644 test/models/test_groups_get_response.py create mode 100644 test/models/test_groups_list_response.py create mode 100644 test/models/test_groups_update_request.py create mode 100644 test/models/test_groups_update_response.py create mode 100644 test/models/test_integrations_create_response.py create mode 100644 test/models/test_integrations_delete_response.py create mode 100644 test/models/test_integrations_get_response.py create mode 100644 test/models/test_integrations_list_response.py create mode 100644 test/models/test_integrations_update_response.py create mode 100644 test/models/test_invites_list_response.py create mode 100644 test/models/test_list_trusted_ips_response.py create mode 100644 test/models/test_project_members_get_response.py create mode 100644 test/models/test_project_members_list_response.py create mode 100644 test/models/test_project_members_update_request.py create mode 100644 test/models/test_project_members_update_response.py create mode 100644 test/models/test_project_roles_create_response.py create mode 100644 test/models/test_project_roles_get_response.py create mode 100644 test/models/test_project_roles_list_permissions_response.py create mode 100644 test/models/test_project_roles_list_response.py create mode 100644 test/models/test_project_roles_update_response.py create mode 100644 test/models/test_secrets_get_response.py create mode 100644 test/models/test_secrets_list_response.py create mode 100644 test/models/test_secrets_update_response.py create mode 100644 test/models/test_service_accounts_create_request.py create mode 100644 test/models/test_service_accounts_create_response.py create mode 100644 test/models/test_service_accounts_get_response.py create mode 100644 test/models/test_service_accounts_list_response.py create mode 100644 test/models/test_service_accounts_update_request.py create mode 100644 test/models/test_service_accounts_update_response.py create mode 100644 test/models/test_service_tokens_create_response.py create mode 100644 test/models/test_service_tokens_list_response.py create mode 100644 test/models/test_syncs_create_response.py create mode 100644 test/models/test_syncs_delete_response.py create mode 100644 test/models/test_syncs_get_response.py create mode 100644 test/models/test_workplace_roles_create_response.py create mode 100644 test/models/test_workplace_roles_get_response.py create mode 100644 test/models/test_workplace_roles_list_response.py create mode 100644 test/models/test_workplace_roles_update_response.py diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..ca4d50e --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,12 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "Python SDK", + "image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye", + "postCreateCommand": "pip3 install --user -r requirements.txt && cd example && sh install.sh", + "customizations": { + "codespaces":{ + "openFiles": ["examples/sample.py", "examples/README.md"] + } + } +} diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..0fbf168 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,33 @@ +# doppler-sdk-example +A basic example of how to use the doppler-sdk package. + +## Installation + +If `doppler-sdk` is published to pypi: +```sh +pip install doppler-sdk==1.1.2 +``` + +In the event `doppler-sdk` is not published to pypi, you can install it locally by running the following command in the example folder: +```sh +. ./install.sh +``` + +This will create and start a virtual environment and install the package locally in it. + +To close the virtual environment run: +```sh +deactivate +``` + +To re-activate the virtual environment once it is installed run: +```sh +source .venv/bin/activate +``` + +## Usage + +To run the example, run the following command in the examples folder: +```sh +python sample.py +``` diff --git a/examples/install.sh b/examples/install.sh new file mode 100644 index 0000000..465dbb6 --- /dev/null +++ b/examples/install.sh @@ -0,0 +1,5 @@ +python -m venv .venv +source .venv/bin/activate +pip install build +python -m build --outdir dist ../ +pip install dist/doppler_sdk-1.1.2-py3-none-any.whl diff --git a/examples/install_py3.sh b/examples/install_py3.sh new file mode 100644 index 0000000..876bb6c --- /dev/null +++ b/examples/install_py3.sh @@ -0,0 +1,5 @@ +python3 -m venv .venv +source .venv/bin/activate +pip3 install build +python3 -m build --outdir dist ../ +pip3 install dist/doppler_sdk-1.1.2-py3-none-any.whl \ No newline at end of file diff --git a/examples/sample.py b/examples/sample.py new file mode 100644 index 0000000..76cbdef --- /dev/null +++ b/examples/sample.py @@ -0,0 +1,11 @@ +from pprint import pprint +from dopplersdk import DopplerSDK + +DOPPLERSDK_ACCESS_TOKEN = "" + +sdk = DopplerSDK() +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) + +results = sdk.projects.list() + +pprint(vars(results)) diff --git a/pyproject.toml b/pyproject.toml index e3fe8a2..5fea7ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "doppler-sdk" -version = "1.1.1" +version = "1.1.2" license = { text = "SEE LICENSE IN LICENSE" } authors = [ { name="Example Author", email="author@example.com" }, diff --git a/src/dopplersdk/README.md b/src/dopplersdk/README.md index 770c79e..dccf370 100644 --- a/src/dopplersdk/README.md +++ b/src/dopplersdk/README.md @@ -1,17 +1,17 @@ -# DopplerSDK Python SDK 1.1.1 +# DopplerSDK Python SDK 1.1.2 A Python SDK for DopplerSDK. -- API version: 1.1.1 -- SDK version: 1.1.1 +- API version: 1.1.2 +- SDK version: 1.1.2 ## Table of Contents - [Requirements](#requirements) - [Installation](#installation) - [Dependencies](#dependencies) - [Authentication](#authentication) - - [Bearer Authentication](#bearer-authentication) + - [Access Token Authentication](#bearer-authentication) - [API Endpoint Services](#api-endpoint-services) - [API Models](#api-models) - [Testing](#testing) @@ -36,23 +36,23 @@ This SDK uses the following dependencies: To see whether an endpoint needs a specific type of authentication check the endpoint's documentation. -### Bearer Authentication +### Access Token Authentication The DopplerSDK API uses bearer tokens as a form of authentication.You can set the bearer token when initializing the SDK through the constructor: ```py sdk = DopplerSDK('YOUR_BEARER_TOKEN') ``` -Or through the `set_bearer_token` method: +Or through the `set_access_token` method: ```py sdk = DopplerSDK() -sdk.set_bearer_token('YOUR_BEARER_TOKEN') +sdk.set_access_token('YOUR_BEARER_TOKEN') ``` You can also set it for each service individually: ```py sdk = DopplerSDK() -sdk.projects.set_bearer_token('YOUR_BEARER_TOKEN') +sdk.projects.set_access_token('YOUR_BEARER_TOKEN') ``` ## API Endpoint Services @@ -74,7 +74,6 @@ Click the service name for a full list of the service methods. |[DynamicSecrets](./services/README.md#dynamicsecrets)| |[Integrations](./services/README.md#integrations)| |[Syncs](./services/README.md#syncs)| -|[TrustedIps](./services/README.md#trustedips)| |[WorkplaceRoles](./services/README.md#workplaceroles)| |[ProjectRoles](./services/README.md#projectroles)| |[ProjectMembers](./services/README.md#projectmembers)| @@ -98,10 +97,10 @@ python -m unittest discover -p "test*.py" ```py from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.projects.list() @@ -135,8 +134,6 @@ A list of all services and services methods. - [Syncs](#syncs) - - [TrustedIps](#trustedips) - - [WorkplaceRoles](#workplaceroles) - [ProjectRoles](#projectroles) @@ -185,6 +182,9 @@ A list of all services and services methods. | [clone](#clone) | Clone | | [lock](#lock) | Lock | | [unlock](#unlock) | Unlock | +| [add_trusted_ip](#add_trusted_ip) | Add | +| [list_trusted_ips](#list_trusted_ips) | List | +| [delete_trusted_ip](#delete_trusted_ip) | Delete | ## Secrets @@ -261,15 +261,6 @@ A list of all services and services methods. | [delete](#delete) | Delete | -## TrustedIps - -| Method | Description| -| :-------- | :----------| -| [add](#add) | Add | -| [list](#list) | List | -| [delete](#delete) | Delete | - - ## WorkplaceRoles | Method | Description| @@ -359,12 +350,13 @@ Update ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'description': 'PROJECT_DESCRIPTION', + 'name': 'PROJECT_NEW_NAME', + 'project': 'PROJECT_NAME' } results = sdk.projects.update(request_input = request_body) @@ -390,9 +382,9 @@ Retrieve ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.projects.get(project = 'PROJECT_NAME') pprint(vars(results)) @@ -417,10 +409,10 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -request_body = {'ip': 'ip'} +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +request_body = {'project': 'PROJECT_NAME'} results = sdk.projects.delete(request_input = request_body) pprint(vars(results)) @@ -445,12 +437,12 @@ Create ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'description': 'PROJECT_DESCRIPTION', + 'name': 'PROJECT_NAME' } results = sdk.projects.create(request_input = request_body) @@ -477,9 +469,9 @@ List ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.projects.list( page = 1, per_page = 20 @@ -499,22 +491,22 @@ Create | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| | project | str | Required | The project's name | -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [EnvironmentsCreateRequest](/src/dopplersdk/models/README.md#environmentscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[EnvironmentsCreateResponse](/src/dopplersdk/models/README.md#environmentscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'name': 'name', + 'slug': 'slug' } results = sdk.environments.create( request_input = request_body, @@ -537,15 +529,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[EnvironmentsListResponse](/src/dopplersdk/models/README.md#environmentslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.environments.list(project = 'project') pprint(vars(results)) @@ -565,15 +557,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[EnvironmentsGetResponse](/src/dopplersdk/models/README.md#environmentsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.environments.get( project = 'project', environment = 'environment' @@ -602,9 +594,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.environments.delete( project = 'project', environment = 'environment' @@ -634,9 +626,9 @@ Rename ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'name': 'name', 'slug': 'slug' @@ -660,22 +652,23 @@ Create **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [ConfigsCreateRequest](/src/dopplersdk/models/README.md#configscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[ConfigsCreateResponse](/src/dopplersdk/models/README.md#configscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'environment': 'ENVIRONMENT_ID', + 'name': 'CONFIG_NAME', + 'project': 'PROJECT_NAME' } results = sdk.configs.create(request_input = request_body) @@ -698,15 +691,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ConfigsListResponse](/src/dopplersdk/models/README.md#configslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.configs.list( project = 'project', environment = 'Environment slug', @@ -726,22 +719,23 @@ Update **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [ConfigsUpdateRequest](/src/dopplersdk/models/README.md#configsupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[ConfigsUpdateResponse](/src/dopplersdk/models/README.md#configsupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'config': 'CONFIG_NAME', + 'name': 'CONFIG_NEW_NAME', + 'project': 'PROJECT_NAME' } results = sdk.configs.update(request_input = request_body) @@ -762,15 +756,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[ConfigsGetResponse](/src/dopplersdk/models/README.md#configsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.configs.get( project = 'PROJECT_NAME', config = 'CONFIG_NAME' @@ -788,7 +782,7 @@ Delete **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [DeleteRequest](/src/dopplersdk/models/README.md#deleterequest) | Optional | Request body. | +| request_input | [ConfigsDeleteRequest](/src/dopplersdk/models/README.md#configsdeleterequest) | Optional | Request body. | **Return Type** @@ -798,10 +792,13 @@ Delete ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -request_body = {'ip': 'ip'} +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +request_body = { + 'config': 'CONFIG_NAME', + 'project': 'PROJECT_NAME' +} results = sdk.configs.delete(request_input = request_body) pprint(vars(results)) @@ -826,9 +823,9 @@ Clone ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'CONFIG_NAME', 'name': 'NEW_CONFIG_NAME', @@ -858,9 +855,9 @@ Lock ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'CONFIG_NAME', 'project': 'PROJECT_NAME' @@ -889,9 +886,9 @@ Unlock ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'CONFIG_NAME', 'project': 'PROJECT_NAME' @@ -902,6 +899,105 @@ pprint(vars(results)) ``` +### **add_trusted_ip** +Add +- HTTP Method: POST +- Endpoint: /v3/configs/config/trusted_ips + +**Parameters** +| Name | Type| Required | Description | +| :-------- | :----------| :----------| :----------| +| project | str | Required | | +| config | str | Required | | +| request_input | [AddTrustedIpRequest](/src/dopplersdk/models/README.md#addtrustediprequest) | Optional | Request body. | + +**Return Type** + +[AddTrustedIpResponse](/src/dopplersdk/models/README.md#addtrustedipresponse) + +**Example Usage Code Snippet** +```Python +from pprint import pprint +from dopplersdk import DopplerSDK +DOPPLERSDK_ACCESS_TOKEN = '' +sdk = DopplerSDK() +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +request_body = {'ip': 'ip'} +results = sdk.configs.add_trusted_ip( + request_input = request_body, + project = 'project', + config = 'config' +) + +pprint(vars(results)) + +``` + +### **list_trusted_ips** +List +- HTTP Method: GET +- Endpoint: /v3/configs/config/trusted_ips + +**Parameters** +| Name | Type| Required | Description | +| :-------- | :----------| :----------| :----------| +| project | str | Required | | +| config | str | Required | | + +**Return Type** + +[ListTrustedIpsResponse](/src/dopplersdk/models/README.md#listtrustedipsresponse) + +**Example Usage Code Snippet** +```Python +from pprint import pprint +from dopplersdk import DopplerSDK +DOPPLERSDK_ACCESS_TOKEN = '' +sdk = DopplerSDK() +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +results = sdk.configs.list_trusted_ips( + project = 'project', + config = 'config' +) + +pprint(vars(results)) + +``` + +### **delete_trusted_ip** +Delete +- HTTP Method: DELETE +- Endpoint: /v3/configs/config/trusted_ips + +**Parameters** +| Name | Type| Required | Description | +| :-------- | :----------| :----------| :----------| +| project | str | Required | | +| config | str | Required | | +| request_input | [DeleteTrustedIpRequest](/src/dopplersdk/models/README.md#deletetrustediprequest) | Optional | Request body. | + +**Return Type** + +Returns a dict object. + +**Example Usage Code Snippet** +```Python +from pprint import pprint +from dopplersdk import DopplerSDK +DOPPLERSDK_ACCESS_TOKEN = '' +sdk = DopplerSDK() +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +request_body = {'ip': 'ip'} +results = sdk.configs.delete_trusted_ip( + request_input = request_body, + project = 'project', + config = 'config' +) + +pprint(vars(results)) + +``` + ### **update** Update @@ -911,22 +1007,23 @@ Update **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [SecretsUpdateRequest](/src/dopplersdk/models/README.md#secretsupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[SecretsUpdateResponse](/src/dopplersdk/models/README.md#secretsupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'config': 'CONFIG_NAME', + 'project': 'PROJECT_NAME', + 'secrets': {"ALGOLIA":"N9TOPUCTO","DATABASE":"${USER}@aws.dynamodb.com:9876","STRIPE":"sk_test_9YxLnoLDdvOPn2dfjBVPB"} } results = sdk.secrets.update(request_input = request_body) @@ -952,21 +1049,21 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[SecretsListResponse](/src/dopplersdk/models/README.md#secretslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.secrets.list( project = 'PROJECT_NAME', config = 'CONFIG_NAME', accepts = 'application/json', include_dynamic_secrets = True, - dynamic_secrets_ttl_sec = 45202611, + dynamic_secrets_ttl_sec = 12719258, secrets = 'secrets', include_managed_secrets = True ) @@ -989,15 +1086,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[SecretsGetResponse](/src/dopplersdk/models/README.md#secretsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.secrets.get( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -1028,9 +1125,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.secrets.delete( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -1064,14 +1161,14 @@ Download ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.secrets.download( project = 'project', config = 'config', format = 'json', - name_transformer = 'camel', + name_transformer = 'upper-camel', include_dynamic_secrets = True, dynamic_secrets_ttl_sec = 1800 ) @@ -1101,9 +1198,9 @@ List Names ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.secrets.names( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -1133,9 +1230,9 @@ Update Note ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'CONFIG_NAME', 'note': 'note', @@ -1164,15 +1261,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ConfigLogsListResponse](/src/dopplersdk/models/README.md#configlogslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.config_logs.list( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -1198,15 +1295,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[ConfigLogsGetResponse](/src/dopplersdk/models/README.md#configlogsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.config_logs.get( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -1237,9 +1334,9 @@ Rollback ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.config_logs.rollback( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -1268,9 +1365,9 @@ This method has no parameters. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.v_3.me() pprint(vars(results)) @@ -1291,15 +1388,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ActivityLogsListResponse](/src/dopplersdk/models/README.md#activitylogslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.activity_logs.list( page = '1', per_page = 20 @@ -1327,9 +1424,9 @@ Retrieve ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.activity_logs.retrieve(log = 'LOG_ID') pprint(vars(results)) @@ -1345,22 +1442,25 @@ Create **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [ServiceTokensCreateRequest](/src/dopplersdk/models/README.md#servicetokenscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[ServiceTokensCreateResponse](/src/dopplersdk/models/README.md#servicetokenscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'access': 'read', + 'config': 'CONFIG_NAME', + 'expire_at': '1899-01-16T08:37:05.0Z', + 'name': 'TOKEN_NAME', + 'project': 'PROJECT_NAME' } results = sdk.service_tokens.create(request_input = request_body) @@ -1381,15 +1481,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ServiceTokensListResponse](/src/dopplersdk/models/README.md#servicetokenslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.service_tokens.list( project = 'PROJECT_NAME', config = 'CONFIG_NAME' @@ -1407,7 +1507,7 @@ Delete **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [DeleteRequest](/src/dopplersdk/models/README.md#deleterequest) | Optional | Request body. | +| request_input | [ServiceTokensDeleteRequest](/src/dopplersdk/models/README.md#servicetokensdeleterequest) | Optional | Request body. | **Return Type** @@ -1417,10 +1517,15 @@ Delete ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -request_body = {'ip': 'ip'} +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +request_body = { + 'config': 'CONFIG_NAME', + 'project': 'PROJECT_NAME', + 'slug': 'TOKEN_SLUG', + 'token': 'TOKEN_VALUE' +} results = sdk.service_tokens.delete(request_input = request_body) pprint(vars(results)) @@ -1446,14 +1551,14 @@ Issue Lease ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'config', 'dynamic_secret': 'dynamic_secret', 'project': 'project', - 'ttl_sec': 96157308 + 'ttl_sec': 89517057 } results = sdk.dynamic_secrets.issue_lease(request_input = request_body) @@ -1479,9 +1584,9 @@ Revoke Lease ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'config', 'dynamic_secret': 'dynamic_secret', @@ -1503,22 +1608,23 @@ Create **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [IntegrationsCreateRequest](/src/dopplersdk/models/README.md#integrationscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[IntegrationsCreateResponse](/src/dopplersdk/models/README.md#integrationscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'data': {}, + 'name': 'name', + 'type_': 'type' } results = sdk.integrations.create(request_input = request_body) @@ -1537,15 +1643,15 @@ This method has no parameters. **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[IntegrationsListResponse](/src/dopplersdk/models/README.md#integrationslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.integrations.list() pprint(vars(results)) @@ -1564,15 +1670,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[IntegrationsGetResponse](/src/dopplersdk/models/README.md#integrationsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.integrations.get(integration = 'integration') pprint(vars(results)) @@ -1591,15 +1697,15 @@ Delete **Return Type** -[DeleteResponse](/src/dopplersdk/models/README.md#deleteresponse) +[IntegrationsDeleteResponse](/src/dopplersdk/models/README.md#integrationsdeleteresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.integrations.delete(integration = 'integration') pprint(vars(results)) @@ -1615,21 +1721,21 @@ Update | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| | integration | str | Required | The slug of the integration to update | -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [IntegrationsUpdateRequest](/src/dopplersdk/models/README.md#integrationsupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[IntegrationsUpdateResponse](/src/dopplersdk/models/README.md#integrationsupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', + 'data': 'data', 'name': 'name' } results = sdk.integrations.update( @@ -1652,22 +1758,23 @@ Create | :-------- | :----------| :----------| :----------| | project | str | Required | The project slug | | config | str | Required | The config slug | -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [SyncsCreateRequest](/src/dopplersdk/models/README.md#syncscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[SyncsCreateResponse](/src/dopplersdk/models/README.md#syncscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'data': {}, + 'import_option': 'none', + 'integration': 'integration' } results = sdk.syncs.create( request_input = request_body, @@ -1693,15 +1800,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[SyncsGetResponse](/src/dopplersdk/models/README.md#syncsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.syncs.get( project = 'project', config = 'config', @@ -1727,15 +1834,15 @@ Delete **Return Type** -[DeleteResponse](/src/dopplersdk/models/README.md#deleteresponse) +[SyncsDeleteResponse](/src/dopplersdk/models/README.md#syncsdeleteresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.syncs.delete( project = 'project', config = 'config', @@ -1748,111 +1855,6 @@ pprint(vars(results)) ``` -### **add** -Add -- HTTP Method: POST -- Endpoint: /v3/configs/config/trusted_ips - -**Parameters** -| Name | Type| Required | Description | -| :-------- | :----------| :----------| :----------| -| project | str | Required | | -| config | str | Required | | -| request_input | [AddRequest](/src/dopplersdk/models/README.md#addrequest) | Optional | Request body. | - -**Return Type** - -[AddResponse](/src/dopplersdk/models/README.md#addresponse) - -**Example Usage Code Snippet** -```Python -from pprint import pprint -from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' -sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -request_body = { - 'environments': ["reprehenderit dolore","incididunt voluptate sed labore dolore"], - 'role': 'role', - 'slug': 'slug', - 'type_': 'group' -} -results = sdk.trusted_ips.add( - request_input = request_body, - project = 'project', - config = 'config' -) - -pprint(vars(results)) - -``` - -### **list** -List -- HTTP Method: GET -- Endpoint: /v3/configs/config/trusted_ips - -**Parameters** -| Name | Type| Required | Description | -| :-------- | :----------| :----------| :----------| -| project | str | Required | | -| config | str | Required | | - -**Return Type** - -[ListResponse](/src/dopplersdk/models/README.md#listresponse) - -**Example Usage Code Snippet** -```Python -from pprint import pprint -from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' -sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -results = sdk.trusted_ips.list( - project = 'project', - config = 'config' -) - -pprint(vars(results)) - -``` - -### **delete** -Delete -- HTTP Method: DELETE -- Endpoint: /v3/configs/config/trusted_ips - -**Parameters** -| Name | Type| Required | Description | -| :-------- | :----------| :----------| :----------| -| project | str | Required | | -| config | str | Required | | -| request_input | [DeleteRequest](/src/dopplersdk/models/README.md#deleterequest) | Optional | Request body. | - -**Return Type** - -Returns a dict object. - -**Example Usage Code Snippet** -```Python -from pprint import pprint -from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' -sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -request_body = {'ip': 'ip'} -results = sdk.trusted_ips.delete( - request_input = request_body, - project = 'project', - config = 'config' -) - -pprint(vars(results)) - -``` - - ### **create** Create - HTTP Method: POST @@ -1864,15 +1866,15 @@ This method has no parameters. **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[WorkplaceRolesCreateResponse](/src/dopplersdk/models/README.md#workplacerolescreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.create() pprint(vars(results)) @@ -1890,15 +1892,15 @@ This method has no parameters. **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[WorkplaceRolesListResponse](/src/dopplersdk/models/README.md#workplaceroleslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.list() pprint(vars(results)) @@ -1922,9 +1924,9 @@ This method has no parameters. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.list_permissions() pprint(vars(results)) @@ -1943,15 +1945,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[WorkplaceRolesGetResponse](/src/dopplersdk/models/README.md#workplacerolesgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.get(role = 'role') pprint(vars(results)) @@ -1970,15 +1972,15 @@ Update **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[WorkplaceRolesUpdateResponse](/src/dopplersdk/models/README.md#workplacerolesupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.update(role = 'role') pprint(vars(results)) @@ -2003,9 +2005,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.delete(role = 'role') pprint(vars(results)) @@ -2024,15 +2026,15 @@ This method has no parameters. **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[ProjectRolesCreateResponse](/src/dopplersdk/models/README.md#projectrolescreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.create() pprint(vars(results)) @@ -2050,15 +2052,15 @@ This method has no parameters. **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ProjectRolesListResponse](/src/dopplersdk/models/README.md#projectroleslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.list() pprint(vars(results)) @@ -2077,15 +2079,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[ProjectRolesGetResponse](/src/dopplersdk/models/README.md#projectrolesgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.get(role = 'role') pprint(vars(results)) @@ -2104,15 +2106,15 @@ Update **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[ProjectRolesUpdateResponse](/src/dopplersdk/models/README.md#projectrolesupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.update(role = 'role') pprint(vars(results)) @@ -2137,9 +2139,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.delete(role = 'role') pprint(vars(results)) @@ -2157,15 +2159,15 @@ This method has no parameters. **Return Type** -[ListPermissionsResponse](/src/dopplersdk/models/README.md#listpermissionsresponse) +[ProjectRolesListPermissionsResponse](/src/dopplersdk/models/README.md#projectroleslistpermissionsresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.list_permissions() pprint(vars(results)) @@ -2192,11 +2194,11 @@ Add ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'environments': ["officia","adipisicing sit aliqua occaecat"], + 'environments': ["incididunt dolor nulla dolore in","adipisicing veniam irure"], 'role': 'role', 'slug': 'slug', 'type_': 'group' @@ -2224,15 +2226,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ProjectMembersListResponse](/src/dopplersdk/models/README.md#projectmemberslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_members.list( project = 'project', page = 1, @@ -2257,18 +2259,18 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[ProjectMembersGetResponse](/src/dopplersdk/models/README.md#projectmembersgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_members.get( project = 'project', - type = 'workplace_user', + type = 'service_account', slug = 'slug' ) @@ -2287,22 +2289,22 @@ Update | type | [Type](/src/dopplersdk/models/README.md#type) | Required | | | slug | str | Required | Member's slug | | project | str | Required | Project slug | -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [ProjectMembersUpdateRequest](/src/dopplersdk/models/README.md#projectmembersupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[ProjectMembersUpdateResponse](/src/dopplersdk/models/README.md#projectmembersupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'environments': ["amet Duis incididunt Lorem","esse Excepteur"], + 'role': 'role' } results = sdk.project_members.update( request_input = request_body, @@ -2335,11 +2337,11 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_members.delete( - type = 'workplace_user', + type = 'group', slug = 'slug', project = 'project' ) @@ -2362,15 +2364,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[InvitesListResponse](/src/dopplersdk/models/README.md#inviteslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.invites.list( page = 1, per_page = 20 @@ -2389,22 +2391,22 @@ Create **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [ServiceAccountsCreateRequest](/src/dopplersdk/models/README.md#serviceaccountscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[ServiceAccountsCreateResponse](/src/dopplersdk/models/README.md#serviceaccountscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'name': 'name', + 'workplace_role': {"identifier":"identifier","permissions":["fugiat Lorem elit aliqua","anim deserunt Duis ut laboris"]} } results = sdk.service_accounts.create(request_input = request_body) @@ -2425,15 +2427,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ServiceAccountsListResponse](/src/dopplersdk/models/README.md#serviceaccountslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.service_accounts.list( page = 1, per_page = 20 @@ -2455,15 +2457,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[ServiceAccountsGetResponse](/src/dopplersdk/models/README.md#serviceaccountsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.service_accounts.get(slug = 'slug') pprint(vars(results)) @@ -2479,22 +2481,22 @@ Update | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| | slug | str | Required | Slug of the service account | -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [ServiceAccountsUpdateRequest](/src/dopplersdk/models/README.md#serviceaccountsupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[ServiceAccountsUpdateResponse](/src/dopplersdk/models/README.md#serviceaccountsupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'name': 'name', + 'workplace_role': {"identifier":"identifier","permissions":["exercitation cupidatat ullamco","est ut laborum et"]} } results = sdk.service_accounts.update( request_input = request_body, @@ -2523,9 +2525,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.service_accounts.delete(slug = 'slug') pprint(vars(results)) @@ -2541,19 +2543,19 @@ Create **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [GroupsCreateRequest](/src/dopplersdk/models/README.md#groupscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[GroupsCreateResponse](/src/dopplersdk/models/README.md#groupscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'default_project_role': 'default_project_role', 'name': 'name' @@ -2577,15 +2579,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[GroupsListResponse](/src/dopplersdk/models/README.md#groupslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.groups.list( page = 1, per_page = 20 @@ -2607,15 +2609,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[GroupsGetResponse](/src/dopplersdk/models/README.md#groupsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.groups.get(slug = 'slug') pprint(vars(results)) @@ -2631,19 +2633,19 @@ Update | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| | slug | str | Required | The group's slug | -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [GroupsUpdateRequest](/src/dopplersdk/models/README.md#groupsupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[GroupsUpdateResponse](/src/dopplersdk/models/README.md#groupsupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'default_project_role': 'default_project_role', 'name': 'name' @@ -2675,9 +2677,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.groups.delete(slug = 'slug') pprint(vars(results)) @@ -2703,9 +2705,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'slug': 'slug', 'type_': 'workplace_user' @@ -2728,7 +2730,7 @@ Delete Member | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| | slug | str | Required | The group's slug | -| type | [Type](/src/dopplersdk/models/README.md#type) | Required | | +| type | [GroupsType](/src/dopplersdk/models/README.md#groupstype) | Required | | | member_slug | str | Required | The member's slug | **Return Type** @@ -2739,9 +2741,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.groups.delete_member( slug = 'slug', type = 'workplace_user', diff --git a/src/dopplersdk/models/ActivityLogsListResponse.py b/src/dopplersdk/models/ActivityLogsListResponse.py new file mode 100644 index 0000000..94d413e --- /dev/null +++ b/src/dopplersdk/models/ActivityLogsListResponse.py @@ -0,0 +1,78 @@ +from .base import BaseModel +from typing import List +from typing import Any + + +class User(BaseModel): + def __init__( + self, + email: str = None, + name: str = None, + profile_image_url: str = None, + **kwargs, + ): + """ + Initialize User + Parameters: + ---------- + email: str + name: str + profile_image_url: str + """ + self.email = email + self.name = name + self.profile_image_url = profile_image_url + + +class ActivityLogsListResponseLogs(BaseModel): + def __init__( + self, + id: str = None, + text: str = None, + html: str = None, + created_at: str = None, + config: Any = None, + environment: str = None, + project: str = None, + user: User = None, + **kwargs, + ): + """ + Initialize ActivityLogsListResponseLogs + Parameters: + ---------- + id: str + text: str + html: str + created_at: str + config + environment: str + project: str + user: User + """ + self.id = id + self.text = text + self.html = html + self.created_at = created_at + self.config = config + self.environment = environment + self.project = project + self.user = user + + +class ActivityLogsListResponse(BaseModel): + def __init__( + self, + page: int = None, + logs: List[ActivityLogsListResponseLogs] = None, + **kwargs, + ): + """ + Initialize ActivityLogsListResponse + Parameters: + ---------- + page: int + logs: list of ActivityLogsListResponseLogs + """ + self.page = page + self.logs = logs diff --git a/src/dopplersdk/models/AddRequest.py b/src/dopplersdk/models/AddRequest.py index 7ebed15..a6b5a4b 100644 --- a/src/dopplersdk/models/AddRequest.py +++ b/src/dopplersdk/models/AddRequest.py @@ -36,7 +36,5 @@ def __init__( """ self.type_ = self._enum_matching(type_, Type.list(), "type_") self.slug = slug - if role is not None: - self.role = role - if environments is not None: - self.environments = environments + self.role = role + self.environments = environments diff --git a/src/dopplersdk/models/AddResponse.py b/src/dopplersdk/models/AddResponse.py index 2e5a525..9bdaae9 100644 --- a/src/dopplersdk/models/AddResponse.py +++ b/src/dopplersdk/models/AddResponse.py @@ -10,8 +10,7 @@ def __init__(self, identifier: str = None, **kwargs): ---------- identifier: str """ - if identifier is not None: - self.identifier = identifier + self.identifier = identifier class Member(BaseModel): @@ -34,16 +33,11 @@ def __init__( environments: list of MemberEnvironments type_: str """ - if slug is not None: - self.slug = slug - if role is not None: - self.role = role - if access_all_environments is not None: - self.access_all_environments = access_all_environments - if environments is not None: - self.environments = environments - if type_ is not None: - self.type_ = type_ + self.slug = slug + self.role = role + self.access_all_environments = access_all_environments + self.environments = environments + self.type_ = type_ class AddResponse(BaseModel): @@ -54,5 +48,4 @@ def __init__(self, member: Member = None, **kwargs): ---------- member: Member """ - if member is not None: - self.member = member + self.member = member diff --git a/src/dopplersdk/models/AddTrustedIpRequest.py b/src/dopplersdk/models/AddTrustedIpRequest.py new file mode 100644 index 0000000..cf27cdf --- /dev/null +++ b/src/dopplersdk/models/AddTrustedIpRequest.py @@ -0,0 +1,13 @@ +from .base import BaseModel + + +class AddTrustedIpRequest(BaseModel): + def __init__(self, ip: str, **kwargs): + """ + Initialize AddTrustedIpRequest + Parameters: + ---------- + ip: str + An IP address or CIDR range + """ + self.ip = ip diff --git a/src/dopplersdk/models/AddTrustedIpResponse.py b/src/dopplersdk/models/AddTrustedIpResponse.py new file mode 100644 index 0000000..15187e8 --- /dev/null +++ b/src/dopplersdk/models/AddTrustedIpResponse.py @@ -0,0 +1,12 @@ +from .base import BaseModel + + +class AddTrustedIpResponse(BaseModel): + def __init__(self, ip: str = None, **kwargs): + """ + Initialize AddTrustedIpResponse + Parameters: + ---------- + ip: str + """ + self.ip = ip diff --git a/src/dopplersdk/models/CloneResponse.py b/src/dopplersdk/models/CloneResponse.py index 8da41f9..d58c8e3 100644 --- a/src/dopplersdk/models/CloneResponse.py +++ b/src/dopplersdk/models/CloneResponse.py @@ -27,22 +27,14 @@ def __init__( environment: str project: str """ - if name is not None: - self.name = name - if root is not None: - self.root = root - if locked is not None: - self.locked = locked - if initial_fetch_at is not None: - self.initial_fetch_at = initial_fetch_at - if last_fetch_at is not None: - self.last_fetch_at = last_fetch_at - if created_at is not None: - self.created_at = created_at - if environment is not None: - self.environment = environment - if project is not None: - self.project = project + self.name = name + self.root = root + self.locked = locked + self.initial_fetch_at = initial_fetch_at + self.last_fetch_at = last_fetch_at + self.created_at = created_at + self.environment = environment + self.project = project class CloneResponse(BaseModel): @@ -53,5 +45,4 @@ def __init__(self, config: Config = None, **kwargs): ---------- config: Config """ - if config is not None: - self.config = config + self.config = config diff --git a/src/dopplersdk/models/ConfigLogsGetResponse.py b/src/dopplersdk/models/ConfigLogsGetResponse.py new file mode 100644 index 0000000..8f68142 --- /dev/null +++ b/src/dopplersdk/models/ConfigLogsGetResponse.py @@ -0,0 +1,92 @@ +from .base import BaseModel +from typing import List + + +class LogDiff(BaseModel): + def __init__(self, name: str = None, added: str = None, **kwargs): + """ + Initialize LogDiff + Parameters: + ---------- + name: str + added: str + """ + self.name = name + self.added = added + + +class User(BaseModel): + def __init__( + self, + email: str = None, + name: str = None, + username: str = None, + profile_image_url: str = None, + **kwargs, + ): + """ + Initialize User + Parameters: + ---------- + email: str + name: str + username: str + profile_image_url: str + """ + self.email = email + self.name = name + self.username = username + self.profile_image_url = profile_image_url + + +class Log(BaseModel): + def __init__( + self, + id: str = None, + text: str = None, + html: str = None, + diff: List[LogDiff] = None, + rollback: bool = None, + created_at: str = None, + config: str = None, + environment: str = None, + project: str = None, + user: User = None, + **kwargs, + ): + """ + Initialize Log + Parameters: + ---------- + id: str + text: str + html: str + diff: list of LogDiff + rollback: bool + created_at: str + config: str + environment: str + project: str + user: User + """ + self.id = id + self.text = text + self.html = html + self.diff = diff + self.rollback = rollback + self.created_at = created_at + self.config = config + self.environment = environment + self.project = project + self.user = user + + +class ConfigLogsGetResponse(BaseModel): + def __init__(self, log: Log = None, **kwargs): + """ + Initialize ConfigLogsGetResponse + Parameters: + ---------- + log: Log + """ + self.log = log diff --git a/src/dopplersdk/models/ConfigLogsListResponse.py b/src/dopplersdk/models/ConfigLogsListResponse.py new file mode 100644 index 0000000..d81d37a --- /dev/null +++ b/src/dopplersdk/models/ConfigLogsListResponse.py @@ -0,0 +1,80 @@ +from .base import BaseModel +from typing import List + + +class User(BaseModel): + def __init__( + self, + email: str = None, + name: str = None, + username: str = None, + profile_image_url: str = None, + **kwargs, + ): + """ + Initialize User + Parameters: + ---------- + email: str + name: str + username: str + profile_image_url: str + """ + self.email = email + self.name = name + self.username = username + self.profile_image_url = profile_image_url + + +class ConfigLogsListResponseLogs(BaseModel): + def __init__( + self, + id: str = None, + text: str = None, + html: str = None, + rollback: bool = None, + created_at: str = None, + config: str = None, + environment: str = None, + project: str = None, + user: User = None, + **kwargs, + ): + """ + Initialize ConfigLogsListResponseLogs + Parameters: + ---------- + id: str + text: str + html: str + rollback: bool + created_at: str + config: str + environment: str + project: str + user: User + """ + self.id = id + self.text = text + self.html = html + self.rollback = rollback + self.created_at = created_at + self.config = config + self.environment = environment + self.project = project + self.user = user + + +class ConfigLogsListResponse(BaseModel): + def __init__( + self, page: int = None, logs: List[ConfigLogsListResponseLogs] = None, **kwargs + ): + """ + Initialize ConfigLogsListResponse + Parameters: + ---------- + page: int + logs: list of ConfigLogsListResponseLogs + """ + self.page = page + self.logs = logs diff --git a/src/dopplersdk/models/ConfigsCreateResponse.py b/src/dopplersdk/models/ConfigsCreateResponse.py new file mode 100644 index 0000000..6b2a6de --- /dev/null +++ b/src/dopplersdk/models/ConfigsCreateResponse.py @@ -0,0 +1,48 @@ +from .base import BaseModel + + +class Config(BaseModel): + def __init__( + self, + name: str = None, + root: bool = None, + locked: bool = None, + initial_fetch_at: str = None, + last_fetch_at: str = None, + created_at: str = None, + environment: str = None, + project: str = None, + **kwargs, + ): + """ + Initialize Config + Parameters: + ---------- + name: str + root: bool + locked: bool + initial_fetch_at: str + last_fetch_at: str + created_at: str + environment: str + project: str + """ + self.name = name + self.root = root + self.locked = locked + self.initial_fetch_at = initial_fetch_at + self.last_fetch_at = last_fetch_at + self.created_at = created_at + self.environment = environment + self.project = project + + +class ConfigsCreateResponse(BaseModel): + def __init__(self, config: Config = None, **kwargs): + """ + Initialize ConfigsCreateResponse + Parameters: + ---------- + config: Config + """ + self.config = config diff --git a/src/dopplersdk/models/ConfigsGetResponse.py b/src/dopplersdk/models/ConfigsGetResponse.py new file mode 100644 index 0000000..37d0532 --- /dev/null +++ b/src/dopplersdk/models/ConfigsGetResponse.py @@ -0,0 +1,48 @@ +from .base import BaseModel + + +class Config(BaseModel): + def __init__( + self, + name: str = None, + root: bool = None, + locked: bool = None, + initial_fetch_at: str = None, + last_fetch_at: str = None, + created_at: str = None, + environment: str = None, + project: str = None, + **kwargs, + ): + """ + Initialize Config + Parameters: + ---------- + name: str + root: bool + locked: bool + initial_fetch_at: str + last_fetch_at: str + created_at: str + environment: str + project: str + """ + self.name = name + self.root = root + self.locked = locked + self.initial_fetch_at = initial_fetch_at + self.last_fetch_at = last_fetch_at + self.created_at = created_at + self.environment = environment + self.project = project + + +class ConfigsGetResponse(BaseModel): + def __init__(self, config: Config = None, **kwargs): + """ + Initialize ConfigsGetResponse + Parameters: + ---------- + config: Config + """ + self.config = config diff --git a/src/dopplersdk/models/ConfigsListResponse.py b/src/dopplersdk/models/ConfigsListResponse.py new file mode 100644 index 0000000..b480342 --- /dev/null +++ b/src/dopplersdk/models/ConfigsListResponse.py @@ -0,0 +1,56 @@ +from .base import BaseModel +from typing import List + + +class ConfigsListResponseConfigs(BaseModel): + def __init__( + self, + name: str = None, + root: bool = None, + locked: bool = None, + initial_fetch_at: str = None, + last_fetch_at: str = None, + created_at: str = None, + environment: str = None, + project: str = None, + **kwargs, + ): + """ + Initialize ConfigsListResponseConfigs + Parameters: + ---------- + name: str + root: bool + locked: bool + initial_fetch_at: str + last_fetch_at: str + created_at: str + environment: str + project: str + """ + self.name = name + self.root = root + self.locked = locked + self.initial_fetch_at = initial_fetch_at + self.last_fetch_at = last_fetch_at + self.created_at = created_at + self.environment = environment + self.project = project + + +class ConfigsListResponse(BaseModel): + def __init__( + self, + page: int = None, + configs: List[ConfigsListResponseConfigs] = None, + **kwargs, + ): + """ + Initialize ConfigsListResponse + Parameters: + ---------- + page: int + configs: list of ConfigsListResponseConfigs + """ + self.page = page + self.configs = configs diff --git a/src/dopplersdk/models/ConfigsUpdateResponse.py b/src/dopplersdk/models/ConfigsUpdateResponse.py new file mode 100644 index 0000000..61ed0c8 --- /dev/null +++ b/src/dopplersdk/models/ConfigsUpdateResponse.py @@ -0,0 +1,48 @@ +from .base import BaseModel + + +class Config(BaseModel): + def __init__( + self, + name: str = None, + root: bool = None, + locked: bool = None, + initial_fetch_at: str = None, + last_fetch_at: str = None, + created_at: str = None, + environment: str = None, + project: str = None, + **kwargs, + ): + """ + Initialize Config + Parameters: + ---------- + name: str + root: bool + locked: bool + initial_fetch_at: str + last_fetch_at: str + created_at: str + environment: str + project: str + """ + self.name = name + self.root = root + self.locked = locked + self.initial_fetch_at = initial_fetch_at + self.last_fetch_at = last_fetch_at + self.created_at = created_at + self.environment = environment + self.project = project + + +class ConfigsUpdateResponse(BaseModel): + def __init__(self, config: Config = None, **kwargs): + """ + Initialize ConfigsUpdateResponse + Parameters: + ---------- + config: Config + """ + self.config = config diff --git a/src/dopplersdk/models/CreateRequest.py b/src/dopplersdk/models/CreateRequest.py index 2734c95..aa18266 100644 --- a/src/dopplersdk/models/CreateRequest.py +++ b/src/dopplersdk/models/CreateRequest.py @@ -2,15 +2,15 @@ class CreateRequest(BaseModel): - def __init__(self, name: str, default_project_role: str = None, **kwargs): + def __init__(self, name: str, description: str = None, **kwargs): """ Initialize CreateRequest Parameters: ---------- name: str - default_project_role: str - Identifier of the project role + Name of project + description: str + Description of project """ self.name = name - if default_project_role is not None: - self.default_project_role = default_project_role + self.description = description diff --git a/src/dopplersdk/models/CreateResponse.py b/src/dopplersdk/models/CreateResponse.py index b335548..46f28c7 100644 --- a/src/dopplersdk/models/CreateResponse.py +++ b/src/dopplersdk/models/CreateResponse.py @@ -1,107 +1,36 @@ from .base import BaseModel -from typing import List -class DefaultProjectRole(BaseModel): - def __init__(self, identifier: str = None, **kwargs): - """ - Initialize DefaultProjectRole - Parameters: - ---------- - identifier: str - """ - if identifier is not None: - self.identifier = identifier - - -class Role(BaseModel): - def __init__(self, identifier: str = None, **kwargs): - """ - Initialize Role - Parameters: - ---------- - identifier: str - """ - if identifier is not None: - self.identifier = identifier - - -class GroupProjects(BaseModel): - def __init__(self, name: str = None, slug: str = None, role: Role = None, **kwargs): - """ - Initialize GroupProjects - Parameters: - ---------- - name: str - slug: str - role: Role - """ - if name is not None: - self.name = name - if slug is not None: - self.slug = slug - if role is not None: - self.role = role - - -class GroupMembers(BaseModel): - def __init__(self, slug: str = None, type_: str = None, **kwargs): - """ - Initialize GroupMembers - Parameters: - ---------- - slug: str - type_: str - """ - if slug is not None: - self.slug = slug - if type_ is not None: - self.type_ = type_ - - -class Group(BaseModel): +class Project(BaseModel): def __init__( self, + id: str = None, name: str = None, - slug: str = None, + description: str = None, created_at: str = None, - default_project_role: DefaultProjectRole = None, - projects: List[GroupProjects] = None, - members: List[GroupMembers] = None, **kwargs, ): """ - Initialize Group + Initialize Project Parameters: ---------- + id: str name: str - slug: str + description: str created_at: str - default_project_role: DefaultProjectRole - projects: list of GroupProjects - members: list of GroupMembers """ - if name is not None: - self.name = name - if slug is not None: - self.slug = slug - if created_at is not None: - self.created_at = created_at - if default_project_role is not None: - self.default_project_role = default_project_role - if projects is not None: - self.projects = projects - if members is not None: - self.members = members + self.id = id + self.name = name + self.description = description + self.created_at = created_at class CreateResponse(BaseModel): - def __init__(self, group: Group = None, **kwargs): + def __init__(self, project: Project = None, **kwargs): """ Initialize CreateResponse Parameters: ---------- - group: Group + project: Project """ - if group is not None: - self.group = group + self.project = project diff --git a/src/dopplersdk/models/DeleteRequest.py b/src/dopplersdk/models/DeleteRequest.py index 8bf4213..02432c8 100644 --- a/src/dopplersdk/models/DeleteRequest.py +++ b/src/dopplersdk/models/DeleteRequest.py @@ -2,12 +2,12 @@ class DeleteRequest(BaseModel): - def __init__(self, ip: str, **kwargs): + def __init__(self, project: str, **kwargs): """ Initialize DeleteRequest Parameters: ---------- - ip: str - An IP address or CIDR range + project: str + Unique identifier for the project object. """ - self.ip = ip + self.project = project diff --git a/src/dopplersdk/models/DeleteResponse.py b/src/dopplersdk/models/DeleteResponse.py index dc653d8..376f111 100644 --- a/src/dopplersdk/models/DeleteResponse.py +++ b/src/dopplersdk/models/DeleteResponse.py @@ -1 +1,12 @@ -DeleteResponse = dict +from .base import BaseModel + + +class DeleteResponse(BaseModel): + def __init__(self, success: bool = None, **kwargs): + """ + Initialize DeleteResponse + Parameters: + ---------- + success: bool + """ + self.success = success diff --git a/src/dopplersdk/models/DeleteTrustedIpRequest.py b/src/dopplersdk/models/DeleteTrustedIpRequest.py new file mode 100644 index 0000000..d09a324 --- /dev/null +++ b/src/dopplersdk/models/DeleteTrustedIpRequest.py @@ -0,0 +1,13 @@ +from .base import BaseModel + + +class DeleteTrustedIpRequest(BaseModel): + def __init__(self, ip: str, **kwargs): + """ + Initialize DeleteTrustedIpRequest + Parameters: + ---------- + ip: str + An IP address or CIDR range + """ + self.ip = ip diff --git a/src/dopplersdk/models/DownloadResponse.py b/src/dopplersdk/models/DownloadResponse.py index f77c88a..312f607 100644 --- a/src/dopplersdk/models/DownloadResponse.py +++ b/src/dopplersdk/models/DownloadResponse.py @@ -19,11 +19,7 @@ def __init__( DATABASE: str USER: str """ - if STRIPE is not None: - self.STRIPE = STRIPE - if ALGOLIA is not None: - self.ALGOLIA = ALGOLIA - if DATABASE is not None: - self.DATABASE = DATABASE - if USER is not None: - self.USER = USER + self.STRIPE = STRIPE + self.ALGOLIA = ALGOLIA + self.DATABASE = DATABASE + self.USER = USER diff --git a/src/dopplersdk/models/EnvironmentsCreateResponse.py b/src/dopplersdk/models/EnvironmentsCreateResponse.py new file mode 100644 index 0000000..3ca5bd1 --- /dev/null +++ b/src/dopplersdk/models/EnvironmentsCreateResponse.py @@ -0,0 +1,39 @@ +from .base import BaseModel + + +class Environment(BaseModel): + def __init__( + self, + id: str = None, + name: str = None, + initial_fetch_at: str = None, + created_at: str = None, + project: str = None, + **kwargs, + ): + """ + Initialize Environment + Parameters: + ---------- + id: str + name: str + initial_fetch_at: str + created_at: str + project: str + """ + self.id = id + self.name = name + self.initial_fetch_at = initial_fetch_at + self.created_at = created_at + self.project = project + + +class EnvironmentsCreateResponse(BaseModel): + def __init__(self, environment: Environment = None, **kwargs): + """ + Initialize EnvironmentsCreateResponse + Parameters: + ---------- + environment: Environment + """ + self.environment = environment diff --git a/src/dopplersdk/models/EnvironmentsGetResponse.py b/src/dopplersdk/models/EnvironmentsGetResponse.py new file mode 100644 index 0000000..7065796 --- /dev/null +++ b/src/dopplersdk/models/EnvironmentsGetResponse.py @@ -0,0 +1,39 @@ +from .base import BaseModel + + +class Environment(BaseModel): + def __init__( + self, + id: str = None, + name: str = None, + initial_fetch_at: str = None, + created_at: str = None, + project: str = None, + **kwargs, + ): + """ + Initialize Environment + Parameters: + ---------- + id: str + name: str + initial_fetch_at: str + created_at: str + project: str + """ + self.id = id + self.name = name + self.initial_fetch_at = initial_fetch_at + self.created_at = created_at + self.project = project + + +class EnvironmentsGetResponse(BaseModel): + def __init__(self, environment: Environment = None, **kwargs): + """ + Initialize EnvironmentsGetResponse + Parameters: + ---------- + environment: Environment + """ + self.environment = environment diff --git a/src/dopplersdk/models/EnvironmentsListResponse.py b/src/dopplersdk/models/EnvironmentsListResponse.py new file mode 100644 index 0000000..2512727 --- /dev/null +++ b/src/dopplersdk/models/EnvironmentsListResponse.py @@ -0,0 +1,47 @@ +from .base import BaseModel +from typing import List + + +class EnvironmentsListResponseEnvironments(BaseModel): + def __init__( + self, + id: str = None, + name: str = None, + initial_fetch_at: str = None, + created_at: str = None, + project: str = None, + **kwargs, + ): + """ + Initialize EnvironmentsListResponseEnvironments + Parameters: + ---------- + id: str + name: str + initial_fetch_at: str + created_at: str + project: str + """ + self.id = id + self.name = name + self.initial_fetch_at = initial_fetch_at + self.created_at = created_at + self.project = project + + +class EnvironmentsListResponse(BaseModel): + def __init__( + self, + environments: List[EnvironmentsListResponseEnvironments] = None, + page: int = None, + **kwargs, + ): + """ + Initialize EnvironmentsListResponse + Parameters: + ---------- + environments: list of EnvironmentsListResponseEnvironments + page: int + """ + self.environments = environments + self.page = page diff --git a/src/dopplersdk/models/GetResponse.py b/src/dopplersdk/models/GetResponse.py index 3f02d4e..3fabb67 100644 --- a/src/dopplersdk/models/GetResponse.py +++ b/src/dopplersdk/models/GetResponse.py @@ -1,107 +1,36 @@ from .base import BaseModel -from typing import List -class DefaultProjectRole(BaseModel): - def __init__(self, identifier: str = None, **kwargs): - """ - Initialize DefaultProjectRole - Parameters: - ---------- - identifier: str - """ - if identifier is not None: - self.identifier = identifier - - -class Role(BaseModel): - def __init__(self, identifier: str = None, **kwargs): - """ - Initialize Role - Parameters: - ---------- - identifier: str - """ - if identifier is not None: - self.identifier = identifier - - -class GroupProjects(BaseModel): - def __init__(self, name: str = None, slug: str = None, role: Role = None, **kwargs): - """ - Initialize GroupProjects - Parameters: - ---------- - name: str - slug: str - role: Role - """ - if name is not None: - self.name = name - if slug is not None: - self.slug = slug - if role is not None: - self.role = role - - -class GroupMembers(BaseModel): - def __init__(self, slug: str = None, type_: str = None, **kwargs): - """ - Initialize GroupMembers - Parameters: - ---------- - slug: str - type_: str - """ - if slug is not None: - self.slug = slug - if type_ is not None: - self.type_ = type_ - - -class Group(BaseModel): +class Project(BaseModel): def __init__( self, + id: str = None, name: str = None, - slug: str = None, + description: str = None, created_at: str = None, - default_project_role: DefaultProjectRole = None, - projects: List[GroupProjects] = None, - members: List[GroupMembers] = None, **kwargs, ): """ - Initialize Group + Initialize Project Parameters: ---------- + id: str name: str - slug: str + description: str created_at: str - default_project_role: DefaultProjectRole - projects: list of GroupProjects - members: list of GroupMembers """ - if name is not None: - self.name = name - if slug is not None: - self.slug = slug - if created_at is not None: - self.created_at = created_at - if default_project_role is not None: - self.default_project_role = default_project_role - if projects is not None: - self.projects = projects - if members is not None: - self.members = members + self.id = id + self.name = name + self.description = description + self.created_at = created_at class GetResponse(BaseModel): - def __init__(self, group: Group = None, **kwargs): + def __init__(self, project: Project = None, **kwargs): """ Initialize GetResponse Parameters: ---------- - group: Group + project: Project """ - if group is not None: - self.group = group + self.project = project diff --git a/src/dopplersdk/models/GroupsCreateRequest.py b/src/dopplersdk/models/GroupsCreateRequest.py new file mode 100644 index 0000000..ac92291 --- /dev/null +++ b/src/dopplersdk/models/GroupsCreateRequest.py @@ -0,0 +1,15 @@ +from .base import BaseModel + + +class GroupsCreateRequest(BaseModel): + def __init__(self, name: str, default_project_role: str = None, **kwargs): + """ + Initialize GroupsCreateRequest + Parameters: + ---------- + name: str + default_project_role: str + Identifier of the project role + """ + self.name = name + self.default_project_role = default_project_role diff --git a/src/dopplersdk/models/GroupsCreateResponse.py b/src/dopplersdk/models/GroupsCreateResponse.py new file mode 100644 index 0000000..5af67b4 --- /dev/null +++ b/src/dopplersdk/models/GroupsCreateResponse.py @@ -0,0 +1,93 @@ +from .base import BaseModel +from typing import List + + +class DefaultProjectRole(BaseModel): + def __init__(self, identifier: str = None, **kwargs): + """ + Initialize DefaultProjectRole + Parameters: + ---------- + identifier: str + """ + self.identifier = identifier + + +class Role(BaseModel): + def __init__(self, identifier: str = None, **kwargs): + """ + Initialize Role + Parameters: + ---------- + identifier: str + """ + self.identifier = identifier + + +class GroupProjects(BaseModel): + def __init__(self, name: str = None, slug: str = None, role: Role = None, **kwargs): + """ + Initialize GroupProjects + Parameters: + ---------- + name: str + slug: str + role: Role + """ + self.name = name + self.slug = slug + self.role = role + + +class GroupMembers(BaseModel): + def __init__(self, slug: str = None, type_: str = None, **kwargs): + """ + Initialize GroupMembers + Parameters: + ---------- + slug: str + type_: str + """ + self.slug = slug + self.type_ = type_ + + +class Group(BaseModel): + def __init__( + self, + name: str = None, + slug: str = None, + created_at: str = None, + default_project_role: DefaultProjectRole = None, + projects: List[GroupProjects] = None, + members: List[GroupMembers] = None, + **kwargs, + ): + """ + Initialize Group + Parameters: + ---------- + name: str + slug: str + created_at: str + default_project_role: DefaultProjectRole + projects: list of GroupProjects + members: list of GroupMembers + """ + self.name = name + self.slug = slug + self.created_at = created_at + self.default_project_role = default_project_role + self.projects = projects + self.members = members + + +class GroupsCreateResponse(BaseModel): + def __init__(self, group: Group = None, **kwargs): + """ + Initialize GroupsCreateResponse + Parameters: + ---------- + group: Group + """ + self.group = group diff --git a/src/dopplersdk/models/GroupsGetResponse.py b/src/dopplersdk/models/GroupsGetResponse.py new file mode 100644 index 0000000..9c9421e --- /dev/null +++ b/src/dopplersdk/models/GroupsGetResponse.py @@ -0,0 +1,93 @@ +from .base import BaseModel +from typing import List + + +class DefaultProjectRole(BaseModel): + def __init__(self, identifier: str = None, **kwargs): + """ + Initialize DefaultProjectRole + Parameters: + ---------- + identifier: str + """ + self.identifier = identifier + + +class Role(BaseModel): + def __init__(self, identifier: str = None, **kwargs): + """ + Initialize Role + Parameters: + ---------- + identifier: str + """ + self.identifier = identifier + + +class GroupProjects(BaseModel): + def __init__(self, name: str = None, slug: str = None, role: Role = None, **kwargs): + """ + Initialize GroupProjects + Parameters: + ---------- + name: str + slug: str + role: Role + """ + self.name = name + self.slug = slug + self.role = role + + +class GroupMembers(BaseModel): + def __init__(self, slug: str = None, type_: str = None, **kwargs): + """ + Initialize GroupMembers + Parameters: + ---------- + slug: str + type_: str + """ + self.slug = slug + self.type_ = type_ + + +class Group(BaseModel): + def __init__( + self, + name: str = None, + slug: str = None, + created_at: str = None, + default_project_role: DefaultProjectRole = None, + projects: List[GroupProjects] = None, + members: List[GroupMembers] = None, + **kwargs, + ): + """ + Initialize Group + Parameters: + ---------- + name: str + slug: str + created_at: str + default_project_role: DefaultProjectRole + projects: list of GroupProjects + members: list of GroupMembers + """ + self.name = name + self.slug = slug + self.created_at = created_at + self.default_project_role = default_project_role + self.projects = projects + self.members = members + + +class GroupsGetResponse(BaseModel): + def __init__(self, group: Group = None, **kwargs): + """ + Initialize GroupsGetResponse + Parameters: + ---------- + group: Group + """ + self.group = group diff --git a/src/dopplersdk/models/GroupsListResponse.py b/src/dopplersdk/models/GroupsListResponse.py new file mode 100644 index 0000000..4af4b07 --- /dev/null +++ b/src/dopplersdk/models/GroupsListResponse.py @@ -0,0 +1,48 @@ +from .base import BaseModel +from typing import List + + +class DefaultProjectRole(BaseModel): + def __init__(self, identifier: str = None, **kwargs): + """ + Initialize DefaultProjectRole + Parameters: + ---------- + identifier: str + """ + self.identifier = identifier + + +class GroupsListResponseGroups(BaseModel): + def __init__( + self, + name: str = None, + slug: str = None, + created_at: str = None, + default_project_role: DefaultProjectRole = None, + **kwargs, + ): + """ + Initialize GroupsListResponseGroups + Parameters: + ---------- + name: str + slug: str + created_at: str + default_project_role: DefaultProjectRole + """ + self.name = name + self.slug = slug + self.created_at = created_at + self.default_project_role = default_project_role + + +class GroupsListResponse(BaseModel): + def __init__(self, groups: List[GroupsListResponseGroups] = None, **kwargs): + """ + Initialize GroupsListResponse + Parameters: + ---------- + groups: list of GroupsListResponseGroups + """ + self.groups = groups diff --git a/src/dopplersdk/models/GroupsType.py b/src/dopplersdk/models/GroupsType.py new file mode 100644 index 0000000..aa3d4ad --- /dev/null +++ b/src/dopplersdk/models/GroupsType.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class GroupsType(Enum): + WORKPLACE_USER = "workplace_user" + + def list(): + return list(map(lambda x: x.value, GroupsType._member_map_.values())) diff --git a/src/dopplersdk/models/GroupsUpdateRequest.py b/src/dopplersdk/models/GroupsUpdateRequest.py new file mode 100644 index 0000000..ad353fb --- /dev/null +++ b/src/dopplersdk/models/GroupsUpdateRequest.py @@ -0,0 +1,15 @@ +from .base import BaseModel + + +class GroupsUpdateRequest(BaseModel): + def __init__(self, name: str = None, default_project_role: str = None, **kwargs): + """ + Initialize GroupsUpdateRequest + Parameters: + ---------- + name: str + default_project_role: str + Identifier of the project role + """ + self.name = name + self.default_project_role = default_project_role diff --git a/src/dopplersdk/models/GroupsUpdateResponse.py b/src/dopplersdk/models/GroupsUpdateResponse.py new file mode 100644 index 0000000..390feae --- /dev/null +++ b/src/dopplersdk/models/GroupsUpdateResponse.py @@ -0,0 +1,93 @@ +from .base import BaseModel +from typing import List + + +class DefaultProjectRole(BaseModel): + def __init__(self, identifier: str = None, **kwargs): + """ + Initialize DefaultProjectRole + Parameters: + ---------- + identifier: str + """ + self.identifier = identifier + + +class Role(BaseModel): + def __init__(self, identifier: str = None, **kwargs): + """ + Initialize Role + Parameters: + ---------- + identifier: str + """ + self.identifier = identifier + + +class GroupProjects(BaseModel): + def __init__(self, name: str = None, slug: str = None, role: Role = None, **kwargs): + """ + Initialize GroupProjects + Parameters: + ---------- + name: str + slug: str + role: Role + """ + self.name = name + self.slug = slug + self.role = role + + +class GroupMembers(BaseModel): + def __init__(self, slug: str = None, type_: str = None, **kwargs): + """ + Initialize GroupMembers + Parameters: + ---------- + slug: str + type_: str + """ + self.slug = slug + self.type_ = type_ + + +class Group(BaseModel): + def __init__( + self, + name: str = None, + slug: str = None, + created_at: str = None, + default_project_role: DefaultProjectRole = None, + projects: List[GroupProjects] = None, + members: List[GroupMembers] = None, + **kwargs, + ): + """ + Initialize Group + Parameters: + ---------- + name: str + slug: str + created_at: str + default_project_role: DefaultProjectRole + projects: list of GroupProjects + members: list of GroupMembers + """ + self.name = name + self.slug = slug + self.created_at = created_at + self.default_project_role = default_project_role + self.projects = projects + self.members = members + + +class GroupsUpdateResponse(BaseModel): + def __init__(self, group: Group = None, **kwargs): + """ + Initialize GroupsUpdateResponse + Parameters: + ---------- + group: Group + """ + self.group = group diff --git a/src/dopplersdk/models/IntegrationsCreateRequest.py b/src/dopplersdk/models/IntegrationsCreateRequest.py index b891ca2..849b0d7 100644 --- a/src/dopplersdk/models/IntegrationsCreateRequest.py +++ b/src/dopplersdk/models/IntegrationsCreateRequest.py @@ -1,29 +1,24 @@ from .base import BaseModel - -class Data(BaseModel): - """ - The authentication data for the integration - """ - - def __init__(self, **kwargs): - pass +""" +The authentication data for the integration +""" +Data = dict class IntegrationsCreateRequest(BaseModel): - def __init__(self, name: str, type_: str, data: Data = None, **kwargs): + def __init__(self, type_: str, name: str, data: Data = None, **kwargs): """ Initialize IntegrationsCreateRequest Parameters: ---------- - name: str - The name of the integration type_: str The integration type + name: str + The name of the integration data: Data The authentication data for the integration """ - self.name = name self.type_ = type_ - if data is not None: - self.data = data + self.name = name + self.data = data diff --git a/src/dopplersdk/models/IntegrationsCreateResponse.py b/src/dopplersdk/models/IntegrationsCreateResponse.py new file mode 100644 index 0000000..88c6bbc --- /dev/null +++ b/src/dopplersdk/models/IntegrationsCreateResponse.py @@ -0,0 +1,27 @@ +from .base import BaseModel + + +class Integration(BaseModel): + def __init__(self, slug: str = None, name: str = None, type_: str = None, **kwargs): + """ + Initialize Integration + Parameters: + ---------- + slug: str + name: str + type_: str + """ + self.slug = slug + self.name = name + self.type_ = type_ + + +class IntegrationsCreateResponse(BaseModel): + def __init__(self, integration: Integration = None, **kwargs): + """ + Initialize IntegrationsCreateResponse + Parameters: + ---------- + integration: Integration + """ + self.integration = integration diff --git a/src/dopplersdk/models/IntegrationsDeleteResponse.py b/src/dopplersdk/models/IntegrationsDeleteResponse.py new file mode 100644 index 0000000..8013a81 --- /dev/null +++ b/src/dopplersdk/models/IntegrationsDeleteResponse.py @@ -0,0 +1 @@ +IntegrationsDeleteResponse = dict diff --git a/src/dopplersdk/models/IntegrationsGetResponse.py b/src/dopplersdk/models/IntegrationsGetResponse.py new file mode 100644 index 0000000..9571028 --- /dev/null +++ b/src/dopplersdk/models/IntegrationsGetResponse.py @@ -0,0 +1,27 @@ +from .base import BaseModel + + +class Integration(BaseModel): + def __init__(self, slug: str = None, name: str = None, type_: str = None, **kwargs): + """ + Initialize Integration + Parameters: + ---------- + slug: str + name: str + type_: str + """ + self.slug = slug + self.name = name + self.type_ = type_ + + +class IntegrationsGetResponse(BaseModel): + def __init__(self, integration: Integration = None, **kwargs): + """ + Initialize IntegrationsGetResponse + Parameters: + ---------- + integration: Integration + """ + self.integration = integration diff --git a/src/dopplersdk/models/IntegrationsListResponse.py b/src/dopplersdk/models/IntegrationsListResponse.py new file mode 100644 index 0000000..e771e5f --- /dev/null +++ b/src/dopplersdk/models/IntegrationsListResponse.py @@ -0,0 +1,47 @@ +from .base import BaseModel +from typing import List + + +class IntegrationsListResponseIntegrations(BaseModel): + def __init__( + self, + slug: str = None, + name: str = None, + kind: str = None, + enabled: bool = None, + type_: str = None, + **kwargs, + ): + """ + Initialize IntegrationsListResponseIntegrations + Parameters: + ---------- + slug: str + name: str + kind: str + enabled: bool + type_: str + """ + self.slug = slug + self.name = name + self.kind = kind + self.enabled = enabled + self.type_ = type_ + + +class IntegrationsListResponse(BaseModel): + def __init__( + self, + integrations: List[IntegrationsListResponseIntegrations] = None, + success: bool = None, + **kwargs, + ): + """ + Initialize IntegrationsListResponse + Parameters: + ---------- + integrations: list of IntegrationsListResponseIntegrations + success: bool + """ + self.integrations = integrations + self.success = success diff --git a/src/dopplersdk/models/IntegrationsUpdateRequest.py b/src/dopplersdk/models/IntegrationsUpdateRequest.py index ce3c924..7c64678 100644 --- a/src/dopplersdk/models/IntegrationsUpdateRequest.py +++ b/src/dopplersdk/models/IntegrationsUpdateRequest.py @@ -12,7 +12,5 @@ def __init__(self, name: str = None, data: str = None, **kwargs): data: str The new authentication data for the integration """ - if name is not None: - self.name = name - if data is not None: - self.data = data + self.name = name + self.data = data diff --git a/src/dopplersdk/models/IntegrationsUpdateResponse.py b/src/dopplersdk/models/IntegrationsUpdateResponse.py new file mode 100644 index 0000000..eb23205 --- /dev/null +++ b/src/dopplersdk/models/IntegrationsUpdateResponse.py @@ -0,0 +1 @@ +IntegrationsUpdateResponse = dict diff --git a/src/dopplersdk/models/InvitesListResponse.py b/src/dopplersdk/models/InvitesListResponse.py new file mode 100644 index 0000000..47d167c --- /dev/null +++ b/src/dopplersdk/models/InvitesListResponse.py @@ -0,0 +1,67 @@ +from .base import BaseModel +from typing import List + + +class WorkplaceRole(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + is_inline_role: bool = None, + **kwargs, + ): + """ + Initialize WorkplaceRole + Parameters: + ---------- + name: str + permissions: list of WorkplaceRolePermissions + identifier: str + created_at: str + is_custom_role: bool + is_inline_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + self.is_inline_role = is_inline_role + + +class InvitesListResponseInvites(BaseModel): + def __init__( + self, + slug: str = None, + email: str = None, + created_at: str = None, + workplace_role: WorkplaceRole = None, + **kwargs, + ): + """ + Initialize InvitesListResponseInvites + Parameters: + ---------- + slug: str + email: str + created_at: str + workplace_role: WorkplaceRole + """ + self.slug = slug + self.email = email + self.created_at = created_at + self.workplace_role = workplace_role + + +class InvitesListResponse(BaseModel): + def __init__(self, invites: List[InvitesListResponseInvites] = None, **kwargs): + """ + Initialize InvitesListResponse + Parameters: + ---------- + invites: list of InvitesListResponseInvites + """ + self.invites = invites diff --git a/src/dopplersdk/models/IssueLeaseResponse.py b/src/dopplersdk/models/IssueLeaseResponse.py index 3db4ea3..621e11f 100644 --- a/src/dopplersdk/models/IssueLeaseResponse.py +++ b/src/dopplersdk/models/IssueLeaseResponse.py @@ -21,11 +21,7 @@ def __init__( expires_at: str value: Value """ - if success is not None: - self.success = success - if id is not None: - self.id = id - if expires_at is not None: - self.expires_at = expires_at - if value is not None: - self.value = value + self.success = success + self.id = id + self.expires_at = expires_at + self.value = value diff --git a/src/dopplersdk/models/ListPermissionsResponse.py b/src/dopplersdk/models/ListPermissionsResponse.py index 1486166..28d7f3d 100644 --- a/src/dopplersdk/models/ListPermissionsResponse.py +++ b/src/dopplersdk/models/ListPermissionsResponse.py @@ -10,5 +10,4 @@ def __init__(self, permissions: List[str] = None, **kwargs): ---------- permissions: list of ListPermissionsResponsePermissions """ - if permissions is not None: - self.permissions = permissions + self.permissions = permissions diff --git a/src/dopplersdk/models/ListResponse.py b/src/dopplersdk/models/ListResponse.py index 4743095..29fe0db 100644 --- a/src/dopplersdk/models/ListResponse.py +++ b/src/dopplersdk/models/ListResponse.py @@ -2,53 +2,43 @@ from typing import List -class DefaultProjectRole(BaseModel): - def __init__(self, identifier: str = None, **kwargs): - """ - Initialize DefaultProjectRole - Parameters: - ---------- - identifier: str - """ - if identifier is not None: - self.identifier = identifier - - -class ListResponseGroups(BaseModel): +class ListResponseProjects(BaseModel): def __init__( self, - name: str = None, + id: str = None, slug: str = None, + name: str = None, + description: str = None, created_at: str = None, - default_project_role: DefaultProjectRole = None, **kwargs, ): """ - Initialize ListResponseGroups + Initialize ListResponseProjects Parameters: ---------- - name: str + id: str slug: str + name: str + description: str created_at: str - default_project_role: DefaultProjectRole """ - if name is not None: - self.name = name - if slug is not None: - self.slug = slug - if created_at is not None: - self.created_at = created_at - if default_project_role is not None: - self.default_project_role = default_project_role + self.id = id + self.slug = slug + self.name = name + self.description = description + self.created_at = created_at class ListResponse(BaseModel): - def __init__(self, groups: List[ListResponseGroups] = None, **kwargs): + def __init__( + self, page: int = None, projects: List[ListResponseProjects] = None, **kwargs + ): """ Initialize ListResponse Parameters: ---------- - groups: list of ListResponseGroups + page: int + projects: list of ListResponseProjects """ - if groups is not None: - self.groups = groups + self.page = page + self.projects = projects diff --git a/src/dopplersdk/models/ListTrustedIpsResponse.py b/src/dopplersdk/models/ListTrustedIpsResponse.py new file mode 100644 index 0000000..687930e --- /dev/null +++ b/src/dopplersdk/models/ListTrustedIpsResponse.py @@ -0,0 +1,13 @@ +from .base import BaseModel +from typing import List + + +class ListTrustedIpsResponse(BaseModel): + def __init__(self, ips: List[str] = None, **kwargs): + """ + Initialize ListTrustedIpsResponse + Parameters: + ---------- + ips: list of ListTrustedIpsResponseIps + """ + self.ips = ips diff --git a/src/dopplersdk/models/LockResponse.py b/src/dopplersdk/models/LockResponse.py index 50b7647..b5d00a3 100644 --- a/src/dopplersdk/models/LockResponse.py +++ b/src/dopplersdk/models/LockResponse.py @@ -27,22 +27,14 @@ def __init__( environment: str project: str """ - if name is not None: - self.name = name - if root is not None: - self.root = root - if locked is not None: - self.locked = locked - if initial_fetch_at is not None: - self.initial_fetch_at = initial_fetch_at - if last_fetch_at is not None: - self.last_fetch_at = last_fetch_at - if created_at is not None: - self.created_at = created_at - if environment is not None: - self.environment = environment - if project is not None: - self.project = project + self.name = name + self.root = root + self.locked = locked + self.initial_fetch_at = initial_fetch_at + self.last_fetch_at = last_fetch_at + self.created_at = created_at + self.environment = environment + self.project = project class LockResponse(BaseModel): @@ -53,5 +45,4 @@ def __init__(self, config: Config = None, **kwargs): ---------- config: Config """ - if config is not None: - self.config = config + self.config = config diff --git a/src/dopplersdk/models/MeResponse.py b/src/dopplersdk/models/MeResponse.py index 9abbc45..7f15fb6 100644 --- a/src/dopplersdk/models/MeResponse.py +++ b/src/dopplersdk/models/MeResponse.py @@ -10,10 +10,8 @@ def __init__(self, slug: str = None, name: str = None, **kwargs): slug: str name: str """ - if slug is not None: - self.slug = slug - if name is not None: - self.name = name + self.slug = slug + self.name = name class MeResponse(BaseModel): @@ -40,17 +38,10 @@ def __init__( workplace: Workplace type_: str """ - if slug is not None: - self.slug = slug - if name is not None: - self.name = name - if created_at is not None: - self.created_at = created_at - if last_seen_at is not None: - self.last_seen_at = last_seen_at - if token_preview is not None: - self.token_preview = token_preview - if workplace is not None: - self.workplace = workplace - if type_ is not None: - self.type_ = type_ + self.slug = slug + self.name = name + self.created_at = created_at + self.last_seen_at = last_seen_at + self.token_preview = token_preview + self.workplace = workplace + self.type_ = type_ diff --git a/src/dopplersdk/models/NamesResponse.py b/src/dopplersdk/models/NamesResponse.py index 5355265..1c2bc13 100644 --- a/src/dopplersdk/models/NamesResponse.py +++ b/src/dopplersdk/models/NamesResponse.py @@ -10,5 +10,4 @@ def __init__(self, names: List[str] = None, **kwargs): ---------- names: list of NamesResponseNames """ - if names is not None: - self.names = names + self.names = names diff --git a/src/dopplersdk/models/ProjectMembersGetResponse.py b/src/dopplersdk/models/ProjectMembersGetResponse.py new file mode 100644 index 0000000..f8df876 --- /dev/null +++ b/src/dopplersdk/models/ProjectMembersGetResponse.py @@ -0,0 +1,51 @@ +from .base import BaseModel +from typing import List + + +class Role(BaseModel): + def __init__(self, identifier: str = None, **kwargs): + """ + Initialize Role + Parameters: + ---------- + identifier: str + """ + self.identifier = identifier + + +class Member(BaseModel): + def __init__( + self, + slug: str = None, + role: Role = None, + access_all_environments: bool = None, + environments: List[str] = None, + type_: str = None, + **kwargs, + ): + """ + Initialize Member + Parameters: + ---------- + slug: str + role: Role + access_all_environments: bool + environments: list of MemberEnvironments + type_: str + """ + self.slug = slug + self.role = role + self.access_all_environments = access_all_environments + self.environments = environments + self.type_ = type_ + + +class ProjectMembersGetResponse(BaseModel): + def __init__(self, member: Member = None, **kwargs): + """ + Initialize ProjectMembersGetResponse + Parameters: + ---------- + member: Member + """ + self.member = member diff --git a/src/dopplersdk/models/ProjectMembersListResponse.py b/src/dopplersdk/models/ProjectMembersListResponse.py new file mode 100644 index 0000000..f0bef76 --- /dev/null +++ b/src/dopplersdk/models/ProjectMembersListResponse.py @@ -0,0 +1,53 @@ +from .base import BaseModel +from typing import List + + +class Role(BaseModel): + def __init__(self, identifier: str = None, **kwargs): + """ + Initialize Role + Parameters: + ---------- + identifier: str + """ + self.identifier = identifier + + +class ProjectMembersListResponseMembers(BaseModel): + def __init__( + self, + slug: str = None, + role: Role = None, + access_all_environments: bool = None, + environments: List[str] = None, + type_: str = None, + **kwargs, + ): + """ + Initialize ProjectMembersListResponseMembers + Parameters: + ---------- + slug: str + role: Role + access_all_environments: bool + environments: list of ProjectMembersListResponseMembersEnvironments + type_: str + """ + self.slug = slug + self.role = role + self.access_all_environments = access_all_environments + self.environments = environments + self.type_ = type_ + + +class ProjectMembersListResponse(BaseModel): + def __init__( + self, members: List[ProjectMembersListResponseMembers] = None, **kwargs + ): + """ + Initialize ProjectMembersListResponse + Parameters: + ---------- + members: list of ProjectMembersListResponseMembers + """ + self.members = members diff --git a/src/dopplersdk/models/ProjectMembersUpdateRequest.py b/src/dopplersdk/models/ProjectMembersUpdateRequest.py new file mode 100644 index 0000000..94e5bd6 --- /dev/null +++ b/src/dopplersdk/models/ProjectMembersUpdateRequest.py @@ -0,0 +1,17 @@ +from .base import BaseModel +from typing import List + + +class ProjectMembersUpdateRequest(BaseModel): + def __init__(self, role: str = None, environments: List[str] = None, **kwargs): + """ + Initialize ProjectMembersUpdateRequest + Parameters: + ---------- + role: str + Identifier of the project role + environments: list of ProjectMembersUpdateRequestEnvironments + Environment slugs to grant the member access to + """ + self.role = role + self.environments = environments diff --git a/src/dopplersdk/models/ProjectMembersUpdateResponse.py b/src/dopplersdk/models/ProjectMembersUpdateResponse.py new file mode 100644 index 0000000..8cbcf94 --- /dev/null +++ b/src/dopplersdk/models/ProjectMembersUpdateResponse.py @@ -0,0 +1,51 @@ +from .base import BaseModel +from typing import List + + +class Role(BaseModel): + def __init__(self, identifier: str = None, **kwargs): + """ + Initialize Role + Parameters: + ---------- + identifier: str + """ + self.identifier = identifier + + +class Member(BaseModel): + def __init__( + self, + slug: str = None, + role: Role = None, + access_all_environments: bool = None, + environments: List[str] = None, + type_: str = None, + **kwargs, + ): + """ + Initialize Member + Parameters: + ---------- + slug: str + role: Role + access_all_environments: bool + environments: list of MemberEnvironments + type_: str + """ + self.slug = slug + self.role = role + self.access_all_environments = access_all_environments + self.environments = environments + self.type_ = type_ + + +class ProjectMembersUpdateResponse(BaseModel): + def __init__(self, member: Member = None, **kwargs): + """ + Initialize ProjectMembersUpdateResponse + Parameters: + ---------- + member: Member + """ + self.member = member diff --git a/src/dopplersdk/models/ProjectRolesCreateResponse.py b/src/dopplersdk/models/ProjectRolesCreateResponse.py new file mode 100644 index 0000000..206b713 --- /dev/null +++ b/src/dopplersdk/models/ProjectRolesCreateResponse.py @@ -0,0 +1,40 @@ +from .base import BaseModel +from typing import List + + +class Role(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + **kwargs, + ): + """ + Initialize Role + Parameters: + ---------- + name: str + permissions: list of RolePermissions + identifier: str + created_at: str + is_custom_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + + +class ProjectRolesCreateResponse(BaseModel): + def __init__(self, role: Role = None, **kwargs): + """ + Initialize ProjectRolesCreateResponse + Parameters: + ---------- + role: Role + """ + self.role = role diff --git a/src/dopplersdk/models/ProjectRolesGetResponse.py b/src/dopplersdk/models/ProjectRolesGetResponse.py new file mode 100644 index 0000000..e243b1e --- /dev/null +++ b/src/dopplersdk/models/ProjectRolesGetResponse.py @@ -0,0 +1,40 @@ +from .base import BaseModel +from typing import List + + +class Role(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + **kwargs, + ): + """ + Initialize Role + Parameters: + ---------- + name: str + permissions: list of RolePermissions + identifier: str + created_at: str + is_custom_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + + +class ProjectRolesGetResponse(BaseModel): + def __init__(self, role: Role = None, **kwargs): + """ + Initialize ProjectRolesGetResponse + Parameters: + ---------- + role: Role + """ + self.role = role diff --git a/src/dopplersdk/models/ProjectRolesListPermissionsResponse.py b/src/dopplersdk/models/ProjectRolesListPermissionsResponse.py new file mode 100644 index 0000000..c56a3d9 --- /dev/null +++ b/src/dopplersdk/models/ProjectRolesListPermissionsResponse.py @@ -0,0 +1,13 @@ +from .base import BaseModel +from typing import List + + +class ProjectRolesListPermissionsResponse(BaseModel): + def __init__(self, permissions: List[str] = None, **kwargs): + """ + Initialize ProjectRolesListPermissionsResponse + Parameters: + ---------- + permissions: list of ProjectRolesListPermissionsResponsePermissions + """ + self.permissions = permissions diff --git a/src/dopplersdk/models/ProjectRolesListResponse.py b/src/dopplersdk/models/ProjectRolesListResponse.py new file mode 100644 index 0000000..796748c --- /dev/null +++ b/src/dopplersdk/models/ProjectRolesListResponse.py @@ -0,0 +1,40 @@ +from .base import BaseModel +from typing import List + + +class ProjectRolesListResponseRoles(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + **kwargs, + ): + """ + Initialize ProjectRolesListResponseRoles + Parameters: + ---------- + name: str + permissions: list of ProjectRolesListResponseRolesPermissions + identifier: str + created_at: str + is_custom_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + + +class ProjectRolesListResponse(BaseModel): + def __init__(self, roles: List[ProjectRolesListResponseRoles] = None, **kwargs): + """ + Initialize ProjectRolesListResponse + Parameters: + ---------- + roles: list of ProjectRolesListResponseRoles + """ + self.roles = roles diff --git a/src/dopplersdk/models/ProjectRolesUpdateResponse.py b/src/dopplersdk/models/ProjectRolesUpdateResponse.py new file mode 100644 index 0000000..b37dbf7 --- /dev/null +++ b/src/dopplersdk/models/ProjectRolesUpdateResponse.py @@ -0,0 +1,40 @@ +from .base import BaseModel +from typing import List + + +class Role(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + **kwargs, + ): + """ + Initialize Role + Parameters: + ---------- + name: str + permissions: list of RolePermissions + identifier: str + created_at: str + is_custom_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + + +class ProjectRolesUpdateResponse(BaseModel): + def __init__(self, role: Role = None, **kwargs): + """ + Initialize ProjectRolesUpdateResponse + Parameters: + ---------- + role: Role + """ + self.role = role diff --git a/src/dopplersdk/models/README.md b/src/dopplersdk/models/README.md index dafc14c..18d8d76 100644 --- a/src/dopplersdk/models/README.md +++ b/src/dopplersdk/models/README.md @@ -4,14 +4,30 @@ A list of all models. - [Format](#format) - [NameTransformer](#nametransformer) - [Type](#type) +- [GroupsType](#groupstype) - [GetResponse](#getresponse) - [UpdateResponse](#updateresponse) - [ListResponse](#listresponse) - [CreateResponse](#createresponse) +- [EnvironmentsListResponse](#environmentslistresponse) +- [EnvironmentsCreateResponse](#environmentscreateresponse) +- [ConfigsListResponse](#configslistresponse) +- [ConfigsCreateResponse](#configscreateresponse) +- [ConfigsGetResponse](#configsgetresponse) +- [ConfigsUpdateResponse](#configsupdateresponse) - [DeleteResponse](#deleteresponse) +- [EnvironmentsGetResponse](#environmentsgetresponse) - [RenameResponse](#renameresponse) +- [SecretsListResponse](#secretslistresponse) +- [SecretsUpdateResponse](#secretsupdateresponse) +- [ConfigLogsListResponse](#configlogslistresponse) +- [ConfigLogsGetResponse](#configlogsgetresponse) +- [ActivityLogsListResponse](#activitylogslistresponse) - [RetrieveResponse](#retrieveresponse) +- [SecretsGetResponse](#secretsgetresponse) - [RollbackResponse](#rollbackresponse) +- [ServiceTokensListResponse](#servicetokenslistresponse) +- [ServiceTokensCreateResponse](#servicetokenscreateresponse) - [CloneResponse](#cloneresponse) - [LockResponse](#lockresponse) - [UnlockResponse](#unlockresponse) @@ -20,20 +36,68 @@ A list of all models. - [RevokeLeaseResponse](#revokeleaseresponse) - [NamesResponse](#namesresponse) - [UpdateNoteResponse](#updatenoteresponse) +- [IntegrationsListResponse](#integrationslistresponse) +- [IntegrationsCreateResponse](#integrationscreateresponse) +- [IntegrationsGetResponse](#integrationsgetresponse) +- [IntegrationsUpdateResponse](#integrationsupdateresponse) +- [IntegrationsDeleteResponse](#integrationsdeleteresponse) +- [SyncsCreateResponse](#syncscreateresponse) +- [SyncsGetResponse](#syncsgetresponse) +- [SyncsDeleteResponse](#syncsdeleteresponse) - [MeResponse](#meresponse) -- [AddResponse](#addresponse) +- [ListTrustedIpsResponse](#listtrustedipsresponse) +- [AddTrustedIpResponse](#addtrustedipresponse) +- [WorkplaceRolesListResponse](#workplaceroleslistresponse) +- [WorkplaceRolesCreateResponse](#workplacerolescreateresponse) - [ListPermissionsResponse](#listpermissionsresponse) +- [WorkplaceRolesGetResponse](#workplacerolesgetresponse) +- [WorkplaceRolesUpdateResponse](#workplacerolesupdateresponse) +- [ProjectRolesListResponse](#projectroleslistresponse) +- [ProjectRolesCreateResponse](#projectrolescreateresponse) +- [ProjectRolesGetResponse](#projectrolesgetresponse) +- [ProjectRolesUpdateResponse](#projectrolesupdateresponse) +- [ProjectRolesListPermissionsResponse](#projectroleslistpermissionsresponse) +- [ProjectMembersListResponse](#projectmemberslistresponse) +- [AddResponse](#addresponse) +- [ProjectMembersGetResponse](#projectmembersgetresponse) +- [ProjectMembersUpdateResponse](#projectmembersupdateresponse) +- [InvitesListResponse](#inviteslistresponse) +- [ServiceAccountsListResponse](#serviceaccountslistresponse) +- [ServiceAccountsCreateResponse](#serviceaccountscreateresponse) +- [ServiceAccountsGetResponse](#serviceaccountsgetresponse) +- [ServiceAccountsUpdateResponse](#serviceaccountsupdateresponse) +- [GroupsListResponse](#groupslistresponse) +- [GroupsCreateResponse](#groupscreateresponse) +- [GroupsGetResponse](#groupsgetresponse) +- [GroupsUpdateResponse](#groupsupdateresponse) - [UpdateRequest](#updaterequest) - [DeleteRequest](#deleterequest) - [CreateRequest](#createrequest) +- [EnvironmentsCreateRequest](#environmentscreaterequest) +- [ConfigsCreateRequest](#configscreaterequest) +- [ConfigsUpdateRequest](#configsupdaterequest) +- [ConfigsDeleteRequest](#configsdeleterequest) - [RenameRequest](#renamerequest) +- [SecretsUpdateRequest](#secretsupdaterequest) +- [ServiceTokensCreateRequest](#servicetokenscreaterequest) +- [ServiceTokensDeleteRequest](#servicetokensdeleterequest) - [CloneRequest](#clonerequest) - [LockRequest](#lockrequest) - [UnlockRequest](#unlockrequest) - [IssueLeaseRequest](#issueleaserequest) - [RevokeLeaseRequest](#revokeleaserequest) - [UpdateNoteRequest](#updatenoterequest) +- [IntegrationsCreateRequest](#integrationscreaterequest) +- [IntegrationsUpdateRequest](#integrationsupdaterequest) +- [SyncsCreateRequest](#syncscreaterequest) +- [AddTrustedIpRequest](#addtrustediprequest) +- [DeleteTrustedIpRequest](#deletetrustediprequest) - [AddRequest](#addrequest) +- [ProjectMembersUpdateRequest](#projectmembersupdaterequest) +- [ServiceAccountsCreateRequest](#serviceaccountscreaterequest) +- [ServiceAccountsUpdateRequest](#serviceaccountsupdaterequest) +- [GroupsCreateRequest](#groupscreaterequest) +- [GroupsUpdateRequest](#groupsupdaterequest) - [AddMemberRequest](#addmemberrequest) ## Format @@ -42,6 +106,8 @@ A list of all models. ## Type +## GroupsType + ## GetResponse ## UpdateResponse @@ -50,14 +116,44 @@ A list of all models. ## CreateResponse +## EnvironmentsListResponse + +## EnvironmentsCreateResponse + +## ConfigsListResponse + +## ConfigsCreateResponse + +## ConfigsGetResponse + +## ConfigsUpdateResponse + ## DeleteResponse +## EnvironmentsGetResponse + ## RenameResponse +## SecretsListResponse + +## SecretsUpdateResponse + +## ConfigLogsListResponse + +## ConfigLogsGetResponse + +## ActivityLogsListResponse + ## RetrieveResponse +## SecretsGetResponse + ## RollbackResponse +## ServiceTokensListResponse + +## ServiceTokensCreateResponse + ## CloneResponse ## LockResponse @@ -74,20 +170,96 @@ A list of all models. ## UpdateNoteResponse +## IntegrationsListResponse + +## IntegrationsCreateResponse + +## IntegrationsGetResponse + +## IntegrationsUpdateResponse + +## IntegrationsDeleteResponse + +## SyncsCreateResponse + +## SyncsGetResponse + +## SyncsDeleteResponse + ## MeResponse -## AddResponse +## ListTrustedIpsResponse + +## AddTrustedIpResponse + +## WorkplaceRolesListResponse + +## WorkplaceRolesCreateResponse ## ListPermissionsResponse +## WorkplaceRolesGetResponse + +## WorkplaceRolesUpdateResponse + +## ProjectRolesListResponse + +## ProjectRolesCreateResponse + +## ProjectRolesGetResponse + +## ProjectRolesUpdateResponse + +## ProjectRolesListPermissionsResponse + +## ProjectMembersListResponse + +## AddResponse + +## ProjectMembersGetResponse + +## ProjectMembersUpdateResponse + +## InvitesListResponse + +## ServiceAccountsListResponse + +## ServiceAccountsCreateResponse + +## ServiceAccountsGetResponse + +## ServiceAccountsUpdateResponse + +## GroupsListResponse + +## GroupsCreateResponse + +## GroupsGetResponse + +## GroupsUpdateResponse + ## UpdateRequest ## DeleteRequest ## CreateRequest +## EnvironmentsCreateRequest + +## ConfigsCreateRequest + +## ConfigsUpdateRequest + +## ConfigsDeleteRequest + ## RenameRequest +## SecretsUpdateRequest + +## ServiceTokensCreateRequest + +## ServiceTokensDeleteRequest + ## CloneRequest ## LockRequest @@ -100,8 +272,28 @@ A list of all models. ## UpdateNoteRequest +## IntegrationsCreateRequest + +## IntegrationsUpdateRequest + +## SyncsCreateRequest + +## AddTrustedIpRequest + +## DeleteTrustedIpRequest + ## AddRequest +## ProjectMembersUpdateRequest + +## ServiceAccountsCreateRequest + +## ServiceAccountsUpdateRequest + +## GroupsCreateRequest + +## GroupsUpdateRequest + ## AddMemberRequest diff --git a/src/dopplersdk/models/RenameRequest.py b/src/dopplersdk/models/RenameRequest.py index cb58603..bd4612a 100644 --- a/src/dopplersdk/models/RenameRequest.py +++ b/src/dopplersdk/models/RenameRequest.py @@ -12,7 +12,5 @@ def __init__(self, name: str = None, slug: str = None, **kwargs): slug: str Desired slug """ - if name is not None: - self.name = name - if slug is not None: - self.slug = slug + self.name = name + self.slug = slug diff --git a/src/dopplersdk/models/RenameResponse.py b/src/dopplersdk/models/RenameResponse.py index 71e198a..57fda4d 100644 --- a/src/dopplersdk/models/RenameResponse.py +++ b/src/dopplersdk/models/RenameResponse.py @@ -21,16 +21,11 @@ def __init__( created_at: str project: str """ - if id is not None: - self.id = id - if name is not None: - self.name = name - if initial_fetch_at is not None: - self.initial_fetch_at = initial_fetch_at - if created_at is not None: - self.created_at = created_at - if project is not None: - self.project = project + self.id = id + self.name = name + self.initial_fetch_at = initial_fetch_at + self.created_at = created_at + self.project = project class RenameResponse(BaseModel): @@ -41,5 +36,4 @@ def __init__(self, environment: Environment = None, **kwargs): ---------- environment: Environment """ - if environment is not None: - self.environment = environment + self.environment = environment diff --git a/src/dopplersdk/models/RetrieveResponse.py b/src/dopplersdk/models/RetrieveResponse.py index a3d48cf..7a06039 100644 --- a/src/dopplersdk/models/RetrieveResponse.py +++ b/src/dopplersdk/models/RetrieveResponse.py @@ -18,12 +18,9 @@ def __init__( name: str profile_image_url: str """ - if email is not None: - self.email = email - if name is not None: - self.name = name - if profile_image_url is not None: - self.profile_image_url = profile_image_url + self.email = email + self.name = name + self.profile_image_url = profile_image_url class Log(BaseModel): @@ -52,22 +49,14 @@ def __init__( project: str user: User """ - if id is not None: - self.id = id - if text is not None: - self.text = text - if html is not None: - self.html = html - if created_at is not None: - self.created_at = created_at - if config is not None: - self.config = config - if environment is not None: - self.environment = environment - if project is not None: - self.project = project - if user is not None: - self.user = user + self.id = id + self.text = text + self.html = html + self.created_at = created_at + self.config = config + self.environment = environment + self.project = project + self.user = user class RetrieveResponse(BaseModel): @@ -78,5 +67,4 @@ def __init__(self, log: Log = None, **kwargs): ---------- log: Log """ - if log is not None: - self.log = log + self.log = log diff --git a/src/dopplersdk/models/RevokeLeaseResponse.py b/src/dopplersdk/models/RevokeLeaseResponse.py index 01f6e8f..289bf02 100644 --- a/src/dopplersdk/models/RevokeLeaseResponse.py +++ b/src/dopplersdk/models/RevokeLeaseResponse.py @@ -9,5 +9,4 @@ def __init__(self, success: bool = None, **kwargs): ---------- success: bool """ - if success is not None: - self.success = success + self.success = success diff --git a/src/dopplersdk/models/RollbackResponse.py b/src/dopplersdk/models/RollbackResponse.py index b8fcf18..5cb4b0e 100644 --- a/src/dopplersdk/models/RollbackResponse.py +++ b/src/dopplersdk/models/RollbackResponse.py @@ -11,10 +11,8 @@ def __init__(self, name: str = None, removed: str = None, **kwargs): name: str removed: str """ - if name is not None: - self.name = name - if removed is not None: - self.removed = removed + self.name = name + self.removed = removed class User(BaseModel): @@ -35,14 +33,10 @@ def __init__( username: str profile_image_url: str """ - if email is not None: - self.email = email - if name is not None: - self.name = name - if username is not None: - self.username = username - if profile_image_url is not None: - self.profile_image_url = profile_image_url + self.email = email + self.name = name + self.username = username + self.profile_image_url = profile_image_url class Log(BaseModel): @@ -75,26 +69,16 @@ def __init__( project: str user: User """ - if id is not None: - self.id = id - if text is not None: - self.text = text - if html is not None: - self.html = html - if diff is not None: - self.diff = diff - if rollback is not None: - self.rollback = rollback - if created_at is not None: - self.created_at = created_at - if config is not None: - self.config = config - if environment is not None: - self.environment = environment - if project is not None: - self.project = project - if user is not None: - self.user = user + self.id = id + self.text = text + self.html = html + self.diff = diff + self.rollback = rollback + self.created_at = created_at + self.config = config + self.environment = environment + self.project = project + self.user = user class RollbackResponse(BaseModel): @@ -105,5 +89,4 @@ def __init__(self, log: Log = None, **kwargs): ---------- log: Log """ - if log is not None: - self.log = log + self.log = log diff --git a/src/dopplersdk/models/SecretsGetResponse.py b/src/dopplersdk/models/SecretsGetResponse.py new file mode 100644 index 0000000..fae48e1 --- /dev/null +++ b/src/dopplersdk/models/SecretsGetResponse.py @@ -0,0 +1,31 @@ +from .base import BaseModel + + +class Value(BaseModel): + def __init__( + self, raw: str = None, computed: str = None, note: str = None, **kwargs + ): + """ + Initialize Value + Parameters: + ---------- + raw: str + computed: str + note: str + """ + self.raw = raw + self.computed = computed + self.note = note + + +class SecretsGetResponse(BaseModel): + def __init__(self, name: str = None, value: Value = None, **kwargs): + """ + Initialize SecretsGetResponse + Parameters: + ---------- + name: str + value: Value + """ + self.name = name + self.value = value diff --git a/src/dopplersdk/models/SecretsListResponse.py b/src/dopplersdk/models/SecretsListResponse.py new file mode 100644 index 0000000..c585b63 --- /dev/null +++ b/src/dopplersdk/models/SecretsListResponse.py @@ -0,0 +1,104 @@ +from .base import BaseModel + + +class Stripe(BaseModel): + def __init__( + self, raw: str = None, computed: str = None, note: str = None, **kwargs + ): + """ + Initialize Stripe + Parameters: + ---------- + raw: str + computed: str + note: str + """ + self.raw = raw + self.computed = computed + self.note = note + + +class Algolia(BaseModel): + def __init__( + self, raw: str = None, computed: str = None, note: str = None, **kwargs + ): + """ + Initialize Algolia + Parameters: + ---------- + raw: str + computed: str + note: str + """ + self.raw = raw + self.computed = computed + self.note = note + + +class Database(BaseModel): + def __init__( + self, raw: str = None, computed: str = None, note: str = None, **kwargs + ): + """ + Initialize Database + Parameters: + ---------- + raw: str + computed: str + note: str + """ + self.raw = raw + self.computed = computed + self.note = note + + +class User(BaseModel): + def __init__( + self, raw: str = None, computed: str = None, note: str = None, **kwargs + ): + """ + Initialize User + Parameters: + ---------- + raw: str + computed: str + note: str + """ + self.raw = raw + self.computed = computed + self.note = note + + +class Secrets(BaseModel): + def __init__( + self, + STRIPE: Stripe = None, + ALGOLIA: Algolia = None, + DATABASE: Database = None, + USER: User = None, + **kwargs, + ): + """ + Initialize Secrets + Parameters: + ---------- + STRIPE: Stripe + ALGOLIA: Algolia + DATABASE: Database + USER: User + """ + self.STRIPE = STRIPE + self.ALGOLIA = ALGOLIA + self.DATABASE = DATABASE + self.USER = USER + + +class SecretsListResponse(BaseModel): + def __init__(self, secrets: Secrets = None, **kwargs): + """ + Initialize SecretsListResponse + Parameters: + ---------- + secrets: Secrets + """ + self.secrets = secrets diff --git a/src/dopplersdk/models/SecretsUpdateRequest.py b/src/dopplersdk/models/SecretsUpdateRequest.py index 027fcd0..fd70d4a 100644 --- a/src/dopplersdk/models/SecretsUpdateRequest.py +++ b/src/dopplersdk/models/SecretsUpdateRequest.py @@ -18,10 +18,8 @@ def __init__( DATABASE: str """ self.STRIPE = STRIPE - if ALGOLIA is not None: - self.ALGOLIA = ALGOLIA - if DATABASE is not None: - self.DATABASE = DATABASE + self.ALGOLIA = ALGOLIA + self.DATABASE = DATABASE class SecretsUpdateRequest(BaseModel): diff --git a/src/dopplersdk/models/SecretsUpdateResponse.py b/src/dopplersdk/models/SecretsUpdateResponse.py new file mode 100644 index 0000000..b03f802 --- /dev/null +++ b/src/dopplersdk/models/SecretsUpdateResponse.py @@ -0,0 +1,84 @@ +from .base import BaseModel + + +class Stripe(BaseModel): + def __init__( + self, raw: str = None, computed: str = None, note: str = None, **kwargs + ): + """ + Initialize Stripe + Parameters: + ---------- + raw: str + computed: str + note: str + """ + self.raw = raw + self.computed = computed + self.note = note + + +class Algolia(BaseModel): + def __init__( + self, raw: str = None, computed: str = None, note: str = None, **kwargs + ): + """ + Initialize Algolia + Parameters: + ---------- + raw: str + computed: str + note: str + """ + self.raw = raw + self.computed = computed + self.note = note + + +class Database(BaseModel): + def __init__( + self, raw: str = None, computed: str = None, note: str = None, **kwargs + ): + """ + Initialize Database + Parameters: + ---------- + raw: str + computed: str + note: str + """ + self.raw = raw + self.computed = computed + self.note = note + + +class Secrets(BaseModel): + def __init__( + self, + STRIPE: Stripe = None, + ALGOLIA: Algolia = None, + DATABASE: Database = None, + **kwargs, + ): + """ + Initialize Secrets + Parameters: + ---------- + STRIPE: Stripe + ALGOLIA: Algolia + DATABASE: Database + """ + self.STRIPE = STRIPE + self.ALGOLIA = ALGOLIA + self.DATABASE = DATABASE + + +class SecretsUpdateResponse(BaseModel): + def __init__(self, secrets: Secrets = None, **kwargs): + """ + Initialize SecretsUpdateResponse + Parameters: + ---------- + secrets: Secrets + """ + self.secrets = secrets diff --git a/src/dopplersdk/models/ServiceAccountsCreateRequest.py b/src/dopplersdk/models/ServiceAccountsCreateRequest.py new file mode 100644 index 0000000..89f8f09 --- /dev/null +++ b/src/dopplersdk/models/ServiceAccountsCreateRequest.py @@ -0,0 +1,37 @@ +from .base import BaseModel +from typing import List + + +class WorkplaceRole(BaseModel): + """ + You may provide an identifier OR permissions, but not both + """ + + def __init__(self, identifier: str = None, permissions: List[str] = None, **kwargs): + """ + Initialize WorkplaceRole + Parameters: + ---------- + identifier: str + Identifier of an existing workplace role + permissions: list of WorkplaceRolePermissions + Workplace permissions to grant + """ + self.identifier = identifier + self.permissions = permissions + + +class ServiceAccountsCreateRequest(BaseModel): + def __init__( + self, name: str = None, workplace_role: WorkplaceRole = None, **kwargs + ): + """ + Initialize ServiceAccountsCreateRequest + Parameters: + ---------- + name: str + workplace_role: WorkplaceRole + You may provide an identifier OR permissions, but not both + """ + self.name = name + self.workplace_role = workplace_role diff --git a/src/dopplersdk/models/ServiceAccountsCreateResponse.py b/src/dopplersdk/models/ServiceAccountsCreateResponse.py new file mode 100644 index 0000000..350e89d --- /dev/null +++ b/src/dopplersdk/models/ServiceAccountsCreateResponse.py @@ -0,0 +1,67 @@ +from .base import BaseModel +from typing import List + + +class WorkplaceRole(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + is_inline_role: bool = None, + **kwargs, + ): + """ + Initialize WorkplaceRole + Parameters: + ---------- + name: str + permissions: list of WorkplaceRolePermissions + identifier: str + created_at: str + is_custom_role: bool + is_inline_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + self.is_inline_role = is_inline_role + + +class ServiceAccount(BaseModel): + def __init__( + self, + name: str = None, + slug: str = None, + created_at: str = None, + workplace_role: WorkplaceRole = None, + **kwargs, + ): + """ + Initialize ServiceAccount + Parameters: + ---------- + name: str + slug: str + created_at: str + workplace_role: WorkplaceRole + """ + self.name = name + self.slug = slug + self.created_at = created_at + self.workplace_role = workplace_role + + +class ServiceAccountsCreateResponse(BaseModel): + def __init__(self, service_account: ServiceAccount = None, **kwargs): + """ + Initialize ServiceAccountsCreateResponse + Parameters: + ---------- + service_account: ServiceAccount + """ + self.service_account = service_account diff --git a/src/dopplersdk/models/ServiceAccountsGetResponse.py b/src/dopplersdk/models/ServiceAccountsGetResponse.py new file mode 100644 index 0000000..89f1dc7 --- /dev/null +++ b/src/dopplersdk/models/ServiceAccountsGetResponse.py @@ -0,0 +1,67 @@ +from .base import BaseModel +from typing import List + + +class WorkplaceRole(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + is_inline_role: bool = None, + **kwargs, + ): + """ + Initialize WorkplaceRole + Parameters: + ---------- + name: str + permissions: list of WorkplaceRolePermissions + identifier: str + created_at: str + is_custom_role: bool + is_inline_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + self.is_inline_role = is_inline_role + + +class ServiceAccount(BaseModel): + def __init__( + self, + name: str = None, + slug: str = None, + created_at: str = None, + workplace_role: WorkplaceRole = None, + **kwargs, + ): + """ + Initialize ServiceAccount + Parameters: + ---------- + name: str + slug: str + created_at: str + workplace_role: WorkplaceRole + """ + self.name = name + self.slug = slug + self.created_at = created_at + self.workplace_role = workplace_role + + +class ServiceAccountsGetResponse(BaseModel): + def __init__(self, service_account: ServiceAccount = None, **kwargs): + """ + Initialize ServiceAccountsGetResponse + Parameters: + ---------- + service_account: ServiceAccount + """ + self.service_account = service_account diff --git a/src/dopplersdk/models/ServiceAccountsListResponse.py b/src/dopplersdk/models/ServiceAccountsListResponse.py new file mode 100644 index 0000000..bf5f1e3 --- /dev/null +++ b/src/dopplersdk/models/ServiceAccountsListResponse.py @@ -0,0 +1,71 @@ +from .base import BaseModel +from typing import List + + +class WorkplaceRole(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + is_inline_role: bool = None, + **kwargs, + ): + """ + Initialize WorkplaceRole + Parameters: + ---------- + name: str + permissions: list of WorkplaceRolePermissions + identifier: str + created_at: str + is_custom_role: bool + is_inline_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + self.is_inline_role = is_inline_role + + +class ServiceAccountsListResponseServiceAccounts(BaseModel): + def __init__( + self, + name: str = None, + slug: str = None, + created_at: str = None, + workplace_role: WorkplaceRole = None, + **kwargs, + ): + """ + Initialize ServiceAccountsListResponseServiceAccounts + Parameters: + ---------- + name: str + slug: str + created_at: str + workplace_role: WorkplaceRole + """ + self.name = name + self.slug = slug + self.created_at = created_at + self.workplace_role = workplace_role + + +class ServiceAccountsListResponse(BaseModel): + def __init__( + self, + service_accounts: List[ServiceAccountsListResponseServiceAccounts] = None, + **kwargs, + ): + """ + Initialize ServiceAccountsListResponse + Parameters: + ---------- + service_accounts: list of ServiceAccountsListResponseServiceAccounts + """ + self.service_accounts = service_accounts diff --git a/src/dopplersdk/models/ServiceAccountsUpdateRequest.py b/src/dopplersdk/models/ServiceAccountsUpdateRequest.py new file mode 100644 index 0000000..52714a5 --- /dev/null +++ b/src/dopplersdk/models/ServiceAccountsUpdateRequest.py @@ -0,0 +1,37 @@ +from .base import BaseModel +from typing import List + + +class WorkplaceRole(BaseModel): + """ + You may provide an identifier OR permissions, but not both + """ + + def __init__(self, identifier: str = None, permissions: List[str] = None, **kwargs): + """ + Initialize WorkplaceRole + Parameters: + ---------- + identifier: str + Identifier of an existing workplace role + permissions: list of WorkplaceRolePermissions + Workplace permissions to grant + """ + self.identifier = identifier + self.permissions = permissions + + +class ServiceAccountsUpdateRequest(BaseModel): + def __init__( + self, name: str = None, workplace_role: WorkplaceRole = None, **kwargs + ): + """ + Initialize ServiceAccountsUpdateRequest + Parameters: + ---------- + name: str + workplace_role: WorkplaceRole + You may provide an identifier OR permissions, but not both + """ + self.name = name + self.workplace_role = workplace_role diff --git a/src/dopplersdk/models/ServiceAccountsUpdateResponse.py b/src/dopplersdk/models/ServiceAccountsUpdateResponse.py new file mode 100644 index 0000000..5304dae --- /dev/null +++ b/src/dopplersdk/models/ServiceAccountsUpdateResponse.py @@ -0,0 +1,66 @@ +from .base import BaseModel + + +class WorkplaceRole(BaseModel): + def __init__( + self, + name: str = None, + permissions: list = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + is_inline_role: bool = None, + **kwargs, + ): + """ + Initialize WorkplaceRole + Parameters: + ---------- + name: str + permissions: list of objects + identifier: str + created_at: str + is_custom_role: bool + is_inline_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + self.is_inline_role = is_inline_role + + +class ServiceAccount(BaseModel): + def __init__( + self, + name: str = None, + slug: str = None, + created_at: str = None, + workplace_role: WorkplaceRole = None, + **kwargs, + ): + """ + Initialize ServiceAccount + Parameters: + ---------- + name: str + slug: str + created_at: str + workplace_role: WorkplaceRole + """ + self.name = name + self.slug = slug + self.created_at = created_at + self.workplace_role = workplace_role + + +class ServiceAccountsUpdateResponse(BaseModel): + def __init__(self, service_account: ServiceAccount = None, **kwargs): + """ + Initialize ServiceAccountsUpdateResponse + Parameters: + ---------- + service_account: ServiceAccount + """ + self.service_account = service_account diff --git a/src/dopplersdk/models/ServiceTokensCreateRequest.py b/src/dopplersdk/models/ServiceTokensCreateRequest.py index f84b410..1692c0b 100644 --- a/src/dopplersdk/models/ServiceTokensCreateRequest.py +++ b/src/dopplersdk/models/ServiceTokensCreateRequest.py @@ -42,7 +42,7 @@ def __init__( self.name = name self.config = config self.project = project - if expire_at is not None: - self.expire_at = expire_at - if access is not None: - self.access = self._enum_matching(access, Access.list(), "access") + self.expire_at = expire_at + self.access = ( + self._enum_matching(access, Access.list(), "access") if access else None + ) diff --git a/src/dopplersdk/models/ServiceTokensCreateResponse.py b/src/dopplersdk/models/ServiceTokensCreateResponse.py new file mode 100644 index 0000000..d95c2ec --- /dev/null +++ b/src/dopplersdk/models/ServiceTokensCreateResponse.py @@ -0,0 +1,41 @@ +from .base import BaseModel +from typing import Any + + +class ServiceTokensCreateResponse(BaseModel): + def __init__( + self, + name: str = None, + slug: str = None, + created_at: str = None, + key: str = None, + config: str = None, + environment: str = None, + project: str = None, + expires_at: Any = None, + access: str = None, + **kwargs, + ): + """ + Initialize ServiceTokensCreateResponse + Parameters: + ---------- + name: str + slug: str + created_at: str + key: str + config: str + environment: str + project: str + expires_at + access: str + """ + self.name = name + self.slug = slug + self.created_at = created_at + self.key = key + self.config = config + self.environment = environment + self.project = project + self.expires_at = expires_at + self.access = access diff --git a/src/dopplersdk/models/ServiceTokensDeleteRequest.py b/src/dopplersdk/models/ServiceTokensDeleteRequest.py index eaf8397..61805fc 100644 --- a/src/dopplersdk/models/ServiceTokensDeleteRequest.py +++ b/src/dopplersdk/models/ServiceTokensDeleteRequest.py @@ -20,7 +20,5 @@ def __init__( """ self.config = config self.project = project - if slug is not None: - self.slug = slug - if token is not None: - self.token = token + self.slug = slug + self.token = token diff --git a/src/dopplersdk/models/ServiceTokensListResponse.py b/src/dopplersdk/models/ServiceTokensListResponse.py new file mode 100644 index 0000000..1fd7d3c --- /dev/null +++ b/src/dopplersdk/models/ServiceTokensListResponse.py @@ -0,0 +1,47 @@ +from .base import BaseModel +from typing import List +from typing import Any + + +class ServiceTokensListResponseTokens(BaseModel): + def __init__( + self, + name: str = None, + slug: str = None, + created_at: str = None, + config: str = None, + environment: str = None, + project: str = None, + expires_at: Any = None, + **kwargs, + ): + """ + Initialize ServiceTokensListResponseTokens + Parameters: + ---------- + name: str + slug: str + created_at: str + config: str + environment: str + project: str + expires_at + """ + self.name = name + self.slug = slug + self.created_at = created_at + self.config = config + self.environment = environment + self.project = project + self.expires_at = expires_at + + +class ServiceTokensListResponse(BaseModel): + def __init__(self, tokens: List[ServiceTokensListResponseTokens] = None, **kwargs): + """ + Initialize ServiceTokensListResponse + Parameters: + ---------- + tokens: list of ServiceTokensListResponseTokens + """ + self.tokens = tokens diff --git a/src/dopplersdk/models/SyncsCreateRequest.py b/src/dopplersdk/models/SyncsCreateRequest.py index e1ae350..87bb962 100644 --- a/src/dopplersdk/models/SyncsCreateRequest.py +++ b/src/dopplersdk/models/SyncsCreateRequest.py @@ -1,14 +1,10 @@ from .base import BaseModel from enum import Enum - -class Data(BaseModel): - """ - Configuration data for the sync - """ - - def __init__(self, **kwargs): - pass +""" +Configuration data for the sync +""" +Data = dict class ImportOption(Enum): @@ -41,7 +37,8 @@ def __init__( """ self.data = data self.integration = integration - if import_option is not None: - self.import_option = self._enum_matching( - import_option, ImportOption.list(), "import_option" - ) + self.import_option = ( + self._enum_matching(import_option, ImportOption.list(), "import_option") + if import_option + else None + ) diff --git a/src/dopplersdk/models/SyncsCreateResponse.py b/src/dopplersdk/models/SyncsCreateResponse.py new file mode 100644 index 0000000..f873aa2 --- /dev/null +++ b/src/dopplersdk/models/SyncsCreateResponse.py @@ -0,0 +1,42 @@ +from .base import BaseModel + + +class Sync(BaseModel): + def __init__( + self, + slug: str = None, + integration: str = None, + project: str = None, + config: str = None, + enabled: bool = None, + lastSyncedAt: str = None, + **kwargs, + ): + """ + Initialize Sync + Parameters: + ---------- + slug: str + integration: str + project: str + config: str + enabled: bool + lastSyncedAt: str + """ + self.slug = slug + self.integration = integration + self.project = project + self.config = config + self.enabled = enabled + self.lastSyncedAt = lastSyncedAt + + +class SyncsCreateResponse(BaseModel): + def __init__(self, sync: Sync = None, **kwargs): + """ + Initialize SyncsCreateResponse + Parameters: + ---------- + sync: Sync + """ + self.sync = sync diff --git a/src/dopplersdk/models/SyncsDeleteResponse.py b/src/dopplersdk/models/SyncsDeleteResponse.py new file mode 100644 index 0000000..5d0fca7 --- /dev/null +++ b/src/dopplersdk/models/SyncsDeleteResponse.py @@ -0,0 +1 @@ +SyncsDeleteResponse = dict diff --git a/src/dopplersdk/models/SyncsGetResponse.py b/src/dopplersdk/models/SyncsGetResponse.py new file mode 100644 index 0000000..cfb1df1 --- /dev/null +++ b/src/dopplersdk/models/SyncsGetResponse.py @@ -0,0 +1,42 @@ +from .base import BaseModel + + +class Sync(BaseModel): + def __init__( + self, + slug: str = None, + integration: str = None, + project: str = None, + config: str = None, + enabled: bool = None, + lastSyncedAt: str = None, + **kwargs, + ): + """ + Initialize Sync + Parameters: + ---------- + slug: str + integration: str + project: str + config: str + enabled: bool + lastSyncedAt: str + """ + self.slug = slug + self.integration = integration + self.project = project + self.config = config + self.enabled = enabled + self.lastSyncedAt = lastSyncedAt + + +class SyncsGetResponse(BaseModel): + def __init__(self, sync: Sync = None, **kwargs): + """ + Initialize SyncsGetResponse + Parameters: + ---------- + sync: Sync + """ + self.sync = sync diff --git a/src/dopplersdk/models/Type.py b/src/dopplersdk/models/Type.py index d8ded0f..cf41a74 100644 --- a/src/dopplersdk/models/Type.py +++ b/src/dopplersdk/models/Type.py @@ -3,6 +3,9 @@ class Type(Enum): WORKPLACE_USER = "workplace_user" + GROUP = "group" + INVITE = "invite" + SERVICE_ACCOUNT = "service_account" def list(): return list(map(lambda x: x.value, Type._member_map_.values())) diff --git a/src/dopplersdk/models/UnlockResponse.py b/src/dopplersdk/models/UnlockResponse.py index f87e38d..5b58407 100644 --- a/src/dopplersdk/models/UnlockResponse.py +++ b/src/dopplersdk/models/UnlockResponse.py @@ -27,22 +27,14 @@ def __init__( environment: str project: str """ - if name is not None: - self.name = name - if root is not None: - self.root = root - if locked is not None: - self.locked = locked - if initial_fetch_at is not None: - self.initial_fetch_at = initial_fetch_at - if last_fetch_at is not None: - self.last_fetch_at = last_fetch_at - if created_at is not None: - self.created_at = created_at - if environment is not None: - self.environment = environment - if project is not None: - self.project = project + self.name = name + self.root = root + self.locked = locked + self.initial_fetch_at = initial_fetch_at + self.last_fetch_at = last_fetch_at + self.created_at = created_at + self.environment = environment + self.project = project class UnlockResponse(BaseModel): @@ -53,5 +45,4 @@ def __init__(self, config: Config = None, **kwargs): ---------- config: Config """ - if config is not None: - self.config = config + self.config = config diff --git a/src/dopplersdk/models/UpdateNoteResponse.py b/src/dopplersdk/models/UpdateNoteResponse.py index cd2485b..25ebe92 100644 --- a/src/dopplersdk/models/UpdateNoteResponse.py +++ b/src/dopplersdk/models/UpdateNoteResponse.py @@ -10,7 +10,5 @@ def __init__(self, secret: str = None, note: str = None, **kwargs): secret: str note: str """ - if secret is not None: - self.secret = secret - if note is not None: - self.note = note + self.secret = secret + self.note = note diff --git a/src/dopplersdk/models/UpdateRequest.py b/src/dopplersdk/models/UpdateRequest.py index 259fb5e..f8ea6f9 100644 --- a/src/dopplersdk/models/UpdateRequest.py +++ b/src/dopplersdk/models/UpdateRequest.py @@ -2,16 +2,18 @@ class UpdateRequest(BaseModel): - def __init__(self, name: str = None, default_project_role: str = None, **kwargs): + def __init__(self, name: str, project: str, description: str = None, **kwargs): """ Initialize UpdateRequest Parameters: ---------- name: str - default_project_role: str - Identifier of the project role + Name of the project. + project: str + Unique identifier for the project object. + description: str + Description of the project. """ - if name is not None: - self.name = name - if default_project_role is not None: - self.default_project_role = default_project_role + self.name = name + self.project = project + self.description = description diff --git a/src/dopplersdk/models/UpdateResponse.py b/src/dopplersdk/models/UpdateResponse.py index 11585a5..16b826c 100644 --- a/src/dopplersdk/models/UpdateResponse.py +++ b/src/dopplersdk/models/UpdateResponse.py @@ -1,107 +1,36 @@ from .base import BaseModel -from typing import List -class DefaultProjectRole(BaseModel): - def __init__(self, identifier: str = None, **kwargs): - """ - Initialize DefaultProjectRole - Parameters: - ---------- - identifier: str - """ - if identifier is not None: - self.identifier = identifier - - -class Role(BaseModel): - def __init__(self, identifier: str = None, **kwargs): - """ - Initialize Role - Parameters: - ---------- - identifier: str - """ - if identifier is not None: - self.identifier = identifier - - -class GroupProjects(BaseModel): - def __init__(self, name: str = None, slug: str = None, role: Role = None, **kwargs): - """ - Initialize GroupProjects - Parameters: - ---------- - name: str - slug: str - role: Role - """ - if name is not None: - self.name = name - if slug is not None: - self.slug = slug - if role is not None: - self.role = role - - -class GroupMembers(BaseModel): - def __init__(self, slug: str = None, type_: str = None, **kwargs): - """ - Initialize GroupMembers - Parameters: - ---------- - slug: str - type_: str - """ - if slug is not None: - self.slug = slug - if type_ is not None: - self.type_ = type_ - - -class Group(BaseModel): +class Project(BaseModel): def __init__( self, + id: str = None, name: str = None, - slug: str = None, + description: str = None, created_at: str = None, - default_project_role: DefaultProjectRole = None, - projects: List[GroupProjects] = None, - members: List[GroupMembers] = None, **kwargs, ): """ - Initialize Group + Initialize Project Parameters: ---------- + id: str name: str - slug: str + description: str created_at: str - default_project_role: DefaultProjectRole - projects: list of GroupProjects - members: list of GroupMembers """ - if name is not None: - self.name = name - if slug is not None: - self.slug = slug - if created_at is not None: - self.created_at = created_at - if default_project_role is not None: - self.default_project_role = default_project_role - if projects is not None: - self.projects = projects - if members is not None: - self.members = members + self.id = id + self.name = name + self.description = description + self.created_at = created_at class UpdateResponse(BaseModel): - def __init__(self, group: Group = None, **kwargs): + def __init__(self, project: Project = None, **kwargs): """ Initialize UpdateResponse Parameters: ---------- - group: Group + project: Project """ - if group is not None: - self.group = group + self.project = project diff --git a/src/dopplersdk/models/WorkplaceRolesCreateResponse.py b/src/dopplersdk/models/WorkplaceRolesCreateResponse.py new file mode 100644 index 0000000..7124cb3 --- /dev/null +++ b/src/dopplersdk/models/WorkplaceRolesCreateResponse.py @@ -0,0 +1,43 @@ +from .base import BaseModel +from typing import List + + +class Role(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + is_inline_role: bool = None, + **kwargs, + ): + """ + Initialize Role + Parameters: + ---------- + name: str + permissions: list of RolePermissions + identifier: str + created_at: str + is_custom_role: bool + is_inline_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + self.is_inline_role = is_inline_role + + +class WorkplaceRolesCreateResponse(BaseModel): + def __init__(self, role: Role = None, **kwargs): + """ + Initialize WorkplaceRolesCreateResponse + Parameters: + ---------- + role: Role + """ + self.role = role diff --git a/src/dopplersdk/models/WorkplaceRolesGetResponse.py b/src/dopplersdk/models/WorkplaceRolesGetResponse.py new file mode 100644 index 0000000..ae25048 --- /dev/null +++ b/src/dopplersdk/models/WorkplaceRolesGetResponse.py @@ -0,0 +1,43 @@ +from .base import BaseModel +from typing import List + + +class Role(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + is_inline_role: bool = None, + **kwargs, + ): + """ + Initialize Role + Parameters: + ---------- + name: str + permissions: list of RolePermissions + identifier: str + created_at: str + is_custom_role: bool + is_inline_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + self.is_inline_role = is_inline_role + + +class WorkplaceRolesGetResponse(BaseModel): + def __init__(self, role: Role = None, **kwargs): + """ + Initialize WorkplaceRolesGetResponse + Parameters: + ---------- + role: Role + """ + self.role = role diff --git a/src/dopplersdk/models/WorkplaceRolesListResponse.py b/src/dopplersdk/models/WorkplaceRolesListResponse.py new file mode 100644 index 0000000..908acc1 --- /dev/null +++ b/src/dopplersdk/models/WorkplaceRolesListResponse.py @@ -0,0 +1,43 @@ +from .base import BaseModel +from typing import List + + +class WorkplaceRolesListResponseRoles(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + is_inline_role: bool = None, + **kwargs, + ): + """ + Initialize WorkplaceRolesListResponseRoles + Parameters: + ---------- + name: str + permissions: list of WorkplaceRolesListResponseRolesPermissions + identifier: str + created_at: str + is_custom_role: bool + is_inline_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + self.is_inline_role = is_inline_role + + +class WorkplaceRolesListResponse(BaseModel): + def __init__(self, roles: List[WorkplaceRolesListResponseRoles] = None, **kwargs): + """ + Initialize WorkplaceRolesListResponse + Parameters: + ---------- + roles: list of WorkplaceRolesListResponseRoles + """ + self.roles = roles diff --git a/src/dopplersdk/models/WorkplaceRolesUpdateResponse.py b/src/dopplersdk/models/WorkplaceRolesUpdateResponse.py new file mode 100644 index 0000000..f79428c --- /dev/null +++ b/src/dopplersdk/models/WorkplaceRolesUpdateResponse.py @@ -0,0 +1,43 @@ +from .base import BaseModel +from typing import List + + +class Role(BaseModel): + def __init__( + self, + name: str = None, + permissions: List[str] = None, + identifier: str = None, + created_at: str = None, + is_custom_role: bool = None, + is_inline_role: bool = None, + **kwargs, + ): + """ + Initialize Role + Parameters: + ---------- + name: str + permissions: list of RolePermissions + identifier: str + created_at: str + is_custom_role: bool + is_inline_role: bool + """ + self.name = name + self.permissions = permissions + self.identifier = identifier + self.created_at = created_at + self.is_custom_role = is_custom_role + self.is_inline_role = is_inline_role + + +class WorkplaceRolesUpdateResponse(BaseModel): + def __init__(self, role: Role = None, **kwargs): + """ + Initialize WorkplaceRolesUpdateResponse + Parameters: + ---------- + role: Role + """ + self.role = role diff --git a/src/dopplersdk/models/__init__.py b/src/dopplersdk/models/__init__.py index d89b91a..6327722 100644 --- a/src/dopplersdk/models/__init__.py +++ b/src/dopplersdk/models/__init__.py @@ -1,14 +1,30 @@ from .Format import Format from .NameTransformer import NameTransformer from .Type import Type +from .GroupsType import GroupsType from .GetResponse import GetResponse from .UpdateResponse import UpdateResponse from .ListResponse import ListResponse from .CreateResponse import CreateResponse +from .EnvironmentsListResponse import EnvironmentsListResponse +from .EnvironmentsCreateResponse import EnvironmentsCreateResponse +from .ConfigsListResponse import ConfigsListResponse +from .ConfigsCreateResponse import ConfigsCreateResponse +from .ConfigsGetResponse import ConfigsGetResponse +from .ConfigsUpdateResponse import ConfigsUpdateResponse from .DeleteResponse import DeleteResponse +from .EnvironmentsGetResponse import EnvironmentsGetResponse from .RenameResponse import RenameResponse +from .SecretsListResponse import SecretsListResponse +from .SecretsUpdateResponse import SecretsUpdateResponse +from .ConfigLogsListResponse import ConfigLogsListResponse +from .ConfigLogsGetResponse import ConfigLogsGetResponse +from .ActivityLogsListResponse import ActivityLogsListResponse from .RetrieveResponse import RetrieveResponse +from .SecretsGetResponse import SecretsGetResponse from .RollbackResponse import RollbackResponse +from .ServiceTokensListResponse import ServiceTokensListResponse +from .ServiceTokensCreateResponse import ServiceTokensCreateResponse from .CloneResponse import CloneResponse from .LockResponse import LockResponse from .UnlockResponse import UnlockResponse @@ -17,18 +33,66 @@ from .RevokeLeaseResponse import RevokeLeaseResponse from .NamesResponse import NamesResponse from .UpdateNoteResponse import UpdateNoteResponse +from .IntegrationsListResponse import IntegrationsListResponse +from .IntegrationsCreateResponse import IntegrationsCreateResponse +from .IntegrationsGetResponse import IntegrationsGetResponse +from .IntegrationsUpdateResponse import IntegrationsUpdateResponse +from .IntegrationsDeleteResponse import IntegrationsDeleteResponse +from .SyncsCreateResponse import SyncsCreateResponse +from .SyncsGetResponse import SyncsGetResponse +from .SyncsDeleteResponse import SyncsDeleteResponse from .MeResponse import MeResponse -from .AddResponse import AddResponse +from .ListTrustedIpsResponse import ListTrustedIpsResponse +from .AddTrustedIpResponse import AddTrustedIpResponse +from .WorkplaceRolesListResponse import WorkplaceRolesListResponse +from .WorkplaceRolesCreateResponse import WorkplaceRolesCreateResponse from .ListPermissionsResponse import ListPermissionsResponse +from .WorkplaceRolesGetResponse import WorkplaceRolesGetResponse +from .WorkplaceRolesUpdateResponse import WorkplaceRolesUpdateResponse +from .ProjectRolesListResponse import ProjectRolesListResponse +from .ProjectRolesCreateResponse import ProjectRolesCreateResponse +from .ProjectRolesGetResponse import ProjectRolesGetResponse +from .ProjectRolesUpdateResponse import ProjectRolesUpdateResponse +from .ProjectRolesListPermissionsResponse import ProjectRolesListPermissionsResponse +from .ProjectMembersListResponse import ProjectMembersListResponse +from .AddResponse import AddResponse +from .ProjectMembersGetResponse import ProjectMembersGetResponse +from .ProjectMembersUpdateResponse import ProjectMembersUpdateResponse +from .InvitesListResponse import InvitesListResponse +from .ServiceAccountsListResponse import ServiceAccountsListResponse +from .ServiceAccountsCreateResponse import ServiceAccountsCreateResponse +from .ServiceAccountsGetResponse import ServiceAccountsGetResponse +from .ServiceAccountsUpdateResponse import ServiceAccountsUpdateResponse +from .GroupsListResponse import GroupsListResponse +from .GroupsCreateResponse import GroupsCreateResponse +from .GroupsGetResponse import GroupsGetResponse +from .GroupsUpdateResponse import GroupsUpdateResponse from .UpdateRequest import UpdateRequest from .DeleteRequest import DeleteRequest from .CreateRequest import CreateRequest +from .EnvironmentsCreateRequest import EnvironmentsCreateRequest +from .ConfigsCreateRequest import ConfigsCreateRequest +from .ConfigsUpdateRequest import ConfigsUpdateRequest +from .ConfigsDeleteRequest import ConfigsDeleteRequest from .RenameRequest import RenameRequest +from .SecretsUpdateRequest import SecretsUpdateRequest +from .ServiceTokensCreateRequest import ServiceTokensCreateRequest +from .ServiceTokensDeleteRequest import ServiceTokensDeleteRequest from .CloneRequest import CloneRequest from .LockRequest import LockRequest from .UnlockRequest import UnlockRequest from .IssueLeaseRequest import IssueLeaseRequest from .RevokeLeaseRequest import RevokeLeaseRequest from .UpdateNoteRequest import UpdateNoteRequest +from .IntegrationsCreateRequest import IntegrationsCreateRequest +from .IntegrationsUpdateRequest import IntegrationsUpdateRequest +from .SyncsCreateRequest import SyncsCreateRequest +from .AddTrustedIpRequest import AddTrustedIpRequest +from .DeleteTrustedIpRequest import DeleteTrustedIpRequest from .AddRequest import AddRequest +from .ProjectMembersUpdateRequest import ProjectMembersUpdateRequest +from .ServiceAccountsCreateRequest import ServiceAccountsCreateRequest +from .ServiceAccountsUpdateRequest import ServiceAccountsUpdateRequest +from .GroupsCreateRequest import GroupsCreateRequest +from .GroupsUpdateRequest import GroupsUpdateRequest from .AddMemberRequest import AddMemberRequest diff --git a/src/dopplersdk/net/query_serializer.py b/src/dopplersdk/net/query_serializer.py new file mode 100644 index 0000000..0d9668e --- /dev/null +++ b/src/dopplersdk/net/query_serializer.py @@ -0,0 +1,73 @@ +from typing import Any, Dict, List + +explode = bool + + +def simple(value: Any, explode: bool) -> str: + # Check if the value is a list + if isinstance(value, list): + return ",".join(value) if explode else "".join(value) + + if isinstance(value, dict): + if explode: + # Serialize object with exploded format: "key=value,key2=value2" + return ",".join([f"{k}={v}" for k, v in value.items()]) + else: + # Serialize object with non-exploded format: "key,value,key2,value2" + return ",".join( + [str(item) for sublist in value.items() for item in sublist] + ) + + return str(value) + + +def form(parameter_name: str, parameter_value: Any, explode: bool) -> str: + if isinstance(parameter_value, list): + return ( + "&".join([f"{parameter_name}={v}" for v in parameter_value]) + if explode + else f"{parameter_name}=" + ",".join([str(v) for v in parameter_value]) + ) + + if isinstance(parameter_value, dict): + if explode: + # Serialize object with exploded format: "key1=value1&key2=value2" + return "&".join([f"{k}={v}" for k, v in parameter_value.items()]) + else: + # Serialize object with non-exploded format: "key=key1,value1,key2,value2" + return f"{parameter_name}=" + ",".join( + [str(item) for sublist in parameter_value.items() for item in sublist] + ) + + return f"{parameter_name}=" + str(parameter_value) + + +style_methods = { + "simple": simple, + "form": form, +} + + +def serialize_query(parameter_style, explode, key: str, parameter_value: Any) -> str: + method = style_methods.get(parameter_style) + return method(key, parameter_value, explode) if method else "" + + +def serialize_header(explode: bool, parameter_value: Any): + if not style_methods.get("simple"): + return "" + return style_methods["simple"](parameter_value, explode) + + +def serialize_path( + parameter_style, explode: bool, parameter_value: Any, parameter_key=None +): + method = style_methods.get(parameter_style) + if not method: + return "" + + # The `simple` and `label` styles do not require a `parameter_key` + if not parameter_key: + return method(parameter_value, explode) + else: + return method(parameter_key, parameter_value, explode) diff --git a/src/dopplersdk/sdk.py b/src/dopplersdk/sdk.py index 32964e9..9c781e4 100644 --- a/src/dopplersdk/sdk.py +++ b/src/dopplersdk/sdk.py @@ -17,7 +17,6 @@ from .services.dynamic_secrets import DynamicSecrets from .services.integrations import Integrations from .services.syncs import Syncs -from .services.trusted_ips import TrustedIps from .services.workplace_roles import WorkplaceRoles from .services.project_roles import ProjectRoles from .services.project_members import ProjectMembers @@ -43,7 +42,6 @@ class DopplerSDK: dynamic_secrets : DynamicSecrets integrations : Integrations syncs : Syncs - trusted_ips : TrustedIps workplace_roles : WorkplaceRoles project_roles : ProjectRoles project_members : ProjectMembers @@ -53,42 +51,43 @@ class DopplerSDK: Methods ------- - set_bearer_token(bearer_token) - Set the bearer token + set_url(url: str) + Sets the end URL + set_access_token(access_token) + Set the access token """ - def __init__(self, bearer_token="", environment=Environment.DEFAULT) -> None: + def __init__(self, access_token="", environment=Environment.DEFAULT) -> None: """ Initializes the DopplerSDK SDK class. Parameters ---------- environment: str The environment that the SDK is accessing - bearer_token : str - The bearer token + access_token : str + The access token """ - self.projects = Projects(bearer_token) - self.environments = Environments(bearer_token) - self.configs = Configs(bearer_token) - self.secrets = Secrets(bearer_token) - self.config_logs = ConfigLogs(bearer_token) - self.v_3 = V3(bearer_token) - self.activity_logs = ActivityLogs(bearer_token) - self.service_tokens = ServiceTokens(bearer_token) - self.dynamic_secrets = DynamicSecrets(bearer_token) - self.integrations = Integrations(bearer_token) - self.syncs = Syncs(bearer_token) - self.trusted_ips = TrustedIps(bearer_token) - self.workplace_roles = WorkplaceRoles(bearer_token) - self.project_roles = ProjectRoles(bearer_token) - self.project_members = ProjectMembers(bearer_token) - self.invites = Invites(bearer_token) - self.service_accounts = ServiceAccounts(bearer_token) - self.groups = Groups(bearer_token) + self.projects = Projects(access_token) + self.environments = Environments(access_token) + self.configs = Configs(access_token) + self.secrets = Secrets(access_token) + self.config_logs = ConfigLogs(access_token) + self.v_3 = V3(access_token) + self.activity_logs = ActivityLogs(access_token) + self.service_tokens = ServiceTokens(access_token) + self.dynamic_secrets = DynamicSecrets(access_token) + self.integrations = Integrations(access_token) + self.syncs = Syncs(access_token) + self.workplace_roles = WorkplaceRoles(access_token) + self.project_roles = ProjectRoles(access_token) + self.project_members = ProjectMembers(access_token) + self.invites = Invites(access_token) + self.service_accounts = ServiceAccounts(access_token) + self.groups = Groups(access_token) - self.__set_url(environment.value) + self.set_url(environment.value) - def __set_url(self, url: str) -> None: + def set_url(self, url: str) -> None: """ Sets the end URL @@ -108,7 +107,6 @@ def __set_url(self, url: str) -> None: self.dynamic_secrets.set_url(url) self.integrations.set_url(url) self.syncs.set_url(url) - self.trusted_ips.set_url(url) self.workplace_roles.set_url(url) self.project_roles.set_url(url) self.project_members.set_url(url) @@ -116,30 +114,29 @@ def __set_url(self, url: str) -> None: self.service_accounts.set_url(url) self.groups.set_url(url) - def set_bearer_token(self, token: str) -> None: + def set_access_token(self, token: str) -> None: """ - Sets bearer token key + Sets auth token key Parameters ---------- token: string - Bearer token value + Auth token value """ - self.projects.set_bearer_token(token) - self.environments.set_bearer_token(token) - self.configs.set_bearer_token(token) - self.secrets.set_bearer_token(token) - self.config_logs.set_bearer_token(token) - self.v_3.set_bearer_token(token) - self.activity_logs.set_bearer_token(token) - self.service_tokens.set_bearer_token(token) - self.dynamic_secrets.set_bearer_token(token) - self.integrations.set_bearer_token(token) - self.syncs.set_bearer_token(token) - self.trusted_ips.set_bearer_token(token) - self.workplace_roles.set_bearer_token(token) - self.project_roles.set_bearer_token(token) - self.project_members.set_bearer_token(token) - self.invites.set_bearer_token(token) - self.service_accounts.set_bearer_token(token) - self.groups.set_bearer_token(token) + self.projects.set_access_token(token) + self.environments.set_access_token(token) + self.configs.set_access_token(token) + self.secrets.set_access_token(token) + self.config_logs.set_access_token(token) + self.v_3.set_access_token(token) + self.activity_logs.set_access_token(token) + self.service_tokens.set_access_token(token) + self.dynamic_secrets.set_access_token(token) + self.integrations.set_access_token(token) + self.syncs.set_access_token(token) + self.workplace_roles.set_access_token(token) + self.project_roles.set_access_token(token) + self.project_members.set_access_token(token) + self.invites.set_access_token(token) + self.service_accounts.set_access_token(token) + self.groups.set_access_token(token) diff --git a/src/dopplersdk/services/README.md b/src/dopplersdk/services/README.md index 71441de..f2e2556 100644 --- a/src/dopplersdk/services/README.md +++ b/src/dopplersdk/services/README.md @@ -24,8 +24,6 @@ A list of all services and services methods. - [Syncs](#syncs) - - [TrustedIps](#trustedips) - - [WorkplaceRoles](#workplaceroles) - [ProjectRoles](#projectroles) @@ -74,6 +72,9 @@ A list of all services and services methods. | [clone](#clone) | Clone | | [lock](#lock) | Lock | | [unlock](#unlock) | Unlock | +| [add_trusted_ip](#add_trusted_ip) | Add | +| [list_trusted_ips](#list_trusted_ips) | List | +| [delete_trusted_ip](#delete_trusted_ip) | Delete | ## Secrets @@ -150,15 +151,6 @@ A list of all services and services methods. | [delete](#delete) | Delete | -## TrustedIps - -| Method | Description| -| :-------- | :----------| -| [add](#add) | Add | -| [list](#list) | List | -| [delete](#delete) | Delete | - - ## WorkplaceRoles | Method | Description| @@ -248,12 +240,13 @@ Update ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'description': 'PROJECT_DESCRIPTION', + 'name': 'PROJECT_NEW_NAME', + 'project': 'PROJECT_NAME' } results = sdk.projects.update(request_input = request_body) @@ -279,9 +272,9 @@ Retrieve ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.projects.get(project = 'PROJECT_NAME') pprint(vars(results)) @@ -306,10 +299,10 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -request_body = {'ip': 'ip'} +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +request_body = {'project': 'PROJECT_NAME'} results = sdk.projects.delete(request_input = request_body) pprint(vars(results)) @@ -334,12 +327,12 @@ Create ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'description': 'PROJECT_DESCRIPTION', + 'name': 'PROJECT_NAME' } results = sdk.projects.create(request_input = request_body) @@ -366,9 +359,9 @@ List ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.projects.list( page = 1, per_page = 20 @@ -388,22 +381,22 @@ Create | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| | project | str | Required | The project's name | -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [EnvironmentsCreateRequest](/src/dopplersdk/models/README.md#environmentscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[EnvironmentsCreateResponse](/src/dopplersdk/models/README.md#environmentscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'name': 'name', + 'slug': 'slug' } results = sdk.environments.create( request_input = request_body, @@ -426,15 +419,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[EnvironmentsListResponse](/src/dopplersdk/models/README.md#environmentslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.environments.list(project = 'project') pprint(vars(results)) @@ -454,15 +447,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[EnvironmentsGetResponse](/src/dopplersdk/models/README.md#environmentsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.environments.get( project = 'project', environment = 'environment' @@ -491,9 +484,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.environments.delete( project = 'project', environment = 'environment' @@ -523,9 +516,9 @@ Rename ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'name': 'name', 'slug': 'slug' @@ -549,22 +542,23 @@ Create **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [ConfigsCreateRequest](/src/dopplersdk/models/README.md#configscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[ConfigsCreateResponse](/src/dopplersdk/models/README.md#configscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'environment': 'ENVIRONMENT_ID', + 'name': 'CONFIG_NAME', + 'project': 'PROJECT_NAME' } results = sdk.configs.create(request_input = request_body) @@ -587,15 +581,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ConfigsListResponse](/src/dopplersdk/models/README.md#configslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.configs.list( project = 'project', environment = 'Environment slug', @@ -615,22 +609,23 @@ Update **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [ConfigsUpdateRequest](/src/dopplersdk/models/README.md#configsupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[ConfigsUpdateResponse](/src/dopplersdk/models/README.md#configsupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'config': 'CONFIG_NAME', + 'name': 'CONFIG_NEW_NAME', + 'project': 'PROJECT_NAME' } results = sdk.configs.update(request_input = request_body) @@ -651,15 +646,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[ConfigsGetResponse](/src/dopplersdk/models/README.md#configsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.configs.get( project = 'PROJECT_NAME', config = 'CONFIG_NAME' @@ -677,7 +672,7 @@ Delete **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [DeleteRequest](/src/dopplersdk/models/README.md#deleterequest) | Optional | Request body. | +| request_input | [ConfigsDeleteRequest](/src/dopplersdk/models/README.md#configsdeleterequest) | Optional | Request body. | **Return Type** @@ -687,10 +682,13 @@ Delete ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -request_body = {'ip': 'ip'} +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +request_body = { + 'config': 'CONFIG_NAME', + 'project': 'PROJECT_NAME' +} results = sdk.configs.delete(request_input = request_body) pprint(vars(results)) @@ -715,9 +713,9 @@ Clone ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'CONFIG_NAME', 'name': 'NEW_CONFIG_NAME', @@ -747,9 +745,9 @@ Lock ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'CONFIG_NAME', 'project': 'PROJECT_NAME' @@ -778,9 +776,9 @@ Unlock ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'CONFIG_NAME', 'project': 'PROJECT_NAME' @@ -791,6 +789,105 @@ pprint(vars(results)) ``` +### **add_trusted_ip** +Add +- HTTP Method: POST +- Endpoint: /v3/configs/config/trusted_ips + +**Parameters** +| Name | Type| Required | Description | +| :-------- | :----------| :----------| :----------| +| project | str | Required | | +| config | str | Required | | +| request_input | [AddTrustedIpRequest](/src/dopplersdk/models/README.md#addtrustediprequest) | Optional | Request body. | + +**Return Type** + +[AddTrustedIpResponse](/src/dopplersdk/models/README.md#addtrustedipresponse) + +**Example Usage Code Snippet** +```Python +from pprint import pprint +from dopplersdk import DopplerSDK +DOPPLERSDK_ACCESS_TOKEN = '' +sdk = DopplerSDK() +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +request_body = {'ip': 'ip'} +results = sdk.configs.add_trusted_ip( + request_input = request_body, + project = 'project', + config = 'config' +) + +pprint(vars(results)) + +``` + +### **list_trusted_ips** +List +- HTTP Method: GET +- Endpoint: /v3/configs/config/trusted_ips + +**Parameters** +| Name | Type| Required | Description | +| :-------- | :----------| :----------| :----------| +| project | str | Required | | +| config | str | Required | | + +**Return Type** + +[ListTrustedIpsResponse](/src/dopplersdk/models/README.md#listtrustedipsresponse) + +**Example Usage Code Snippet** +```Python +from pprint import pprint +from dopplersdk import DopplerSDK +DOPPLERSDK_ACCESS_TOKEN = '' +sdk = DopplerSDK() +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +results = sdk.configs.list_trusted_ips( + project = 'project', + config = 'config' +) + +pprint(vars(results)) + +``` + +### **delete_trusted_ip** +Delete +- HTTP Method: DELETE +- Endpoint: /v3/configs/config/trusted_ips + +**Parameters** +| Name | Type| Required | Description | +| :-------- | :----------| :----------| :----------| +| project | str | Required | | +| config | str | Required | | +| request_input | [DeleteTrustedIpRequest](/src/dopplersdk/models/README.md#deletetrustediprequest) | Optional | Request body. | + +**Return Type** + +Returns a dict object. + +**Example Usage Code Snippet** +```Python +from pprint import pprint +from dopplersdk import DopplerSDK +DOPPLERSDK_ACCESS_TOKEN = '' +sdk = DopplerSDK() +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +request_body = {'ip': 'ip'} +results = sdk.configs.delete_trusted_ip( + request_input = request_body, + project = 'project', + config = 'config' +) + +pprint(vars(results)) + +``` + ### **update** Update @@ -800,22 +897,23 @@ Update **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [SecretsUpdateRequest](/src/dopplersdk/models/README.md#secretsupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[SecretsUpdateResponse](/src/dopplersdk/models/README.md#secretsupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'config': 'CONFIG_NAME', + 'project': 'PROJECT_NAME', + 'secrets': {"ALGOLIA":"N9TOPUCTO","DATABASE":"${USER}@aws.dynamodb.com:9876","STRIPE":"sk_test_9YxLnoLDdvOPn2dfjBVPB"} } results = sdk.secrets.update(request_input = request_body) @@ -841,21 +939,21 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[SecretsListResponse](/src/dopplersdk/models/README.md#secretslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.secrets.list( project = 'PROJECT_NAME', config = 'CONFIG_NAME', accepts = 'application/json', include_dynamic_secrets = True, - dynamic_secrets_ttl_sec = 45202611, + dynamic_secrets_ttl_sec = 12719258, secrets = 'secrets', include_managed_secrets = True ) @@ -878,15 +976,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[SecretsGetResponse](/src/dopplersdk/models/README.md#secretsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.secrets.get( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -917,9 +1015,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.secrets.delete( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -953,14 +1051,14 @@ Download ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.secrets.download( project = 'project', config = 'config', format = 'json', - name_transformer = 'camel', + name_transformer = 'upper-camel', include_dynamic_secrets = True, dynamic_secrets_ttl_sec = 1800 ) @@ -990,9 +1088,9 @@ List Names ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.secrets.names( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -1022,9 +1120,9 @@ Update Note ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'CONFIG_NAME', 'note': 'note', @@ -1053,15 +1151,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ConfigLogsListResponse](/src/dopplersdk/models/README.md#configlogslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.config_logs.list( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -1087,15 +1185,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[ConfigLogsGetResponse](/src/dopplersdk/models/README.md#configlogsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.config_logs.get( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -1126,9 +1224,9 @@ Rollback ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.config_logs.rollback( project = 'PROJECT_NAME', config = 'CONFIG_NAME', @@ -1157,9 +1255,9 @@ This method has no parameters. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.v_3.me() pprint(vars(results)) @@ -1180,15 +1278,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ActivityLogsListResponse](/src/dopplersdk/models/README.md#activitylogslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.activity_logs.list( page = '1', per_page = 20 @@ -1216,9 +1314,9 @@ Retrieve ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.activity_logs.retrieve(log = 'LOG_ID') pprint(vars(results)) @@ -1234,22 +1332,25 @@ Create **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [ServiceTokensCreateRequest](/src/dopplersdk/models/README.md#servicetokenscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[ServiceTokensCreateResponse](/src/dopplersdk/models/README.md#servicetokenscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'access': 'read', + 'config': 'CONFIG_NAME', + 'expire_at': '1899-01-16T08:37:05.0Z', + 'name': 'TOKEN_NAME', + 'project': 'PROJECT_NAME' } results = sdk.service_tokens.create(request_input = request_body) @@ -1270,15 +1371,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ServiceTokensListResponse](/src/dopplersdk/models/README.md#servicetokenslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.service_tokens.list( project = 'PROJECT_NAME', config = 'CONFIG_NAME' @@ -1296,7 +1397,7 @@ Delete **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [DeleteRequest](/src/dopplersdk/models/README.md#deleterequest) | Optional | Request body. | +| request_input | [ServiceTokensDeleteRequest](/src/dopplersdk/models/README.md#servicetokensdeleterequest) | Optional | Request body. | **Return Type** @@ -1306,10 +1407,15 @@ Delete ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -request_body = {'ip': 'ip'} +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) +request_body = { + 'config': 'CONFIG_NAME', + 'project': 'PROJECT_NAME', + 'slug': 'TOKEN_SLUG', + 'token': 'TOKEN_VALUE' +} results = sdk.service_tokens.delete(request_input = request_body) pprint(vars(results)) @@ -1335,14 +1441,14 @@ Issue Lease ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'config', 'dynamic_secret': 'dynamic_secret', 'project': 'project', - 'ttl_sec': 96157308 + 'ttl_sec': 89517057 } results = sdk.dynamic_secrets.issue_lease(request_input = request_body) @@ -1368,9 +1474,9 @@ Revoke Lease ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'config': 'config', 'dynamic_secret': 'dynamic_secret', @@ -1392,22 +1498,23 @@ Create **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [IntegrationsCreateRequest](/src/dopplersdk/models/README.md#integrationscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[IntegrationsCreateResponse](/src/dopplersdk/models/README.md#integrationscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'data': {}, + 'name': 'name', + 'type_': 'type' } results = sdk.integrations.create(request_input = request_body) @@ -1426,15 +1533,15 @@ This method has no parameters. **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[IntegrationsListResponse](/src/dopplersdk/models/README.md#integrationslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.integrations.list() pprint(vars(results)) @@ -1453,15 +1560,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[IntegrationsGetResponse](/src/dopplersdk/models/README.md#integrationsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.integrations.get(integration = 'integration') pprint(vars(results)) @@ -1480,15 +1587,15 @@ Delete **Return Type** -[DeleteResponse](/src/dopplersdk/models/README.md#deleteresponse) +[IntegrationsDeleteResponse](/src/dopplersdk/models/README.md#integrationsdeleteresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.integrations.delete(integration = 'integration') pprint(vars(results)) @@ -1504,21 +1611,21 @@ Update | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| | integration | str | Required | The slug of the integration to update | -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [IntegrationsUpdateRequest](/src/dopplersdk/models/README.md#integrationsupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[IntegrationsUpdateResponse](/src/dopplersdk/models/README.md#integrationsupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', + 'data': 'data', 'name': 'name' } results = sdk.integrations.update( @@ -1541,22 +1648,23 @@ Create | :-------- | :----------| :----------| :----------| | project | str | Required | The project slug | | config | str | Required | The config slug | -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [SyncsCreateRequest](/src/dopplersdk/models/README.md#syncscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[SyncsCreateResponse](/src/dopplersdk/models/README.md#syncscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'data': {}, + 'import_option': 'none', + 'integration': 'integration' } results = sdk.syncs.create( request_input = request_body, @@ -1582,15 +1690,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[SyncsGetResponse](/src/dopplersdk/models/README.md#syncsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.syncs.get( project = 'project', config = 'config', @@ -1616,15 +1724,15 @@ Delete **Return Type** -[DeleteResponse](/src/dopplersdk/models/README.md#deleteresponse) +[SyncsDeleteResponse](/src/dopplersdk/models/README.md#syncsdeleteresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.syncs.delete( project = 'project', config = 'config', @@ -1637,111 +1745,6 @@ pprint(vars(results)) ``` -### **add** -Add -- HTTP Method: POST -- Endpoint: /v3/configs/config/trusted_ips - -**Parameters** -| Name | Type| Required | Description | -| :-------- | :----------| :----------| :----------| -| project | str | Required | | -| config | str | Required | | -| request_input | [AddRequest](/src/dopplersdk/models/README.md#addrequest) | Optional | Request body. | - -**Return Type** - -[AddResponse](/src/dopplersdk/models/README.md#addresponse) - -**Example Usage Code Snippet** -```Python -from pprint import pprint -from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' -sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -request_body = { - 'environments': ["reprehenderit dolore","incididunt voluptate sed labore dolore"], - 'role': 'role', - 'slug': 'slug', - 'type_': 'group' -} -results = sdk.trusted_ips.add( - request_input = request_body, - project = 'project', - config = 'config' -) - -pprint(vars(results)) - -``` - -### **list** -List -- HTTP Method: GET -- Endpoint: /v3/configs/config/trusted_ips - -**Parameters** -| Name | Type| Required | Description | -| :-------- | :----------| :----------| :----------| -| project | str | Required | | -| config | str | Required | | - -**Return Type** - -[ListResponse](/src/dopplersdk/models/README.md#listresponse) - -**Example Usage Code Snippet** -```Python -from pprint import pprint -from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' -sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -results = sdk.trusted_ips.list( - project = 'project', - config = 'config' -) - -pprint(vars(results)) - -``` - -### **delete** -Delete -- HTTP Method: DELETE -- Endpoint: /v3/configs/config/trusted_ips - -**Parameters** -| Name | Type| Required | Description | -| :-------- | :----------| :----------| :----------| -| project | str | Required | | -| config | str | Required | | -| request_input | [DeleteRequest](/src/dopplersdk/models/README.md#deleterequest) | Optional | Request body. | - -**Return Type** - -Returns a dict object. - -**Example Usage Code Snippet** -```Python -from pprint import pprint -from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' -sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) -request_body = {'ip': 'ip'} -results = sdk.trusted_ips.delete( - request_input = request_body, - project = 'project', - config = 'config' -) - -pprint(vars(results)) - -``` - - ### **create** Create - HTTP Method: POST @@ -1753,15 +1756,15 @@ This method has no parameters. **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[WorkplaceRolesCreateResponse](/src/dopplersdk/models/README.md#workplacerolescreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.create() pprint(vars(results)) @@ -1779,15 +1782,15 @@ This method has no parameters. **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[WorkplaceRolesListResponse](/src/dopplersdk/models/README.md#workplaceroleslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.list() pprint(vars(results)) @@ -1811,9 +1814,9 @@ This method has no parameters. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.list_permissions() pprint(vars(results)) @@ -1832,15 +1835,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[WorkplaceRolesGetResponse](/src/dopplersdk/models/README.md#workplacerolesgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.get(role = 'role') pprint(vars(results)) @@ -1859,15 +1862,15 @@ Update **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[WorkplaceRolesUpdateResponse](/src/dopplersdk/models/README.md#workplacerolesupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.update(role = 'role') pprint(vars(results)) @@ -1892,9 +1895,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.workplace_roles.delete(role = 'role') pprint(vars(results)) @@ -1913,15 +1916,15 @@ This method has no parameters. **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[ProjectRolesCreateResponse](/src/dopplersdk/models/README.md#projectrolescreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.create() pprint(vars(results)) @@ -1939,15 +1942,15 @@ This method has no parameters. **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ProjectRolesListResponse](/src/dopplersdk/models/README.md#projectroleslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.list() pprint(vars(results)) @@ -1966,15 +1969,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[ProjectRolesGetResponse](/src/dopplersdk/models/README.md#projectrolesgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.get(role = 'role') pprint(vars(results)) @@ -1993,15 +1996,15 @@ Update **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[ProjectRolesUpdateResponse](/src/dopplersdk/models/README.md#projectrolesupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.update(role = 'role') pprint(vars(results)) @@ -2026,9 +2029,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.delete(role = 'role') pprint(vars(results)) @@ -2046,15 +2049,15 @@ This method has no parameters. **Return Type** -[ListPermissionsResponse](/src/dopplersdk/models/README.md#listpermissionsresponse) +[ProjectRolesListPermissionsResponse](/src/dopplersdk/models/README.md#projectroleslistpermissionsresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_roles.list_permissions() pprint(vars(results)) @@ -2081,11 +2084,11 @@ Add ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'environments': ["officia","adipisicing sit aliqua occaecat"], + 'environments': ["incididunt dolor nulla dolore in","adipisicing veniam irure"], 'role': 'role', 'slug': 'slug', 'type_': 'group' @@ -2113,15 +2116,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ProjectMembersListResponse](/src/dopplersdk/models/README.md#projectmemberslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_members.list( project = 'project', page = 1, @@ -2146,18 +2149,18 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[ProjectMembersGetResponse](/src/dopplersdk/models/README.md#projectmembersgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_members.get( project = 'project', - type = 'workplace_user', + type = 'service_account', slug = 'slug' ) @@ -2176,22 +2179,22 @@ Update | type | [Type](/src/dopplersdk/models/README.md#type) | Required | | | slug | str | Required | Member's slug | | project | str | Required | Project slug | -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [ProjectMembersUpdateRequest](/src/dopplersdk/models/README.md#projectmembersupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[ProjectMembersUpdateResponse](/src/dopplersdk/models/README.md#projectmembersupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'environments': ["amet Duis incididunt Lorem","esse Excepteur"], + 'role': 'role' } results = sdk.project_members.update( request_input = request_body, @@ -2224,11 +2227,11 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.project_members.delete( - type = 'workplace_user', + type = 'group', slug = 'slug', project = 'project' ) @@ -2251,15 +2254,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[InvitesListResponse](/src/dopplersdk/models/README.md#inviteslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.invites.list( page = 1, per_page = 20 @@ -2278,22 +2281,22 @@ Create **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [ServiceAccountsCreateRequest](/src/dopplersdk/models/README.md#serviceaccountscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[ServiceAccountsCreateResponse](/src/dopplersdk/models/README.md#serviceaccountscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'name': 'name', + 'workplace_role': {"identifier":"identifier","permissions":["fugiat Lorem elit aliqua","anim deserunt Duis ut laboris"]} } results = sdk.service_accounts.create(request_input = request_body) @@ -2314,15 +2317,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[ServiceAccountsListResponse](/src/dopplersdk/models/README.md#serviceaccountslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.service_accounts.list( page = 1, per_page = 20 @@ -2344,15 +2347,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[ServiceAccountsGetResponse](/src/dopplersdk/models/README.md#serviceaccountsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.service_accounts.get(slug = 'slug') pprint(vars(results)) @@ -2368,22 +2371,22 @@ Update | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| | slug | str | Required | Slug of the service account | -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [ServiceAccountsUpdateRequest](/src/dopplersdk/models/README.md#serviceaccountsupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[ServiceAccountsUpdateResponse](/src/dopplersdk/models/README.md#serviceaccountsupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { - 'default_project_role': 'default_project_role', - 'name': 'name' + 'name': 'name', + 'workplace_role': {"identifier":"identifier","permissions":["exercitation cupidatat ullamco","est ut laborum et"]} } results = sdk.service_accounts.update( request_input = request_body, @@ -2412,9 +2415,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.service_accounts.delete(slug = 'slug') pprint(vars(results)) @@ -2430,19 +2433,19 @@ Create **Parameters** | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| -| request_input | [CreateRequest](/src/dopplersdk/models/README.md#createrequest) | Optional | Request body. | +| request_input | [GroupsCreateRequest](/src/dopplersdk/models/README.md#groupscreaterequest) | Optional | Request body. | **Return Type** -[CreateResponse](/src/dopplersdk/models/README.md#createresponse) +[GroupsCreateResponse](/src/dopplersdk/models/README.md#groupscreateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'default_project_role': 'default_project_role', 'name': 'name' @@ -2466,15 +2469,15 @@ List **Return Type** -[ListResponse](/src/dopplersdk/models/README.md#listresponse) +[GroupsListResponse](/src/dopplersdk/models/README.md#groupslistresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.groups.list( page = 1, per_page = 20 @@ -2496,15 +2499,15 @@ Retrieve **Return Type** -[GetResponse](/src/dopplersdk/models/README.md#getresponse) +[GroupsGetResponse](/src/dopplersdk/models/README.md#groupsgetresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.groups.get(slug = 'slug') pprint(vars(results)) @@ -2520,19 +2523,19 @@ Update | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| | slug | str | Required | The group's slug | -| request_input | [UpdateRequest](/src/dopplersdk/models/README.md#updaterequest) | Optional | Request body. | +| request_input | [GroupsUpdateRequest](/src/dopplersdk/models/README.md#groupsupdaterequest) | Optional | Request body. | **Return Type** -[UpdateResponse](/src/dopplersdk/models/README.md#updateresponse) +[GroupsUpdateResponse](/src/dopplersdk/models/README.md#groupsupdateresponse) **Example Usage Code Snippet** ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'default_project_role': 'default_project_role', 'name': 'name' @@ -2564,9 +2567,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.groups.delete(slug = 'slug') pprint(vars(results)) @@ -2592,9 +2595,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'slug': 'slug', 'type_': 'workplace_user' @@ -2617,7 +2620,7 @@ Delete Member | Name | Type| Required | Description | | :-------- | :----------| :----------| :----------| | slug | str | Required | The group's slug | -| type | [Type](/src/dopplersdk/models/README.md#type) | Required | | +| type | [GroupsType](/src/dopplersdk/models/README.md#groupstype) | Required | | | member_slug | str | Required | The member's slug | **Return Type** @@ -2628,9 +2631,9 @@ Returns a dict object. ```Python from pprint import pprint from dopplersdk import DopplerSDK -DOPPLERSDK_BEARER_TOKEN = '' +DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() -sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) +sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.groups.delete_member( slug = 'slug', type = 'workplace_user', diff --git a/src/dopplersdk/services/activity_logs.py b/src/dopplersdk/services/activity_logs.py index 9318d6b..d3ac697 100644 --- a/src/dopplersdk/services/activity_logs.py +++ b/src/dopplersdk/services/activity_logs.py @@ -1,11 +1,16 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel +from ..models.ActivityLogsListResponse import ( + ActivityLogsListResponse as ActivityLogsListResponseModel, +) from ..models.RetrieveResponse import RetrieveResponse as RetrieveResponseModel class ActivityLogs(BaseService): - def list(self, page: str = None, per_page: int = None) -> ListResponseModel: + def list( + self, page: str = None, per_page: int = None + ) -> ActivityLogsListResponseModel: """ List Parameters: @@ -21,15 +26,19 @@ def list(self, page: str = None, per_page: int = None) -> ListResponseModel: query_params = [] self._add_required_headers(headers) if page: - query_params.append(f"page={page}") + query_params.append( + query_serializer.serialize_query("form", False, "page", page) + ) if per_page: - query_params.append(f"per_page={per_page}") + query_params.append( + query_serializer.serialize_query("form", False, "per_page", per_page) + ) final_url = self._url_prefix + url_endpoint if len(query_params) > 0: final_url += "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return ActivityLogsListResponseModel(**res) return res def retrieve(self, log: str) -> RetrieveResponseModel: @@ -47,7 +56,7 @@ def retrieve(self, log: str) -> RetrieveResponseModel: self._add_required_headers(headers) if not log: raise ValueError("Parameter log is required, cannot be empty or blank.") - query_params.append(f"log={log}") + query_params.append(query_serializer.serialize_query("form", False, "log", log)) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): diff --git a/src/dopplersdk/services/base.py b/src/dopplersdk/services/base.py index 275ee4c..b51d590 100644 --- a/src/dopplersdk/services/base.py +++ b/src/dopplersdk/services/base.py @@ -22,7 +22,7 @@ class BaseService: Methods ------- - set_bearer_token(token: str) -> None: + set_access_token(token: str) -> None: Sets bearer token key def _add_required_headers(headers: dict): Request authorization headers @@ -34,16 +34,16 @@ def set_url(url: str): _http = HTTPClient(None) - def __init__(self, bearer_token: str = "") -> None: + def __init__(self, access_token: str = "") -> None: """ Initialize client Parameters: ---------- - bearer_token : str - A bearer access token + access_token : str + A Access access token """ - self._bearer_token = bearer_token + self._access_token = access_token def _pattern_matching(cls, value: str, pattern: str, variable_name: str): if re.match(r"{}".format(pattern), value): @@ -73,16 +73,16 @@ def set_url(self, url: str) -> None: """ self._url_prefix = url - def set_bearer_token(self, token: str) -> None: + def set_access_token(self, token: str) -> None: """ - Sets bearer token key + Sets access token key Parameters ---------- token: string - Bearer token value + Access token value """ - self._bearer_token = token + self._access_token = token def _add_required_headers(self, headers: dict): """ @@ -93,6 +93,6 @@ def _add_required_headers(self, headers: dict): headers: dict Headers dict to add auth headers to """ - headers["User-Agent"] = "liblab/0.1.16 DopplerSDK/1.1.1 python/2.7" - headers["Authorization"] = f"Bearer {self._bearer_token}" + headers["User-Agent"] = "liblab/0.1.17 DopplerSDK/1.1.2 python/2.7" + headers["Authorization"] = f"Bearer {self._access_token}" return headers diff --git a/src/dopplersdk/services/config_logs.py b/src/dopplersdk/services/config_logs.py index a986532..cc6815e 100644 --- a/src/dopplersdk/services/config_logs.py +++ b/src/dopplersdk/services/config_logs.py @@ -1,14 +1,19 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel -from ..models.GetResponse import GetResponse as GetResponseModel +from ..models.ConfigLogsListResponse import ( + ConfigLogsListResponse as ConfigLogsListResponseModel, +) +from ..models.ConfigLogsGetResponse import ( + ConfigLogsGetResponse as ConfigLogsGetResponseModel, +) from ..models.RollbackResponse import RollbackResponse as RollbackResponseModel class ConfigLogs(BaseService): def list( self, config: str, project: str, page: int = None, per_page: int = None - ) -> ListResponseModel: + ) -> ConfigLogsListResponseModel: """ List Parameters: @@ -29,21 +34,29 @@ def list( self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) if page: - query_params.append(f"page={page}") + query_params.append( + query_serializer.serialize_query("form", False, "page", page) + ) if per_page: - query_params.append(f"per_page={per_page}") + query_params.append( + query_serializer.serialize_query("form", False, "per_page", per_page) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return ConfigLogsListResponseModel(**res) return res - def get(self, log: str, config: str, project: str) -> GetResponseModel: + def get(self, log: str, config: str, project: str) -> ConfigLogsGetResponseModel: """ Retrieve Parameters: @@ -62,17 +75,21 @@ def get(self, log: str, config: str, project: str) -> GetResponseModel: self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) if not log: raise ValueError("Parameter log is required, cannot be empty or blank.") - query_params.append(f"log={log}") + query_params.append(query_serializer.serialize_query("form", False, "log", log)) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return GetResponseModel(**res) + return ConfigLogsGetResponseModel(**res) return res def rollback(self, log: str, config: str, project: str) -> RollbackResponseModel: @@ -94,13 +111,17 @@ def rollback(self, log: str, config: str, project: str) -> RollbackResponseModel self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) if not log: raise ValueError("Parameter log is required, cannot be empty or blank.") - query_params.append(f"log={log}") + query_params.append(query_serializer.serialize_query("form", False, "log", log)) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.post(final_url, headers, {}, True) if res and isinstance(res, dict): diff --git a/src/dopplersdk/services/configs.py b/src/dopplersdk/services/configs.py index ff5be4f..ab7913a 100644 --- a/src/dopplersdk/services/configs.py +++ b/src/dopplersdk/services/configs.py @@ -1,12 +1,23 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel -from ..models.CreateRequest import CreateRequest as CreateRequestModel -from ..models.CreateResponse import CreateResponse as CreateResponseModel -from ..models.GetResponse import GetResponse as GetResponseModel -from ..models.UpdateRequest import UpdateRequest as UpdateRequestModel -from ..models.UpdateResponse import UpdateResponse as UpdateResponseModel -from ..models.DeleteRequest import DeleteRequest as DeleteRequestModel +from ..models.ConfigsListResponse import ConfigsListResponse as ConfigsListResponseModel +from ..models.ConfigsCreateRequest import ( + ConfigsCreateRequest as ConfigsCreateRequestModel, +) +from ..models.ConfigsCreateResponse import ( + ConfigsCreateResponse as ConfigsCreateResponseModel, +) +from ..models.ConfigsGetResponse import ConfigsGetResponse as ConfigsGetResponseModel +from ..models.ConfigsUpdateRequest import ( + ConfigsUpdateRequest as ConfigsUpdateRequestModel, +) +from ..models.ConfigsUpdateResponse import ( + ConfigsUpdateResponse as ConfigsUpdateResponseModel, +) +from ..models.ConfigsDeleteRequest import ( + ConfigsDeleteRequest as ConfigsDeleteRequestModel, +) from ..models.DeleteResponse import DeleteResponse as DeleteResponseModel from ..models.CloneRequest import CloneRequest as CloneRequestModel from ..models.CloneResponse import CloneResponse as CloneResponseModel @@ -14,6 +25,16 @@ from ..models.LockResponse import LockResponse as LockResponseModel from ..models.UnlockRequest import UnlockRequest as UnlockRequestModel from ..models.UnlockResponse import UnlockResponse as UnlockResponseModel +from ..models.ListTrustedIpsResponse import ( + ListTrustedIpsResponse as ListTrustedIpsResponseModel, +) +from ..models.AddTrustedIpRequest import AddTrustedIpRequest as AddTrustedIpRequestModel +from ..models.AddTrustedIpResponse import ( + AddTrustedIpResponse as AddTrustedIpResponseModel, +) +from ..models.DeleteTrustedIpRequest import ( + DeleteTrustedIpRequest as DeleteTrustedIpRequestModel, +) class Configs(BaseService): @@ -23,7 +44,7 @@ def list( environment: str = None, page: int = None, per_page: int = None, - ) -> ListResponseModel: + ) -> ConfigsListResponseModel: """ List Parameters: @@ -44,20 +65,32 @@ def list( self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if environment: - query_params.append(f"environment={environment}") + query_params.append( + query_serializer.serialize_query( + "form", False, "environment", environment + ) + ) if page: - query_params.append(f"page={page}") + query_params.append( + query_serializer.serialize_query("form", False, "page", page) + ) if per_page: - query_params.append(f"per_page={per_page}") + query_params.append( + query_serializer.serialize_query("form", False, "per_page", per_page) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return ConfigsListResponseModel(**res) return res - def create(self, request_input: CreateRequestModel = None) -> CreateResponseModel: + def create( + self, request_input: ConfigsCreateRequestModel = None + ) -> ConfigsCreateResponseModel: """ Create """ @@ -69,10 +102,10 @@ def create(self, request_input: CreateRequestModel = None) -> CreateResponseMode final_url = self._url_prefix + url_endpoint res = self._http.post(final_url, headers, request_input, True) if res and isinstance(res, dict): - return CreateResponseModel(**res) + return ConfigsCreateResponseModel(**res) return res - def get(self, config: str, project: str) -> GetResponseModel: + def get(self, config: str, project: str) -> ConfigsGetResponseModel: """ Retrieve Parameters: @@ -89,17 +122,23 @@ def get(self, config: str, project: str) -> GetResponseModel: self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return GetResponseModel(**res) + return ConfigsGetResponseModel(**res) return res - def update(self, request_input: UpdateRequestModel = None) -> UpdateResponseModel: + def update( + self, request_input: ConfigsUpdateRequestModel = None + ) -> ConfigsUpdateResponseModel: """ Update """ @@ -111,10 +150,12 @@ def update(self, request_input: UpdateRequestModel = None) -> UpdateResponseMode final_url = self._url_prefix + url_endpoint res = self._http.post(final_url, headers, request_input, True) if res and isinstance(res, dict): - return UpdateResponseModel(**res) + return ConfigsUpdateResponseModel(**res) return res - def delete(self, request_input: DeleteRequestModel = None) -> DeleteResponseModel: + def delete( + self, request_input: ConfigsDeleteRequestModel = None + ) -> DeleteResponseModel: """ Delete """ @@ -173,3 +214,97 @@ def unlock(self, request_input: UnlockRequestModel = None) -> UnlockResponseMode if res and isinstance(res, dict): return UnlockResponseModel(**res) return res + + def list_trusted_ips( + self, config: str, project: str + ) -> ListTrustedIpsResponseModel: + """ + List + Parameters: + ---------- + project: str + config: str + """ + + url_endpoint = "/v3/configs/config/trusted_ips" + headers = {} + query_params = [] + self._add_required_headers(headers) + if not project: + raise ValueError("Parameter project is required, cannot be empty or blank.") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) + if not config: + raise ValueError("Parameter config is required, cannot be empty or blank.") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) + final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) + res = self._http.get(final_url, headers, True) + if res and isinstance(res, dict): + return ListTrustedIpsResponseModel(**res) + return res + + def add_trusted_ip( + self, config: str, project: str, request_input: AddTrustedIpRequestModel = None + ) -> AddTrustedIpResponseModel: + """ + Add + Parameters: + ---------- + project: str + config: str + """ + + url_endpoint = "/v3/configs/config/trusted_ips" + headers = {"Content-type": "application/json"} + query_params = [] + self._add_required_headers(headers) + if not project: + raise ValueError("Parameter project is required, cannot be empty or blank.") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) + if not config: + raise ValueError("Parameter config is required, cannot be empty or blank.") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) + final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) + res = self._http.post(final_url, headers, request_input, True) + if res and isinstance(res, dict): + return AddTrustedIpResponseModel(**res) + return res + + def delete_trusted_ip( + self, + config: str, + project: str, + request_input: DeleteTrustedIpRequestModel = None, + ): + """ + Delete + Parameters: + ---------- + project: str + config: str + """ + + url_endpoint = "/v3/configs/config/trusted_ips" + headers = {"Content-type": "application/json"} + query_params = [] + self._add_required_headers(headers) + if not project: + raise ValueError("Parameter project is required, cannot be empty or blank.") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) + if not config: + raise ValueError("Parameter config is required, cannot be empty or blank.") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) + final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) + res = self._http.delete(final_url, headers, True) + return res diff --git a/src/dopplersdk/services/dynamic_secrets.py b/src/dopplersdk/services/dynamic_secrets.py index 38bc45c..2fb5e6e 100644 --- a/src/dopplersdk/services/dynamic_secrets.py +++ b/src/dopplersdk/services/dynamic_secrets.py @@ -1,4 +1,5 @@ from urllib.parse import quote + from .base import BaseService from ..models.IssueLeaseRequest import IssueLeaseRequest as IssueLeaseRequestModel from ..models.IssueLeaseResponse import IssueLeaseResponse as IssueLeaseResponseModel diff --git a/src/dopplersdk/services/environments.py b/src/dopplersdk/services/environments.py index 2cb0601..ba5daa5 100644 --- a/src/dopplersdk/services/environments.py +++ b/src/dopplersdk/services/environments.py @@ -1,15 +1,24 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel -from ..models.CreateRequest import CreateRequest as CreateRequestModel -from ..models.CreateResponse import CreateResponse as CreateResponseModel -from ..models.GetResponse import GetResponse as GetResponseModel +from ..models.EnvironmentsListResponse import ( + EnvironmentsListResponse as EnvironmentsListResponseModel, +) +from ..models.EnvironmentsCreateRequest import ( + EnvironmentsCreateRequest as EnvironmentsCreateRequestModel, +) +from ..models.EnvironmentsCreateResponse import ( + EnvironmentsCreateResponse as EnvironmentsCreateResponseModel, +) +from ..models.EnvironmentsGetResponse import ( + EnvironmentsGetResponse as EnvironmentsGetResponseModel, +) from ..models.RenameRequest import RenameRequest as RenameRequestModel from ..models.RenameResponse import RenameResponse as RenameResponseModel class Environments(BaseService): - def list(self, project: str) -> ListResponseModel: + def list(self, project: str) -> EnvironmentsListResponseModel: """ List Parameters: @@ -24,16 +33,18 @@ def list(self, project: str) -> ListResponseModel: self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return EnvironmentsListResponseModel(**res) return res def create( - self, project: str, request_input: CreateRequestModel = None - ) -> CreateResponseModel: + self, project: str, request_input: EnvironmentsCreateRequestModel = None + ) -> EnvironmentsCreateResponseModel: """ Create Parameters: @@ -48,14 +59,16 @@ def create( self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.post(final_url, headers, request_input, True) if res and isinstance(res, dict): - return CreateResponseModel(**res) + return EnvironmentsCreateResponseModel(**res) return res - def get(self, environment: str, project: str) -> GetResponseModel: + def get(self, environment: str, project: str) -> EnvironmentsGetResponseModel: """ Retrieve Parameters: @@ -72,16 +85,20 @@ def get(self, environment: str, project: str) -> GetResponseModel: self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not environment: raise ValueError( "Parameter environment is required, cannot be empty or blank." ) - query_params.append(f"environment={environment}") + query_params.append( + query_serializer.serialize_query("form", False, "environment", environment) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return GetResponseModel(**res) + return EnvironmentsGetResponseModel(**res) return res def rename( @@ -103,12 +120,16 @@ def rename( self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not environment: raise ValueError( "Parameter environment is required, cannot be empty or blank." ) - query_params.append(f"environment={environment}") + query_params.append( + query_serializer.serialize_query("form", False, "environment", environment) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.put(final_url, headers, request_input, True) if res and isinstance(res, dict): @@ -132,12 +153,16 @@ def delete(self, environment: str, project: str): self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not environment: raise ValueError( "Parameter environment is required, cannot be empty or blank." ) - query_params.append(f"environment={environment}") + query_params.append( + query_serializer.serialize_query("form", False, "environment", environment) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.delete(final_url, headers, True) return res diff --git a/src/dopplersdk/services/groups.py b/src/dopplersdk/services/groups.py index 481b60a..6849226 100644 --- a/src/dopplersdk/services/groups.py +++ b/src/dopplersdk/services/groups.py @@ -1,17 +1,22 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel -from ..models.CreateRequest import CreateRequest as CreateRequestModel -from ..models.CreateResponse import CreateResponse as CreateResponseModel -from ..models.GetResponse import GetResponse as GetResponseModel -from ..models.UpdateRequest import UpdateRequest as UpdateRequestModel -from ..models.UpdateResponse import UpdateResponse as UpdateResponseModel +from ..models.GroupsListResponse import GroupsListResponse as GroupsListResponseModel +from ..models.GroupsCreateRequest import GroupsCreateRequest as GroupsCreateRequestModel +from ..models.GroupsCreateResponse import ( + GroupsCreateResponse as GroupsCreateResponseModel, +) +from ..models.GroupsGetResponse import GroupsGetResponse as GroupsGetResponseModel +from ..models.GroupsUpdateRequest import GroupsUpdateRequest as GroupsUpdateRequestModel +from ..models.GroupsUpdateResponse import ( + GroupsUpdateResponse as GroupsUpdateResponseModel, +) from ..models.AddMemberRequest import AddMemberRequest as AddMemberRequestModel -from ..models.Type import Type as TypeModel +from ..models.GroupsType import GroupsType as GroupsTypeModel class Groups(BaseService): - def list(self, page: int = None, per_page: int = None) -> ListResponseModel: + def list(self, page: int = None, per_page: int = None) -> GroupsListResponseModel: """ List Parameters: @@ -25,18 +30,24 @@ def list(self, page: int = None, per_page: int = None) -> ListResponseModel: query_params = [] self._add_required_headers(headers) if page: - query_params.append(f"page={page}") + query_params.append( + query_serializer.serialize_query("form", False, "page", page) + ) if per_page: - query_params.append(f"per_page={per_page}") + query_params.append( + query_serializer.serialize_query("form", False, "per_page", per_page) + ) final_url = self._url_prefix + url_endpoint if len(query_params) > 0: final_url += "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return GroupsListResponseModel(**res) return res - def create(self, request_input: CreateRequestModel = None) -> CreateResponseModel: + def create( + self, request_input: GroupsCreateRequestModel = None + ) -> GroupsCreateResponseModel: """ Create """ @@ -48,10 +59,10 @@ def create(self, request_input: CreateRequestModel = None) -> CreateResponseMode final_url = self._url_prefix + url_endpoint res = self._http.post(final_url, headers, request_input, True) if res and isinstance(res, dict): - return CreateResponseModel(**res) + return GroupsCreateResponseModel(**res) return res - def get(self, slug: str) -> GetResponseModel: + def get(self, slug: str) -> GroupsGetResponseModel: """ Retrieve Parameters: @@ -65,16 +76,19 @@ def get(self, slug: str) -> GetResponseModel: self._add_required_headers(headers) if not slug: raise ValueError("Parameter slug is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{slug}", quote(str(slug))) + url_endpoint = url_endpoint.replace( + "{slug}", + quote(str(query_serializer.serialize_path("simple", False, slug, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return GetResponseModel(**res) + return GroupsGetResponseModel(**res) return res def update( - self, slug: str, request_input: UpdateRequestModel = None - ) -> UpdateResponseModel: + self, slug: str, request_input: GroupsUpdateRequestModel = None + ) -> GroupsUpdateResponseModel: """ Update Parameters: @@ -88,11 +102,14 @@ def update( self._add_required_headers(headers) if not slug: raise ValueError("Parameter slug is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{slug}", quote(str(slug))) + url_endpoint = url_endpoint.replace( + "{slug}", + quote(str(query_serializer.serialize_path("simple", False, slug, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.patch(final_url, headers, request_input, True) if res and isinstance(res, dict): - return UpdateResponseModel(**res) + return GroupsUpdateResponseModel(**res) return res def delete(self, slug: str): @@ -109,7 +126,10 @@ def delete(self, slug: str): self._add_required_headers(headers) if not slug: raise ValueError("Parameter slug is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{slug}", quote(str(slug))) + url_endpoint = url_endpoint.replace( + "{slug}", + quote(str(query_serializer.serialize_path("simple", False, slug, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.delete(final_url, headers, True) return res @@ -128,19 +148,22 @@ def add_member(self, slug: str, request_input: AddMemberRequestModel = None): self._add_required_headers(headers) if not slug: raise ValueError("Parameter slug is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{slug}", quote(str(slug))) + url_endpoint = url_endpoint.replace( + "{slug}", + quote(str(query_serializer.serialize_path("simple", False, slug, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.post(final_url, headers, request_input, True) return res - def delete_member(self, member_slug: str, type_: TypeModel, slug: str): + def delete_member(self, member_slug: str, type_: GroupsTypeModel, slug: str): """ Delete Member Parameters: ---------- slug: str The group's slug - type: Type + type: GroupsType member_slug: str The member's slug """ @@ -150,16 +173,33 @@ def delete_member(self, member_slug: str, type_: TypeModel, slug: str): self._add_required_headers(headers) if not slug: raise ValueError("Parameter slug is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{slug}", quote(str(slug))) + url_endpoint = url_endpoint.replace( + "{slug}", + quote(str(query_serializer.serialize_path("simple", False, slug, None))), + ) if not type_: raise ValueError("Parameter type_ is required, cannot be empty or blank.") - validated_type_ = self._enum_matching(type_, TypeModel.list(), "type_") - url_endpoint = url_endpoint.replace("{type_}", quote(str(validated_type_))) + validated_type_ = self._enum_matching(type_, GroupsTypeModel.list(), "type_") + url_endpoint = url_endpoint.replace( + "{type_}", + quote( + str( + query_serializer.serialize_path( + "simple", False, validated_type_, None + ) + ) + ), + ) if not member_slug: raise ValueError( "Parameter member_slug is required, cannot be empty or blank." ) - url_endpoint = url_endpoint.replace("{member_slug}", quote(str(member_slug))) + url_endpoint = url_endpoint.replace( + "{member_slug}", + quote( + str(query_serializer.serialize_path("simple", False, member_slug, None)) + ), + ) final_url = self._url_prefix + url_endpoint res = self._http.delete(final_url, headers, True) return res diff --git a/src/dopplersdk/services/integrations.py b/src/dopplersdk/services/integrations.py index f02d172..e33bca5 100644 --- a/src/dopplersdk/services/integrations.py +++ b/src/dopplersdk/services/integrations.py @@ -1,16 +1,31 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel -from ..models.CreateRequest import CreateRequest as CreateRequestModel -from ..models.CreateResponse import CreateResponse as CreateResponseModel -from ..models.GetResponse import GetResponse as GetResponseModel -from ..models.UpdateRequest import UpdateRequest as UpdateRequestModel -from ..models.UpdateResponse import UpdateResponse as UpdateResponseModel -from ..models.DeleteResponse import DeleteResponse as DeleteResponseModel +from ..models.IntegrationsListResponse import ( + IntegrationsListResponse as IntegrationsListResponseModel, +) +from ..models.IntegrationsCreateRequest import ( + IntegrationsCreateRequest as IntegrationsCreateRequestModel, +) +from ..models.IntegrationsCreateResponse import ( + IntegrationsCreateResponse as IntegrationsCreateResponseModel, +) +from ..models.IntegrationsGetResponse import ( + IntegrationsGetResponse as IntegrationsGetResponseModel, +) +from ..models.IntegrationsUpdateRequest import ( + IntegrationsUpdateRequest as IntegrationsUpdateRequestModel, +) +from ..models.IntegrationsUpdateResponse import ( + IntegrationsUpdateResponse as IntegrationsUpdateResponseModel, +) +from ..models.IntegrationsDeleteResponse import ( + IntegrationsDeleteResponse as IntegrationsDeleteResponseModel, +) class Integrations(BaseService): - def list(self) -> ListResponseModel: + def list(self) -> IntegrationsListResponseModel: """ List """ @@ -22,10 +37,12 @@ def list(self) -> ListResponseModel: final_url = self._url_prefix + url_endpoint res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return IntegrationsListResponseModel(**res) return res - def create(self, request_input: CreateRequestModel = None) -> CreateResponseModel: + def create( + self, request_input: IntegrationsCreateRequestModel = None + ) -> IntegrationsCreateResponseModel: """ Create """ @@ -37,10 +54,10 @@ def create(self, request_input: CreateRequestModel = None) -> CreateResponseMode final_url = self._url_prefix + url_endpoint res = self._http.post(final_url, headers, request_input, True) if res and isinstance(res, dict): - return CreateResponseModel(**res) + return IntegrationsCreateResponseModel(**res) return res - def get(self, integration: str) -> GetResponseModel: + def get(self, integration: str) -> IntegrationsGetResponseModel: """ Retrieve Parameters: @@ -57,16 +74,18 @@ def get(self, integration: str) -> GetResponseModel: raise ValueError( "Parameter integration is required, cannot be empty or blank." ) - query_params.append(f"integration={integration}") + query_params.append( + query_serializer.serialize_query("form", False, "integration", integration) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return GetResponseModel(**res) + return IntegrationsGetResponseModel(**res) return res def update( - self, integration: str, request_input: UpdateRequestModel = None - ) -> UpdateResponseModel: + self, integration: str, request_input: IntegrationsUpdateRequestModel = None + ) -> IntegrationsUpdateResponseModel: """ Update Parameters: @@ -83,14 +102,16 @@ def update( raise ValueError( "Parameter integration is required, cannot be empty or blank." ) - query_params.append(f"integration={integration}") + query_params.append( + query_serializer.serialize_query("form", False, "integration", integration) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.put(final_url, headers, request_input, True) if res and isinstance(res, dict): - return UpdateResponseModel(**res) + return IntegrationsUpdateResponseModel(**res) return res - def delete(self, integration: str) -> DeleteResponseModel: + def delete(self, integration: str) -> IntegrationsDeleteResponseModel: """ Delete Parameters: @@ -107,9 +128,11 @@ def delete(self, integration: str) -> DeleteResponseModel: raise ValueError( "Parameter integration is required, cannot be empty or blank." ) - query_params.append(f"integration={integration}") + query_params.append( + query_serializer.serialize_query("form", False, "integration", integration) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.delete(final_url, headers, True) if res and isinstance(res, dict): - return DeleteResponseModel(**res) + return IntegrationsDeleteResponseModel(**res) return res diff --git a/src/dopplersdk/services/invites.py b/src/dopplersdk/services/invites.py index 7f20763..1179ba3 100644 --- a/src/dopplersdk/services/invites.py +++ b/src/dopplersdk/services/invites.py @@ -1,10 +1,11 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel +from ..models.InvitesListResponse import InvitesListResponse as InvitesListResponseModel class Invites(BaseService): - def list(self, page: int = None, per_page: int = None) -> ListResponseModel: + def list(self, page: int = None, per_page: int = None) -> InvitesListResponseModel: """ List Parameters: @@ -18,13 +19,17 @@ def list(self, page: int = None, per_page: int = None) -> ListResponseModel: query_params = [] self._add_required_headers(headers) if page: - query_params.append(f"page={page}") + query_params.append( + query_serializer.serialize_query("form", False, "page", page) + ) if per_page: - query_params.append(f"per_page={per_page}") + query_params.append( + query_serializer.serialize_query("form", False, "per_page", per_page) + ) final_url = self._url_prefix + url_endpoint if len(query_params) > 0: final_url += "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return InvitesListResponseModel(**res) return res diff --git a/src/dopplersdk/services/project_members.py b/src/dopplersdk/services/project_members.py index 5bf0e73..8c69546 100644 --- a/src/dopplersdk/services/project_members.py +++ b/src/dopplersdk/services/project_members.py @@ -1,18 +1,27 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel +from ..models.ProjectMembersListResponse import ( + ProjectMembersListResponse as ProjectMembersListResponseModel, +) from ..models.AddRequest import AddRequest as AddRequestModel from ..models.AddResponse import AddResponse as AddResponseModel from ..models.Type import Type as TypeModel -from ..models.GetResponse import GetResponse as GetResponseModel -from ..models.UpdateRequest import UpdateRequest as UpdateRequestModel -from ..models.UpdateResponse import UpdateResponse as UpdateResponseModel +from ..models.ProjectMembersGetResponse import ( + ProjectMembersGetResponse as ProjectMembersGetResponseModel, +) +from ..models.ProjectMembersUpdateRequest import ( + ProjectMembersUpdateRequest as ProjectMembersUpdateRequestModel, +) +from ..models.ProjectMembersUpdateResponse import ( + ProjectMembersUpdateResponse as ProjectMembersUpdateResponseModel, +) class ProjectMembers(BaseService): def list( self, project: str, page: int = None, per_page: int = None - ) -> ListResponseModel: + ) -> ProjectMembersListResponseModel: """ List Parameters: @@ -29,15 +38,21 @@ def list( self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if page: - query_params.append(f"page={page}") + query_params.append( + query_serializer.serialize_query("form", False, "page", page) + ) if per_page: - query_params.append(f"per_page={per_page}") + query_params.append( + query_serializer.serialize_query("form", False, "per_page", per_page) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return ProjectMembersListResponseModel(**res) return res def add( @@ -57,14 +72,18 @@ def add( self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.post(final_url, headers, request_input, True) if res and isinstance(res, dict): return AddResponseModel(**res) return res - def get(self, slug: str, type_: TypeModel, project: str) -> GetResponseModel: + def get( + self, slug: str, type_: TypeModel, project: str + ) -> ProjectMembersGetResponseModel: """ Retrieve Parameters: @@ -82,18 +101,32 @@ def get(self, slug: str, type_: TypeModel, project: str) -> GetResponseModel: self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not type_: raise ValueError("Parameter type_ is required, cannot be empty or blank.") validated_type_ = self._enum_matching(type_, TypeModel.list(), "type_") - url_endpoint = url_endpoint.replace("{type_}", quote(str(validated_type_))) + url_endpoint = url_endpoint.replace( + "{type_}", + quote( + str( + query_serializer.serialize_path( + "simple", False, validated_type_, None + ) + ) + ), + ) if not slug: raise ValueError("Parameter slug is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{slug}", quote(str(slug))) + url_endpoint = url_endpoint.replace( + "{slug}", + quote(str(query_serializer.serialize_path("simple", False, slug, None))), + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return GetResponseModel(**res) + return ProjectMembersGetResponseModel(**res) return res def update( @@ -101,8 +134,8 @@ def update( project: str, slug: str, type_: TypeModel, - request_input: UpdateRequestModel = None, - ) -> UpdateResponseModel: + request_input: ProjectMembersUpdateRequestModel = None, + ) -> ProjectMembersUpdateResponseModel: """ Update Parameters: @@ -121,17 +154,31 @@ def update( if not type_: raise ValueError("Parameter type_ is required, cannot be empty or blank.") validated_type_ = self._enum_matching(type_, TypeModel.list(), "type_") - url_endpoint = url_endpoint.replace("{type_}", quote(str(validated_type_))) + url_endpoint = url_endpoint.replace( + "{type_}", + quote( + str( + query_serializer.serialize_path( + "simple", False, validated_type_, None + ) + ) + ), + ) if not slug: raise ValueError("Parameter slug is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{slug}", quote(str(slug))) + url_endpoint = url_endpoint.replace( + "{slug}", + quote(str(query_serializer.serialize_path("simple", False, slug, None))), + ) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.patch(final_url, headers, request_input, True) if res and isinstance(res, dict): - return UpdateResponseModel(**res) + return ProjectMembersUpdateResponseModel(**res) return res def delete(self, project: str, slug: str, type_: TypeModel): @@ -153,13 +200,27 @@ def delete(self, project: str, slug: str, type_: TypeModel): if not type_: raise ValueError("Parameter type_ is required, cannot be empty or blank.") validated_type_ = self._enum_matching(type_, TypeModel.list(), "type_") - url_endpoint = url_endpoint.replace("{type_}", quote(str(validated_type_))) + url_endpoint = url_endpoint.replace( + "{type_}", + quote( + str( + query_serializer.serialize_path( + "simple", False, validated_type_, None + ) + ) + ), + ) if not slug: raise ValueError("Parameter slug is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{slug}", quote(str(slug))) + url_endpoint = url_endpoint.replace( + "{slug}", + quote(str(query_serializer.serialize_path("simple", False, slug, None))), + ) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.delete(final_url, headers, True) return res diff --git a/src/dopplersdk/services/project_roles.py b/src/dopplersdk/services/project_roles.py index 4adbcc1..77b0bc6 100644 --- a/src/dopplersdk/services/project_roles.py +++ b/src/dopplersdk/services/project_roles.py @@ -1,16 +1,25 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel -from ..models.CreateResponse import CreateResponse as CreateResponseModel -from ..models.GetResponse import GetResponse as GetResponseModel -from ..models.UpdateResponse import UpdateResponse as UpdateResponseModel -from ..models.ListPermissionsResponse import ( - ListPermissionsResponse as ListPermissionsResponseModel, +from ..models.ProjectRolesListResponse import ( + ProjectRolesListResponse as ProjectRolesListResponseModel, +) +from ..models.ProjectRolesCreateResponse import ( + ProjectRolesCreateResponse as ProjectRolesCreateResponseModel, +) +from ..models.ProjectRolesGetResponse import ( + ProjectRolesGetResponse as ProjectRolesGetResponseModel, +) +from ..models.ProjectRolesUpdateResponse import ( + ProjectRolesUpdateResponse as ProjectRolesUpdateResponseModel, +) +from ..models.ProjectRolesListPermissionsResponse import ( + ProjectRolesListPermissionsResponse as ProjectRolesListPermissionsResponseModel, ) class ProjectRoles(BaseService): - def list(self) -> ListResponseModel: + def list(self) -> ProjectRolesListResponseModel: """ List """ @@ -22,10 +31,10 @@ def list(self) -> ListResponseModel: final_url = self._url_prefix + url_endpoint res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return ProjectRolesListResponseModel(**res) return res - def create(self) -> CreateResponseModel: + def create(self) -> ProjectRolesCreateResponseModel: """ Create """ @@ -37,10 +46,10 @@ def create(self) -> CreateResponseModel: final_url = self._url_prefix + url_endpoint res = self._http.post(final_url, headers, {}, True) if res and isinstance(res, dict): - return CreateResponseModel(**res) + return ProjectRolesCreateResponseModel(**res) return res - def get(self, role: str) -> GetResponseModel: + def get(self, role: str) -> ProjectRolesGetResponseModel: """ Retrieve Parameters: @@ -54,14 +63,17 @@ def get(self, role: str) -> GetResponseModel: self._add_required_headers(headers) if not role: raise ValueError("Parameter role is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{role}", quote(str(role))) + url_endpoint = url_endpoint.replace( + "{role}", + quote(str(query_serializer.serialize_path("simple", False, role, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return GetResponseModel(**res) + return ProjectRolesGetResponseModel(**res) return res - def update(self, role: str) -> UpdateResponseModel: + def update(self, role: str) -> ProjectRolesUpdateResponseModel: """ Update Parameters: @@ -75,11 +87,14 @@ def update(self, role: str) -> UpdateResponseModel: self._add_required_headers(headers) if not role: raise ValueError("Parameter role is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{role}", quote(str(role))) + url_endpoint = url_endpoint.replace( + "{role}", + quote(str(query_serializer.serialize_path("simple", False, role, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.patch(final_url, headers, {}, True) if res and isinstance(res, dict): - return UpdateResponseModel(**res) + return ProjectRolesUpdateResponseModel(**res) return res def delete(self, role: str): @@ -96,12 +111,15 @@ def delete(self, role: str): self._add_required_headers(headers) if not role: raise ValueError("Parameter role is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{role}", quote(str(role))) + url_endpoint = url_endpoint.replace( + "{role}", + quote(str(query_serializer.serialize_path("simple", False, role, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.delete(final_url, headers, True) return res - def list_permissions(self) -> ListPermissionsResponseModel: + def list_permissions(self) -> ProjectRolesListPermissionsResponseModel: """ List Permissions """ @@ -113,5 +131,5 @@ def list_permissions(self) -> ListPermissionsResponseModel: final_url = self._url_prefix + url_endpoint res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListPermissionsResponseModel(**res) + return ProjectRolesListPermissionsResponseModel(**res) return res diff --git a/src/dopplersdk/services/projects.py b/src/dopplersdk/services/projects.py index 13c0499..8d03e18 100644 --- a/src/dopplersdk/services/projects.py +++ b/src/dopplersdk/services/projects.py @@ -1,4 +1,5 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService from ..models.GetResponse import GetResponse as GetResponseModel from ..models.UpdateRequest import UpdateRequest as UpdateRequestModel @@ -25,7 +26,9 @@ def get(self, project: str) -> GetResponseModel: self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): @@ -76,9 +79,13 @@ def list(self, page: int = None, per_page: int = None) -> ListResponseModel: query_params = [] self._add_required_headers(headers) if page: - query_params.append(f"page={page}") + query_params.append( + query_serializer.serialize_query("form", False, "page", page) + ) if per_page: - query_params.append(f"per_page={per_page}") + query_params.append( + query_serializer.serialize_query("form", False, "per_page", per_page) + ) final_url = self._url_prefix + url_endpoint if len(query_params) > 0: final_url += "?" + "&".join(query_params) diff --git a/src/dopplersdk/services/secrets.py b/src/dopplersdk/services/secrets.py index 8445a81..87f2cc9 100644 --- a/src/dopplersdk/services/secrets.py +++ b/src/dopplersdk/services/secrets.py @@ -1,9 +1,14 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel -from ..models.UpdateRequest import UpdateRequest as UpdateRequestModel -from ..models.UpdateResponse import UpdateResponse as UpdateResponseModel -from ..models.GetResponse import GetResponse as GetResponseModel +from ..models.SecretsListResponse import SecretsListResponse as SecretsListResponseModel +from ..models.SecretsUpdateRequest import ( + SecretsUpdateRequest as SecretsUpdateRequestModel, +) +from ..models.SecretsUpdateResponse import ( + SecretsUpdateResponse as SecretsUpdateResponseModel, +) +from ..models.SecretsGetResponse import SecretsGetResponse as SecretsGetResponseModel from ..models.Format import Format as FormatModel from ..models.NameTransformer import NameTransformer as NameTransformerModel from ..models.DownloadResponse import DownloadResponse as DownloadResponseModel @@ -22,7 +27,7 @@ def list( dynamic_secrets_ttl_sec: int = None, secrets: str = None, include_managed_secrets: bool = None, - ) -> ListResponseModel: + ) -> SecretsListResponseModel: """ List Parameters: @@ -49,26 +54,46 @@ def list( self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") - headers["accepts"] = accepts + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) + headers["accepts"] = query_serializer.serialize_header(False, accepts) if include_dynamic_secrets: - query_params.append(f"include_dynamic_secrets={include_dynamic_secrets}") + query_params.append( + query_serializer.serialize_query( + "form", False, "include_dynamic_secrets", include_dynamic_secrets + ) + ) if dynamic_secrets_ttl_sec: - query_params.append(f"dynamic_secrets_ttl_sec={dynamic_secrets_ttl_sec}") + query_params.append( + query_serializer.serialize_query( + "form", False, "dynamic_secrets_ttl_sec", dynamic_secrets_ttl_sec + ) + ) if secrets: - query_params.append(f"secrets={secrets}") + query_params.append( + query_serializer.serialize_query("form", False, "secrets", secrets) + ) if include_managed_secrets: - query_params.append(f"include_managed_secrets={include_managed_secrets}") + query_params.append( + query_serializer.serialize_query( + "form", False, "include_managed_secrets", include_managed_secrets + ) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return SecretsListResponseModel(**res) return res - def update(self, request_input: UpdateRequestModel = None) -> UpdateResponseModel: + def update( + self, request_input: SecretsUpdateRequestModel = None + ) -> SecretsUpdateResponseModel: """ Update """ @@ -80,10 +105,10 @@ def update(self, request_input: UpdateRequestModel = None) -> UpdateResponseMode final_url = self._url_prefix + url_endpoint res = self._http.post(final_url, headers, request_input, True) if res and isinstance(res, dict): - return UpdateResponseModel(**res) + return SecretsUpdateResponseModel(**res) return res - def get(self, name: str, config: str, project: str) -> GetResponseModel: + def get(self, name: str, config: str, project: str) -> SecretsGetResponseModel: """ Retrieve Parameters: @@ -102,17 +127,23 @@ def get(self, name: str, config: str, project: str) -> GetResponseModel: self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) if not name: raise ValueError("Parameter name is required, cannot be empty or blank.") - query_params.append(f"name={name}") + query_params.append( + query_serializer.serialize_query("form", False, "name", name) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return GetResponseModel(**res) + return SecretsGetResponseModel(**res) return res def delete(self, name: str, config: str, project: str): @@ -134,13 +165,19 @@ def delete(self, name: str, config: str, project: str): self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) if not name: raise ValueError("Parameter name is required, cannot be empty or blank.") - query_params.append(f"name={name}") + query_params.append( + query_serializer.serialize_query("form", False, "name", name) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.delete(final_url, headers, True) return res @@ -177,22 +214,42 @@ def download( self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) if format: validated_format = self._enum_matching(format, FormatModel.list(), "format") - query_params.append(f"format={validated_format}") + query_params.append( + query_serializer.serialize_query( + "form", False, "format", validated_format + ) + ) if name_transformer: validated_name_transformer = self._enum_matching( name_transformer, NameTransformerModel.list(), "name_transformer" ) - query_params.append(f"name_transformer={validated_name_transformer}") + query_params.append( + query_serializer.serialize_query( + "form", False, "name_transformer", validated_name_transformer + ) + ) if include_dynamic_secrets: - query_params.append(f"include_dynamic_secrets={include_dynamic_secrets}") + query_params.append( + query_serializer.serialize_query( + "form", False, "include_dynamic_secrets", include_dynamic_secrets + ) + ) if dynamic_secrets_ttl_sec: - query_params.append(f"dynamic_secrets_ttl_sec={dynamic_secrets_ttl_sec}") + query_params.append( + query_serializer.serialize_query( + "form", False, "dynamic_secrets_ttl_sec", dynamic_secrets_ttl_sec + ) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): @@ -226,14 +283,26 @@ def names( self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) if include_dynamic_secrets: - query_params.append(f"include_dynamic_secrets={include_dynamic_secrets}") + query_params.append( + query_serializer.serialize_query( + "form", False, "include_dynamic_secrets", include_dynamic_secrets + ) + ) if include_managed_secrets: - query_params.append(f"include_managed_secrets={include_managed_secrets}") + query_params.append( + query_serializer.serialize_query( + "form", False, "include_managed_secrets", include_managed_secrets + ) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): diff --git a/src/dopplersdk/services/service_accounts.py b/src/dopplersdk/services/service_accounts.py index 1106d5f..fcb2789 100644 --- a/src/dopplersdk/services/service_accounts.py +++ b/src/dopplersdk/services/service_accounts.py @@ -1,15 +1,30 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel -from ..models.CreateRequest import CreateRequest as CreateRequestModel -from ..models.CreateResponse import CreateResponse as CreateResponseModel -from ..models.GetResponse import GetResponse as GetResponseModel -from ..models.UpdateRequest import UpdateRequest as UpdateRequestModel -from ..models.UpdateResponse import UpdateResponse as UpdateResponseModel +from ..models.ServiceAccountsListResponse import ( + ServiceAccountsListResponse as ServiceAccountsListResponseModel, +) +from ..models.ServiceAccountsCreateRequest import ( + ServiceAccountsCreateRequest as ServiceAccountsCreateRequestModel, +) +from ..models.ServiceAccountsCreateResponse import ( + ServiceAccountsCreateResponse as ServiceAccountsCreateResponseModel, +) +from ..models.ServiceAccountsGetResponse import ( + ServiceAccountsGetResponse as ServiceAccountsGetResponseModel, +) +from ..models.ServiceAccountsUpdateRequest import ( + ServiceAccountsUpdateRequest as ServiceAccountsUpdateRequestModel, +) +from ..models.ServiceAccountsUpdateResponse import ( + ServiceAccountsUpdateResponse as ServiceAccountsUpdateResponseModel, +) class ServiceAccounts(BaseService): - def list(self, page: int = None, per_page: int = None) -> ListResponseModel: + def list( + self, page: int = None, per_page: int = None + ) -> ServiceAccountsListResponseModel: """ List Parameters: @@ -23,18 +38,24 @@ def list(self, page: int = None, per_page: int = None) -> ListResponseModel: query_params = [] self._add_required_headers(headers) if page: - query_params.append(f"page={page}") + query_params.append( + query_serializer.serialize_query("form", False, "page", page) + ) if per_page: - query_params.append(f"per_page={per_page}") + query_params.append( + query_serializer.serialize_query("form", False, "per_page", per_page) + ) final_url = self._url_prefix + url_endpoint if len(query_params) > 0: final_url += "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return ServiceAccountsListResponseModel(**res) return res - def create(self, request_input: CreateRequestModel = None) -> CreateResponseModel: + def create( + self, request_input: ServiceAccountsCreateRequestModel = None + ) -> ServiceAccountsCreateResponseModel: """ Create """ @@ -46,10 +67,10 @@ def create(self, request_input: CreateRequestModel = None) -> CreateResponseMode final_url = self._url_prefix + url_endpoint res = self._http.post(final_url, headers, request_input, True) if res and isinstance(res, dict): - return CreateResponseModel(**res) + return ServiceAccountsCreateResponseModel(**res) return res - def get(self, slug: str) -> GetResponseModel: + def get(self, slug: str) -> ServiceAccountsGetResponseModel: """ Retrieve Parameters: @@ -63,16 +84,19 @@ def get(self, slug: str) -> GetResponseModel: self._add_required_headers(headers) if not slug: raise ValueError("Parameter slug is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{slug}", quote(str(slug))) + url_endpoint = url_endpoint.replace( + "{slug}", + quote(str(query_serializer.serialize_path("simple", False, slug, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return GetResponseModel(**res) + return ServiceAccountsGetResponseModel(**res) return res def update( - self, slug: str, request_input: UpdateRequestModel = None - ) -> UpdateResponseModel: + self, slug: str, request_input: ServiceAccountsUpdateRequestModel = None + ) -> ServiceAccountsUpdateResponseModel: """ Update Parameters: @@ -86,11 +110,14 @@ def update( self._add_required_headers(headers) if not slug: raise ValueError("Parameter slug is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{slug}", quote(str(slug))) + url_endpoint = url_endpoint.replace( + "{slug}", + quote(str(query_serializer.serialize_path("simple", False, slug, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.patch(final_url, headers, request_input, True) if res and isinstance(res, dict): - return UpdateResponseModel(**res) + return ServiceAccountsUpdateResponseModel(**res) return res def delete(self, slug: str): @@ -107,7 +134,10 @@ def delete(self, slug: str): self._add_required_headers(headers) if not slug: raise ValueError("Parameter slug is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{slug}", quote(str(slug))) + url_endpoint = url_endpoint.replace( + "{slug}", + quote(str(query_serializer.serialize_path("simple", False, slug, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.delete(final_url, headers, True) return res diff --git a/src/dopplersdk/services/service_tokens.py b/src/dopplersdk/services/service_tokens.py index 4bcbc52..295dc6a 100644 --- a/src/dopplersdk/services/service_tokens.py +++ b/src/dopplersdk/services/service_tokens.py @@ -1,14 +1,23 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel -from ..models.CreateRequest import CreateRequest as CreateRequestModel -from ..models.CreateResponse import CreateResponse as CreateResponseModel -from ..models.DeleteRequest import DeleteRequest as DeleteRequestModel +from ..models.ServiceTokensListResponse import ( + ServiceTokensListResponse as ServiceTokensListResponseModel, +) +from ..models.ServiceTokensCreateRequest import ( + ServiceTokensCreateRequest as ServiceTokensCreateRequestModel, +) +from ..models.ServiceTokensCreateResponse import ( + ServiceTokensCreateResponse as ServiceTokensCreateResponseModel, +) +from ..models.ServiceTokensDeleteRequest import ( + ServiceTokensDeleteRequest as ServiceTokensDeleteRequestModel, +) from ..models.DeleteResponse import DeleteResponse as DeleteResponseModel class ServiceTokens(BaseService): - def list(self, config: str, project: str) -> ListResponseModel: + def list(self, config: str, project: str) -> ServiceTokensListResponseModel: """ List Parameters: @@ -25,17 +34,23 @@ def list(self, config: str, project: str) -> ListResponseModel: self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return ServiceTokensListResponseModel(**res) return res - def create(self, request_input: CreateRequestModel = None) -> CreateResponseModel: + def create( + self, request_input: ServiceTokensCreateRequestModel = None + ) -> ServiceTokensCreateResponseModel: """ Create """ @@ -47,10 +62,12 @@ def create(self, request_input: CreateRequestModel = None) -> CreateResponseMode final_url = self._url_prefix + url_endpoint res = self._http.post(final_url, headers, request_input, True) if res and isinstance(res, dict): - return CreateResponseModel(**res) + return ServiceTokensCreateResponseModel(**res) return res - def delete(self, request_input: DeleteRequestModel = None) -> DeleteResponseModel: + def delete( + self, request_input: ServiceTokensDeleteRequestModel = None + ) -> DeleteResponseModel: """ Delete """ diff --git a/src/dopplersdk/services/syncs.py b/src/dopplersdk/services/syncs.py index f6af25f..cedfc84 100644 --- a/src/dopplersdk/services/syncs.py +++ b/src/dopplersdk/services/syncs.py @@ -1,15 +1,16 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.CreateRequest import CreateRequest as CreateRequestModel -from ..models.CreateResponse import CreateResponse as CreateResponseModel -from ..models.GetResponse import GetResponse as GetResponseModel -from ..models.DeleteResponse import DeleteResponse as DeleteResponseModel +from ..models.SyncsCreateRequest import SyncsCreateRequest as SyncsCreateRequestModel +from ..models.SyncsCreateResponse import SyncsCreateResponse as SyncsCreateResponseModel +from ..models.SyncsGetResponse import SyncsGetResponse as SyncsGetResponseModel +from ..models.SyncsDeleteResponse import SyncsDeleteResponse as SyncsDeleteResponseModel class Syncs(BaseService): def create( - self, config: str, project: str, request_input: CreateRequestModel = None - ) -> CreateResponseModel: + self, config: str, project: str, request_input: SyncsCreateRequestModel = None + ) -> SyncsCreateResponseModel: """ Create Parameters: @@ -26,17 +27,21 @@ def create( self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.post(final_url, headers, request_input, True) if res and isinstance(res, dict): - return CreateResponseModel(**res) + return SyncsCreateResponseModel(**res) return res - def get(self, sync: str, config: str, project: str) -> GetResponseModel: + def get(self, sync: str, config: str, project: str) -> SyncsGetResponseModel: """ Retrieve Parameters: @@ -55,22 +60,28 @@ def get(self, sync: str, config: str, project: str) -> GetResponseModel: self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) if not sync: raise ValueError("Parameter sync is required, cannot be empty or blank.") - query_params.append(f"sync={sync}") + query_params.append( + query_serializer.serialize_query("form", False, "sync", sync) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return GetResponseModel(**res) + return SyncsGetResponseModel(**res) return res def delete( self, delete_from_target: bool, sync: str, config: str, project: str - ) -> DeleteResponseModel: + ) -> SyncsDeleteResponseModel: """ Delete Parameters: @@ -91,20 +102,30 @@ def delete( self._add_required_headers(headers) if not project: raise ValueError("Parameter project is required, cannot be empty or blank.") - query_params.append(f"project={project}") + query_params.append( + query_serializer.serialize_query("form", False, "project", project) + ) if not config: raise ValueError("Parameter config is required, cannot be empty or blank.") - query_params.append(f"config={config}") + query_params.append( + query_serializer.serialize_query("form", False, "config", config) + ) if not sync: raise ValueError("Parameter sync is required, cannot be empty or blank.") - query_params.append(f"sync={sync}") + query_params.append( + query_serializer.serialize_query("form", False, "sync", sync) + ) if not delete_from_target: raise ValueError( "Parameter delete_from_target is required, cannot be empty or blank." ) - query_params.append(f"delete_from_target={delete_from_target}") + query_params.append( + query_serializer.serialize_query( + "form", False, "delete_from_target", delete_from_target + ) + ) final_url = self._url_prefix + url_endpoint + "?" + "&".join(query_params) res = self._http.delete(final_url, headers, True) if res and isinstance(res, dict): - return DeleteResponseModel(**res) + return SyncsDeleteResponseModel(**res) return res diff --git a/src/dopplersdk/services/v_3.py b/src/dopplersdk/services/v_3.py index 1607e5e..7573a0f 100644 --- a/src/dopplersdk/services/v_3.py +++ b/src/dopplersdk/services/v_3.py @@ -1,4 +1,5 @@ from urllib.parse import quote + from .base import BaseService from ..models.MeResponse import MeResponse as MeResponseModel diff --git a/src/dopplersdk/services/workplace_roles.py b/src/dopplersdk/services/workplace_roles.py index 13349fa..bfa213a 100644 --- a/src/dopplersdk/services/workplace_roles.py +++ b/src/dopplersdk/services/workplace_roles.py @@ -1,16 +1,25 @@ from urllib.parse import quote +from ..net import query_serializer from .base import BaseService -from ..models.ListResponse import ListResponse as ListResponseModel -from ..models.CreateResponse import CreateResponse as CreateResponseModel +from ..models.WorkplaceRolesListResponse import ( + WorkplaceRolesListResponse as WorkplaceRolesListResponseModel, +) +from ..models.WorkplaceRolesCreateResponse import ( + WorkplaceRolesCreateResponse as WorkplaceRolesCreateResponseModel, +) from ..models.ListPermissionsResponse import ( ListPermissionsResponse as ListPermissionsResponseModel, ) -from ..models.GetResponse import GetResponse as GetResponseModel -from ..models.UpdateResponse import UpdateResponse as UpdateResponseModel +from ..models.WorkplaceRolesGetResponse import ( + WorkplaceRolesGetResponse as WorkplaceRolesGetResponseModel, +) +from ..models.WorkplaceRolesUpdateResponse import ( + WorkplaceRolesUpdateResponse as WorkplaceRolesUpdateResponseModel, +) class WorkplaceRoles(BaseService): - def list(self) -> ListResponseModel: + def list(self) -> WorkplaceRolesListResponseModel: """ List """ @@ -22,10 +31,10 @@ def list(self) -> ListResponseModel: final_url = self._url_prefix + url_endpoint res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return ListResponseModel(**res) + return WorkplaceRolesListResponseModel(**res) return res - def create(self) -> CreateResponseModel: + def create(self) -> WorkplaceRolesCreateResponseModel: """ Create """ @@ -37,7 +46,7 @@ def create(self) -> CreateResponseModel: final_url = self._url_prefix + url_endpoint res = self._http.post(final_url, headers, {}, True) if res and isinstance(res, dict): - return CreateResponseModel(**res) + return WorkplaceRolesCreateResponseModel(**res) return res def list_permissions(self) -> ListPermissionsResponseModel: @@ -55,7 +64,7 @@ def list_permissions(self) -> ListPermissionsResponseModel: return ListPermissionsResponseModel(**res) return res - def get(self, role: str) -> GetResponseModel: + def get(self, role: str) -> WorkplaceRolesGetResponseModel: """ Retrieve Parameters: @@ -69,14 +78,17 @@ def get(self, role: str) -> GetResponseModel: self._add_required_headers(headers) if not role: raise ValueError("Parameter role is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{role}", quote(str(role))) + url_endpoint = url_endpoint.replace( + "{role}", + quote(str(query_serializer.serialize_path("simple", False, role, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.get(final_url, headers, True) if res and isinstance(res, dict): - return GetResponseModel(**res) + return WorkplaceRolesGetResponseModel(**res) return res - def update(self, role: str) -> UpdateResponseModel: + def update(self, role: str) -> WorkplaceRolesUpdateResponseModel: """ Update Parameters: @@ -90,11 +102,14 @@ def update(self, role: str) -> UpdateResponseModel: self._add_required_headers(headers) if not role: raise ValueError("Parameter role is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{role}", quote(str(role))) + url_endpoint = url_endpoint.replace( + "{role}", + quote(str(query_serializer.serialize_path("simple", False, role, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.patch(final_url, headers, {}, True) if res and isinstance(res, dict): - return UpdateResponseModel(**res) + return WorkplaceRolesUpdateResponseModel(**res) return res def delete(self, role: str): @@ -111,7 +126,10 @@ def delete(self, role: str): self._add_required_headers(headers) if not role: raise ValueError("Parameter role is required, cannot be empty or blank.") - url_endpoint = url_endpoint.replace("{role}", quote(str(role))) + url_endpoint = url_endpoint.replace( + "{role}", + quote(str(query_serializer.serialize_path("simple", False, role, None))), + ) final_url = self._url_prefix + url_endpoint res = self._http.delete(final_url, headers, True) return res diff --git a/src/dopplersdk/setup.py b/src/dopplersdk/setup.py index 9bbbdd6..a8ec55d 100644 --- a/src/dopplersdk/setup.py +++ b/src/dopplersdk/setup.py @@ -2,6 +2,6 @@ setuptools.setup( name="DopplerSDK", - version="1.1.1", + version="1.1.2", packages=setuptools.find_packages(), ) diff --git a/test/models/test_activity_logs_list_response.py b/test/models/test_activity_logs_list_response.py new file mode 100644 index 0000000..9157fab --- /dev/null +++ b/test/models/test_activity_logs_list_response.py @@ -0,0 +1,17 @@ +import unittest +from src.dopplersdk.models.ActivityLogsListResponse import ActivityLogsListResponse + + +class TestActivityLogsListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_activity_logs_list_response(self): + # Create ActivityLogsListResponse class instance + test_model = ActivityLogsListResponse(page=2, logs=["itaque", "amet"]) + self.assertEqual(test_model.page, 2) + self.assertEqual(test_model.logs, ["itaque", "amet"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_add_member_request.py b/test/models/test_add_member_request.py index b72d48c..fd48139 100644 --- a/test/models/test_add_member_request.py +++ b/test/models/test_add_member_request.py @@ -8,9 +8,9 @@ def test_true(self): def test_add_member_request(self): # Create AddMemberRequest class instance - test_model = AddMemberRequest(type_="workplace_user", slug="blanditiis") + test_model = AddMemberRequest(type_="workplace_user", slug="repellendus") self.assertEqual(test_model.type_, "workplace_user") - self.assertEqual(test_model.slug, "blanditiis") + self.assertEqual(test_model.slug, "repellendus") def test_add_member_request_required_fields_missing(self): # Assert AddMemberRequest class generation fails without required fields diff --git a/test/models/test_add_request.py b/test/models/test_add_request.py index f743f61..dac4e48 100644 --- a/test/models/test_add_request.py +++ b/test/models/test_add_request.py @@ -10,14 +10,14 @@ def test_add_request(self): # Create AddRequest class instance test_model = AddRequest( type_="workplace_user", - slug="id", - role="at", - environments=["voluptatibus", "dolore"], + slug="saepe", + role="ad", + environments=["natus", "molestias"], ) self.assertEqual(test_model.type_, "workplace_user") - self.assertEqual(test_model.slug, "id") - self.assertEqual(test_model.role, "at") - self.assertEqual(test_model.environments, ["voluptatibus", "dolore"]) + self.assertEqual(test_model.slug, "saepe") + self.assertEqual(test_model.role, "ad") + self.assertEqual(test_model.environments, ["natus", "molestias"]) def test_add_request_required_fields_missing(self): # Assert AddRequest class generation fails without required fields diff --git a/test/models/test_add_response.py b/test/models/test_add_response.py index d1f7e36..a669145 100644 --- a/test/models/test_add_response.py +++ b/test/models/test_add_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_add_response(self): # Create AddResponse class instance - test_model = AddResponse(member={"aliquid": 7}) - self.assertEqual(test_model.member, {"aliquid": 7}) + test_model = AddResponse(member={"animi": 2}) + self.assertEqual(test_model.member, {"animi": 2}) if __name__ == "__main__": diff --git a/test/models/test_add_trusted_ip_request.py b/test/models/test_add_trusted_ip_request.py new file mode 100644 index 0000000..8df0069 --- /dev/null +++ b/test/models/test_add_trusted_ip_request.py @@ -0,0 +1,21 @@ +import unittest +from src.dopplersdk.models.AddTrustedIpRequest import AddTrustedIpRequest + + +class TestAddTrustedIpRequestModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_add_trusted_ip_request(self): + # Create AddTrustedIpRequest class instance + test_model = AddTrustedIpRequest(ip="recusandae") + self.assertEqual(test_model.ip, "recusandae") + + def test_add_trusted_ip_request_required_fields_missing(self): + # Assert AddTrustedIpRequest class generation fails without required fields + with self.assertRaises(TypeError): + test_model = AddTrustedIpRequest() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_add_trusted_ip_response.py b/test/models/test_add_trusted_ip_response.py new file mode 100644 index 0000000..d277979 --- /dev/null +++ b/test/models/test_add_trusted_ip_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.AddTrustedIpResponse import AddTrustedIpResponse + + +class TestAddTrustedIpResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_add_trusted_ip_response(self): + # Create AddTrustedIpResponse class instance + test_model = AddTrustedIpResponse(ip="ab") + self.assertEqual(test_model.ip, "ab") + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_clone_request.py b/test/models/test_clone_request.py index ad2e719..4c73e4d 100644 --- a/test/models/test_clone_request.py +++ b/test/models/test_clone_request.py @@ -8,10 +8,10 @@ def test_true(self): def test_clone_request(self): # Create CloneRequest class instance - test_model = CloneRequest(name="libero", config="tempore", project="earum") - self.assertEqual(test_model.name, "libero") - self.assertEqual(test_model.config, "tempore") - self.assertEqual(test_model.project, "earum") + test_model = CloneRequest(name="nam", config="nihil", project="eligendi") + self.assertEqual(test_model.name, "nam") + self.assertEqual(test_model.config, "nihil") + self.assertEqual(test_model.project, "eligendi") def test_clone_request_required_fields_missing(self): # Assert CloneRequest class generation fails without required fields diff --git a/test/models/test_clone_response.py b/test/models/test_clone_response.py index 2c4a08a..58208be 100644 --- a/test/models/test_clone_response.py +++ b/test/models/test_clone_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_clone_response(self): # Create CloneResponse class instance - test_model = CloneResponse(config={"suscipit": 6}) - self.assertEqual(test_model.config, {"suscipit": 6}) + test_model = CloneResponse(config={"officiis": 6}) + self.assertEqual(test_model.config, {"officiis": 6}) if __name__ == "__main__": diff --git a/test/models/test_config_logs_get_response.py b/test/models/test_config_logs_get_response.py new file mode 100644 index 0000000..0512162 --- /dev/null +++ b/test/models/test_config_logs_get_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ConfigLogsGetResponse import ConfigLogsGetResponse + + +class TestConfigLogsGetResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_config_logs_get_response(self): + # Create ConfigLogsGetResponse class instance + test_model = ConfigLogsGetResponse(log={"quae": 8}) + self.assertEqual(test_model.log, {"quae": 8}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_config_logs_list_response.py b/test/models/test_config_logs_list_response.py new file mode 100644 index 0000000..61d3f81 --- /dev/null +++ b/test/models/test_config_logs_list_response.py @@ -0,0 +1,19 @@ +import unittest +from src.dopplersdk.models.ConfigLogsListResponse import ConfigLogsListResponse + + +class TestConfigLogsListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_config_logs_list_response(self): + # Create ConfigLogsListResponse class instance + test_model = ConfigLogsListResponse( + page=5, logs=["reprehenderit", "cupiditate"] + ) + self.assertEqual(test_model.page, 5) + self.assertEqual(test_model.logs, ["reprehenderit", "cupiditate"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_configs_create_request.py b/test/models/test_configs_create_request.py index 6641a48..a3002f1 100644 --- a/test/models/test_configs_create_request.py +++ b/test/models/test_configs_create_request.py @@ -9,11 +9,11 @@ def test_true(self): def test_configs_create_request(self): # Create ConfigsCreateRequest class instance test_model = ConfigsCreateRequest( - name="dolor", environment="mollitia", project="cum" + name="suscipit", environment="soluta", project="quas" ) - self.assertEqual(test_model.name, "dolor") - self.assertEqual(test_model.environment, "mollitia") - self.assertEqual(test_model.project, "cum") + self.assertEqual(test_model.name, "suscipit") + self.assertEqual(test_model.environment, "soluta") + self.assertEqual(test_model.project, "quas") def test_configs_create_request_required_fields_missing(self): # Assert ConfigsCreateRequest class generation fails without required fields diff --git a/test/models/test_configs_create_response.py b/test/models/test_configs_create_response.py new file mode 100644 index 0000000..8ed92f3 --- /dev/null +++ b/test/models/test_configs_create_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ConfigsCreateResponse import ConfigsCreateResponse + + +class TestConfigsCreateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_configs_create_response(self): + # Create ConfigsCreateResponse class instance + test_model = ConfigsCreateResponse(config={"odio": 5}) + self.assertEqual(test_model.config, {"odio": 5}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_configs_delete_request.py b/test/models/test_configs_delete_request.py index 2814b01..8e998dd 100644 --- a/test/models/test_configs_delete_request.py +++ b/test/models/test_configs_delete_request.py @@ -8,9 +8,9 @@ def test_true(self): def test_configs_delete_request(self): # Create ConfigsDeleteRequest class instance - test_model = ConfigsDeleteRequest(config="odio", project="veniam") - self.assertEqual(test_model.config, "odio") - self.assertEqual(test_model.project, "veniam") + test_model = ConfigsDeleteRequest(config="omnis", project="modi") + self.assertEqual(test_model.config, "omnis") + self.assertEqual(test_model.project, "modi") def test_configs_delete_request_required_fields_missing(self): # Assert ConfigsDeleteRequest class generation fails without required fields diff --git a/test/models/test_configs_get_response.py b/test/models/test_configs_get_response.py new file mode 100644 index 0000000..486bf84 --- /dev/null +++ b/test/models/test_configs_get_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ConfigsGetResponse import ConfigsGetResponse + + +class TestConfigsGetResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_configs_get_response(self): + # Create ConfigsGetResponse class instance + test_model = ConfigsGetResponse(config={"deleniti": 5}) + self.assertEqual(test_model.config, {"deleniti": 5}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_configs_list_response.py b/test/models/test_configs_list_response.py new file mode 100644 index 0000000..963cc06 --- /dev/null +++ b/test/models/test_configs_list_response.py @@ -0,0 +1,17 @@ +import unittest +from src.dopplersdk.models.ConfigsListResponse import ConfigsListResponse + + +class TestConfigsListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_configs_list_response(self): + # Create ConfigsListResponse class instance + test_model = ConfigsListResponse(page=5, configs=["facilis", "suscipit"]) + self.assertEqual(test_model.page, 5) + self.assertEqual(test_model.configs, ["facilis", "suscipit"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_configs_update_request.py b/test/models/test_configs_update_request.py index 290174a..0adc8ad 100644 --- a/test/models/test_configs_update_request.py +++ b/test/models/test_configs_update_request.py @@ -9,11 +9,11 @@ def test_true(self): def test_configs_update_request(self): # Create ConfigsUpdateRequest class instance test_model = ConfigsUpdateRequest( - name="numquam", config="officia", project="quod" + name="temporibus", config="et", project="ipsam" ) - self.assertEqual(test_model.name, "numquam") - self.assertEqual(test_model.config, "officia") - self.assertEqual(test_model.project, "quod") + self.assertEqual(test_model.name, "temporibus") + self.assertEqual(test_model.config, "et") + self.assertEqual(test_model.project, "ipsam") def test_configs_update_request_required_fields_missing(self): # Assert ConfigsUpdateRequest class generation fails without required fields diff --git a/test/models/test_configs_update_response.py b/test/models/test_configs_update_response.py new file mode 100644 index 0000000..27ac380 --- /dev/null +++ b/test/models/test_configs_update_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ConfigsUpdateResponse import ConfigsUpdateResponse + + +class TestConfigsUpdateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_configs_update_response(self): + # Create ConfigsUpdateResponse class instance + test_model = ConfigsUpdateResponse(config={"eligendi": 9}) + self.assertEqual(test_model.config, {"eligendi": 9}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_create_request.py b/test/models/test_create_request.py index bb029a7..86b03ca 100644 --- a/test/models/test_create_request.py +++ b/test/models/test_create_request.py @@ -8,9 +8,9 @@ def test_true(self): def test_create_request(self): # Create CreateRequest class instance - test_model = CreateRequest(name="explicabo", default_project_role="eveniet") - self.assertEqual(test_model.name, "explicabo") - self.assertEqual(test_model.default_project_role, "eveniet") + test_model = CreateRequest(name="molestias", description="porro") + self.assertEqual(test_model.name, "molestias") + self.assertEqual(test_model.description, "porro") def test_create_request_required_fields_missing(self): # Assert CreateRequest class generation fails without required fields diff --git a/test/models/test_create_response.py b/test/models/test_create_response.py index 6db16c2..cccd8db 100644 --- a/test/models/test_create_response.py +++ b/test/models/test_create_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_create_response(self): # Create CreateResponse class instance - test_model = CreateResponse(group={"eveniet": 8}) - self.assertEqual(test_model.group, {"eveniet": 8}) + test_model = CreateResponse(project={"dolorem": 5}) + self.assertEqual(test_model.project, {"dolorem": 5}) if __name__ == "__main__": diff --git a/test/models/test_delete_request.py b/test/models/test_delete_request.py index 7091d5f..341a3bf 100644 --- a/test/models/test_delete_request.py +++ b/test/models/test_delete_request.py @@ -8,8 +8,8 @@ def test_true(self): def test_delete_request(self): # Create DeleteRequest class instance - test_model = DeleteRequest(ip="porro") - self.assertEqual(test_model.ip, "porro") + test_model = DeleteRequest(project="minima") + self.assertEqual(test_model.project, "minima") def test_delete_request_required_fields_missing(self): # Assert DeleteRequest class generation fails without required fields diff --git a/test/models/test_delete_response.py b/test/models/test_delete_response.py index c172a97..e311a9b 100644 --- a/test/models/test_delete_response.py +++ b/test/models/test_delete_response.py @@ -8,7 +8,8 @@ def test_true(self): def test_delete_response(self): # Create DeleteResponse class instance - test_model = DeleteResponse() + test_model = DeleteResponse(success=True) + self.assertEqual(test_model.success, True) if __name__ == "__main__": diff --git a/test/models/test_delete_trusted_ip_request.py b/test/models/test_delete_trusted_ip_request.py new file mode 100644 index 0000000..9fcc305 --- /dev/null +++ b/test/models/test_delete_trusted_ip_request.py @@ -0,0 +1,21 @@ +import unittest +from src.dopplersdk.models.DeleteTrustedIpRequest import DeleteTrustedIpRequest + + +class TestDeleteTrustedIpRequestModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_delete_trusted_ip_request(self): + # Create DeleteTrustedIpRequest class instance + test_model = DeleteTrustedIpRequest(ip="exercitationem") + self.assertEqual(test_model.ip, "exercitationem") + + def test_delete_trusted_ip_request_required_fields_missing(self): + # Assert DeleteTrustedIpRequest class generation fails without required fields + with self.assertRaises(TypeError): + test_model = DeleteTrustedIpRequest() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_download_response.py b/test/models/test_download_response.py index c24ce55..7d20f00 100644 --- a/test/models/test_download_response.py +++ b/test/models/test_download_response.py @@ -9,12 +9,12 @@ def test_true(self): def test_download_response(self): # Create DownloadResponse class instance test_model = DownloadResponse( - STRIPE="commodi", ALGOLIA="repellat", DATABASE="laborum", USER="error" + STRIPE="fugit", ALGOLIA="ut", DATABASE="aliquam", USER="voluptatum" ) - self.assertEqual(test_model.STRIPE, "commodi") - self.assertEqual(test_model.ALGOLIA, "repellat") - self.assertEqual(test_model.DATABASE, "laborum") - self.assertEqual(test_model.USER, "error") + self.assertEqual(test_model.STRIPE, "fugit") + self.assertEqual(test_model.ALGOLIA, "ut") + self.assertEqual(test_model.DATABASE, "aliquam") + self.assertEqual(test_model.USER, "voluptatum") if __name__ == "__main__": diff --git a/test/models/test_environments_create_request.py b/test/models/test_environments_create_request.py index 14ef97a..552876a 100644 --- a/test/models/test_environments_create_request.py +++ b/test/models/test_environments_create_request.py @@ -8,9 +8,9 @@ def test_true(self): def test_environments_create_request(self): # Create EnvironmentsCreateRequest class instance - test_model = EnvironmentsCreateRequest(slug="placeat", name="placeat") - self.assertEqual(test_model.slug, "placeat") - self.assertEqual(test_model.name, "placeat") + test_model = EnvironmentsCreateRequest(slug="voluptas", name="alias") + self.assertEqual(test_model.slug, "voluptas") + self.assertEqual(test_model.name, "alias") def test_environments_create_request_required_fields_missing(self): # Assert EnvironmentsCreateRequest class generation fails without required fields diff --git a/test/models/test_environments_create_response.py b/test/models/test_environments_create_response.py new file mode 100644 index 0000000..42cb787 --- /dev/null +++ b/test/models/test_environments_create_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.EnvironmentsCreateResponse import EnvironmentsCreateResponse + + +class TestEnvironmentsCreateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_environments_create_response(self): + # Create EnvironmentsCreateResponse class instance + test_model = EnvironmentsCreateResponse(environment={"nostrum": 8}) + self.assertEqual(test_model.environment, {"nostrum": 8}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_environments_get_response.py b/test/models/test_environments_get_response.py new file mode 100644 index 0000000..9bdb30c --- /dev/null +++ b/test/models/test_environments_get_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.EnvironmentsGetResponse import EnvironmentsGetResponse + + +class TestEnvironmentsGetResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_environments_get_response(self): + # Create EnvironmentsGetResponse class instance + test_model = EnvironmentsGetResponse(environment={"quibusdam": 9}) + self.assertEqual(test_model.environment, {"quibusdam": 9}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_environments_list_response.py b/test/models/test_environments_list_response.py new file mode 100644 index 0000000..daa6a3a --- /dev/null +++ b/test/models/test_environments_list_response.py @@ -0,0 +1,19 @@ +import unittest +from src.dopplersdk.models.EnvironmentsListResponse import EnvironmentsListResponse + + +class TestEnvironmentsListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_environments_list_response(self): + # Create EnvironmentsListResponse class instance + test_model = EnvironmentsListResponse( + environments=["tempora", "blanditiis"], page=9 + ) + self.assertEqual(test_model.environments, ["tempora", "blanditiis"]) + self.assertEqual(test_model.page, 9) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_get_response.py b/test/models/test_get_response.py index e16e453..48aa541 100644 --- a/test/models/test_get_response.py +++ b/test/models/test_get_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_get_response(self): # Create GetResponse class instance - test_model = GetResponse(group={"odio": 9}) - self.assertEqual(test_model.group, {"odio": 9}) + test_model = GetResponse(project={"voluptate": 2}) + self.assertEqual(test_model.project, {"voluptate": 2}) if __name__ == "__main__": diff --git a/test/models/test_groups_create_request.py b/test/models/test_groups_create_request.py new file mode 100644 index 0000000..6cac3ad --- /dev/null +++ b/test/models/test_groups_create_request.py @@ -0,0 +1,24 @@ +import unittest +from src.dopplersdk.models.GroupsCreateRequest import GroupsCreateRequest + + +class TestGroupsCreateRequestModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_groups_create_request(self): + # Create GroupsCreateRequest class instance + test_model = GroupsCreateRequest( + name="aspernatur", default_project_role="explicabo" + ) + self.assertEqual(test_model.name, "aspernatur") + self.assertEqual(test_model.default_project_role, "explicabo") + + def test_groups_create_request_required_fields_missing(self): + # Assert GroupsCreateRequest class generation fails without required fields + with self.assertRaises(TypeError): + test_model = GroupsCreateRequest() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_groups_create_response.py b/test/models/test_groups_create_response.py new file mode 100644 index 0000000..f04f657 --- /dev/null +++ b/test/models/test_groups_create_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.GroupsCreateResponse import GroupsCreateResponse + + +class TestGroupsCreateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_groups_create_response(self): + # Create GroupsCreateResponse class instance + test_model = GroupsCreateResponse(group={"dolores": 9}) + self.assertEqual(test_model.group, {"dolores": 9}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_groups_get_response.py b/test/models/test_groups_get_response.py new file mode 100644 index 0000000..0984001 --- /dev/null +++ b/test/models/test_groups_get_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.GroupsGetResponse import GroupsGetResponse + + +class TestGroupsGetResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_groups_get_response(self): + # Create GroupsGetResponse class instance + test_model = GroupsGetResponse(group={"tempora": 4}) + self.assertEqual(test_model.group, {"tempora": 4}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_groups_list_response.py b/test/models/test_groups_list_response.py new file mode 100644 index 0000000..58e1167 --- /dev/null +++ b/test/models/test_groups_list_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.GroupsListResponse import GroupsListResponse + + +class TestGroupsListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_groups_list_response(self): + # Create GroupsListResponse class instance + test_model = GroupsListResponse(groups=["commodi", "ea"]) + self.assertEqual(test_model.groups, ["commodi", "ea"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_groups_update_request.py b/test/models/test_groups_update_request.py new file mode 100644 index 0000000..63e0be5 --- /dev/null +++ b/test/models/test_groups_update_request.py @@ -0,0 +1,17 @@ +import unittest +from src.dopplersdk.models.GroupsUpdateRequest import GroupsUpdateRequest + + +class TestGroupsUpdateRequestModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_groups_update_request(self): + # Create GroupsUpdateRequest class instance + test_model = GroupsUpdateRequest(name="magnam", default_project_role="quis") + self.assertEqual(test_model.name, "magnam") + self.assertEqual(test_model.default_project_role, "quis") + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_groups_update_response.py b/test/models/test_groups_update_response.py new file mode 100644 index 0000000..feecdef --- /dev/null +++ b/test/models/test_groups_update_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.GroupsUpdateResponse import GroupsUpdateResponse + + +class TestGroupsUpdateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_groups_update_response(self): + # Create GroupsUpdateResponse class instance + test_model = GroupsUpdateResponse(group={"a": 2}) + self.assertEqual(test_model.group, {"a": 2}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_integrations_create_request.py b/test/models/test_integrations_create_request.py index 3900dd8..4953049 100644 --- a/test/models/test_integrations_create_request.py +++ b/test/models/test_integrations_create_request.py @@ -9,11 +9,11 @@ def test_true(self): def test_integrations_create_request(self): # Create IntegrationsCreateRequest class instance test_model = IntegrationsCreateRequest( - name="fuga", type_="provident", data={"beatae": 6} + type_="officia", name="quibusdam", data={"dolores": 8} ) - self.assertEqual(test_model.name, "fuga") - self.assertEqual(test_model.type_, "provident") - self.assertEqual(test_model.data, {"beatae": 6}) + self.assertEqual(test_model.type_, "officia") + self.assertEqual(test_model.name, "quibusdam") + self.assertEqual(test_model.data, {"dolores": 8}) def test_integrations_create_request_required_fields_missing(self): # Assert IntegrationsCreateRequest class generation fails without required fields diff --git a/test/models/test_integrations_create_response.py b/test/models/test_integrations_create_response.py new file mode 100644 index 0000000..ef94ef3 --- /dev/null +++ b/test/models/test_integrations_create_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.IntegrationsCreateResponse import IntegrationsCreateResponse + + +class TestIntegrationsCreateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_integrations_create_response(self): + # Create IntegrationsCreateResponse class instance + test_model = IntegrationsCreateResponse(integration={"deserunt": 7}) + self.assertEqual(test_model.integration, {"deserunt": 7}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_integrations_delete_response.py b/test/models/test_integrations_delete_response.py new file mode 100644 index 0000000..d1d3a81 --- /dev/null +++ b/test/models/test_integrations_delete_response.py @@ -0,0 +1,15 @@ +import unittest +from src.dopplersdk.models.IntegrationsDeleteResponse import IntegrationsDeleteResponse + + +class TestIntegrationsDeleteResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_integrations_delete_response(self): + # Create IntegrationsDeleteResponse class instance + test_model = IntegrationsDeleteResponse() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_integrations_get_response.py b/test/models/test_integrations_get_response.py new file mode 100644 index 0000000..a102d5c --- /dev/null +++ b/test/models/test_integrations_get_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.IntegrationsGetResponse import IntegrationsGetResponse + + +class TestIntegrationsGetResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_integrations_get_response(self): + # Create IntegrationsGetResponse class instance + test_model = IntegrationsGetResponse(integration={"similique": 3}) + self.assertEqual(test_model.integration, {"similique": 3}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_integrations_list_response.py b/test/models/test_integrations_list_response.py new file mode 100644 index 0000000..139557b --- /dev/null +++ b/test/models/test_integrations_list_response.py @@ -0,0 +1,19 @@ +import unittest +from src.dopplersdk.models.IntegrationsListResponse import IntegrationsListResponse + + +class TestIntegrationsListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_integrations_list_response(self): + # Create IntegrationsListResponse class instance + test_model = IntegrationsListResponse( + integrations=["optio", "porro"], success=True + ) + self.assertEqual(test_model.integrations, ["optio", "porro"]) + self.assertEqual(test_model.success, True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_integrations_update_request.py b/test/models/test_integrations_update_request.py index 8ea3a4a..e8e8f99 100644 --- a/test/models/test_integrations_update_request.py +++ b/test/models/test_integrations_update_request.py @@ -8,9 +8,9 @@ def test_true(self): def test_integrations_update_request(self): # Create IntegrationsUpdateRequest class instance - test_model = IntegrationsUpdateRequest(name="dolore", data="incidunt") - self.assertEqual(test_model.name, "dolore") - self.assertEqual(test_model.data, "incidunt") + test_model = IntegrationsUpdateRequest(name="quis", data="reiciendis") + self.assertEqual(test_model.name, "quis") + self.assertEqual(test_model.data, "reiciendis") if __name__ == "__main__": diff --git a/test/models/test_integrations_update_response.py b/test/models/test_integrations_update_response.py new file mode 100644 index 0000000..66057ec --- /dev/null +++ b/test/models/test_integrations_update_response.py @@ -0,0 +1,15 @@ +import unittest +from src.dopplersdk.models.IntegrationsUpdateResponse import IntegrationsUpdateResponse + + +class TestIntegrationsUpdateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_integrations_update_response(self): + # Create IntegrationsUpdateResponse class instance + test_model = IntegrationsUpdateResponse() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_invites_list_response.py b/test/models/test_invites_list_response.py new file mode 100644 index 0000000..ed977fc --- /dev/null +++ b/test/models/test_invites_list_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.InvitesListResponse import InvitesListResponse + + +class TestInvitesListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_invites_list_response(self): + # Create InvitesListResponse class instance + test_model = InvitesListResponse(invites=["error", "nemo"]) + self.assertEqual(test_model.invites, ["error", "nemo"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_issue_lease_request.py b/test/models/test_issue_lease_request.py index 5eeb574..86b157e 100644 --- a/test/models/test_issue_lease_request.py +++ b/test/models/test_issue_lease_request.py @@ -9,12 +9,12 @@ def test_true(self): def test_issue_lease_request(self): # Create IssueLeaseRequest class instance test_model = IssueLeaseRequest( - ttl_sec=8, dynamic_secret="consequuntur", config="nihil", project="sequi" + ttl_sec=9, dynamic_secret="incidunt", config="corporis", project="deleniti" ) - self.assertEqual(test_model.ttl_sec, 8) - self.assertEqual(test_model.dynamic_secret, "consequuntur") - self.assertEqual(test_model.config, "nihil") - self.assertEqual(test_model.project, "sequi") + self.assertEqual(test_model.ttl_sec, 9) + self.assertEqual(test_model.dynamic_secret, "incidunt") + self.assertEqual(test_model.config, "corporis") + self.assertEqual(test_model.project, "deleniti") def test_issue_lease_request_required_fields_missing(self): # Assert IssueLeaseRequest class generation fails without required fields diff --git a/test/models/test_issue_lease_response.py b/test/models/test_issue_lease_response.py index dbaee32..0bfd994 100644 --- a/test/models/test_issue_lease_response.py +++ b/test/models/test_issue_lease_response.py @@ -9,12 +9,12 @@ def test_true(self): def test_issue_lease_response(self): # Create IssueLeaseResponse class instance test_model = IssueLeaseResponse( - success=True, id="magni", expires_at="cum", value={"nemo": 1} + success=True, id="similique", expires_at="cupiditate", value={"ullam": 1} ) self.assertEqual(test_model.success, True) - self.assertEqual(test_model.id, "magni") - self.assertEqual(test_model.expires_at, "cum") - self.assertEqual(test_model.value, {"nemo": 1}) + self.assertEqual(test_model.id, "similique") + self.assertEqual(test_model.expires_at, "cupiditate") + self.assertEqual(test_model.value, {"ullam": 1}) if __name__ == "__main__": diff --git a/test/models/test_list_permissions_response.py b/test/models/test_list_permissions_response.py index 12f1207..0a67575 100644 --- a/test/models/test_list_permissions_response.py +++ b/test/models/test_list_permissions_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_list_permissions_response(self): # Create ListPermissionsResponse class instance - test_model = ListPermissionsResponse(permissions=["libero", "officiis"]) - self.assertEqual(test_model.permissions, ["libero", "officiis"]) + test_model = ListPermissionsResponse(permissions=["provident", "eum"]) + self.assertEqual(test_model.permissions, ["provident", "eum"]) if __name__ == "__main__": diff --git a/test/models/test_list_response.py b/test/models/test_list_response.py index 8b6441a..e2b863f 100644 --- a/test/models/test_list_response.py +++ b/test/models/test_list_response.py @@ -8,8 +8,9 @@ def test_true(self): def test_list_response(self): # Create ListResponse class instance - test_model = ListResponse(groups=["a", "asperiores"]) - self.assertEqual(test_model.groups, ["a", "asperiores"]) + test_model = ListResponse(page=4, projects=["ipsum", "ab"]) + self.assertEqual(test_model.page, 4) + self.assertEqual(test_model.projects, ["ipsum", "ab"]) if __name__ == "__main__": diff --git a/test/models/test_list_trusted_ips_response.py b/test/models/test_list_trusted_ips_response.py new file mode 100644 index 0000000..cd29e27 --- /dev/null +++ b/test/models/test_list_trusted_ips_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ListTrustedIpsResponse import ListTrustedIpsResponse + + +class TestListTrustedIpsResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_list_trusted_ips_response(self): + # Create ListTrustedIpsResponse class instance + test_model = ListTrustedIpsResponse(ips=["maiores", "ducimus"]) + self.assertEqual(test_model.ips, ["maiores", "ducimus"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_lock_request.py b/test/models/test_lock_request.py index 98f676e..bf23ef5 100644 --- a/test/models/test_lock_request.py +++ b/test/models/test_lock_request.py @@ -8,9 +8,9 @@ def test_true(self): def test_lock_request(self): # Create LockRequest class instance - test_model = LockRequest(config="atque", project="magni") - self.assertEqual(test_model.config, "atque") - self.assertEqual(test_model.project, "magni") + test_model = LockRequest(config="eligendi", project="error") + self.assertEqual(test_model.config, "eligendi") + self.assertEqual(test_model.project, "error") def test_lock_request_required_fields_missing(self): # Assert LockRequest class generation fails without required fields diff --git a/test/models/test_lock_response.py b/test/models/test_lock_response.py index 0d46212..b076ec9 100644 --- a/test/models/test_lock_response.py +++ b/test/models/test_lock_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_lock_response(self): # Create LockResponse class instance - test_model = LockResponse(config={"dolore": 4}) - self.assertEqual(test_model.config, {"dolore": 4}) + test_model = LockResponse(config={"veritatis": 6}) + self.assertEqual(test_model.config, {"veritatis": 6}) if __name__ == "__main__": diff --git a/test/models/test_me_response.py b/test/models/test_me_response.py index 9f56e55..8460445 100644 --- a/test/models/test_me_response.py +++ b/test/models/test_me_response.py @@ -9,21 +9,21 @@ def test_true(self): def test_me_response(self): # Create MeResponse class instance test_model = MeResponse( - slug="recusandae", - name="dolorem", - created_at="esse", - last_seen_at="nisi", - token_preview="iusto", - workplace={"quam": 4}, - type_="quibusdam", + slug="quasi", + name="doloremque", + created_at="consequatur", + last_seen_at="quaerat", + token_preview="totam", + workplace={"quibusdam": 7}, + type_="praesentium", ) - self.assertEqual(test_model.slug, "recusandae") - self.assertEqual(test_model.name, "dolorem") - self.assertEqual(test_model.created_at, "esse") - self.assertEqual(test_model.last_seen_at, "nisi") - self.assertEqual(test_model.token_preview, "iusto") - self.assertEqual(test_model.workplace, {"quam": 4}) - self.assertEqual(test_model.type_, "quibusdam") + self.assertEqual(test_model.slug, "quasi") + self.assertEqual(test_model.name, "doloremque") + self.assertEqual(test_model.created_at, "consequatur") + self.assertEqual(test_model.last_seen_at, "quaerat") + self.assertEqual(test_model.token_preview, "totam") + self.assertEqual(test_model.workplace, {"quibusdam": 7}) + self.assertEqual(test_model.type_, "praesentium") if __name__ == "__main__": diff --git a/test/models/test_names_response.py b/test/models/test_names_response.py index e55c3ed..97520f4 100644 --- a/test/models/test_names_response.py +++ b/test/models/test_names_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_names_response(self): # Create NamesResponse class instance - test_model = NamesResponse(names=["soluta", "accusantium"]) - self.assertEqual(test_model.names, ["soluta", "accusantium"]) + test_model = NamesResponse(names=["aut", "asperiores"]) + self.assertEqual(test_model.names, ["aut", "asperiores"]) if __name__ == "__main__": diff --git a/test/models/test_project_members_get_response.py b/test/models/test_project_members_get_response.py new file mode 100644 index 0000000..9241200 --- /dev/null +++ b/test/models/test_project_members_get_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ProjectMembersGetResponse import ProjectMembersGetResponse + + +class TestProjectMembersGetResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_project_members_get_response(self): + # Create ProjectMembersGetResponse class instance + test_model = ProjectMembersGetResponse(member={"dolores": 5}) + self.assertEqual(test_model.member, {"dolores": 5}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_project_members_list_response.py b/test/models/test_project_members_list_response.py new file mode 100644 index 0000000..cb181ae --- /dev/null +++ b/test/models/test_project_members_list_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ProjectMembersListResponse import ProjectMembersListResponse + + +class TestProjectMembersListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_project_members_list_response(self): + # Create ProjectMembersListResponse class instance + test_model = ProjectMembersListResponse(members=["animi", "fugit"]) + self.assertEqual(test_model.members, ["animi", "fugit"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_project_members_update_request.py b/test/models/test_project_members_update_request.py new file mode 100644 index 0000000..9e9375e --- /dev/null +++ b/test/models/test_project_members_update_request.py @@ -0,0 +1,21 @@ +import unittest +from src.dopplersdk.models.ProjectMembersUpdateRequest import ( + ProjectMembersUpdateRequest, +) + + +class TestProjectMembersUpdateRequestModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_project_members_update_request(self): + # Create ProjectMembersUpdateRequest class instance + test_model = ProjectMembersUpdateRequest( + role="officiis", environments=["voluptatem", "sint"] + ) + self.assertEqual(test_model.role, "officiis") + self.assertEqual(test_model.environments, ["voluptatem", "sint"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_project_members_update_response.py b/test/models/test_project_members_update_response.py new file mode 100644 index 0000000..ee32a22 --- /dev/null +++ b/test/models/test_project_members_update_response.py @@ -0,0 +1,18 @@ +import unittest +from src.dopplersdk.models.ProjectMembersUpdateResponse import ( + ProjectMembersUpdateResponse, +) + + +class TestProjectMembersUpdateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_project_members_update_response(self): + # Create ProjectMembersUpdateResponse class instance + test_model = ProjectMembersUpdateResponse(member={"molestias": 4}) + self.assertEqual(test_model.member, {"molestias": 4}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_project_roles_create_response.py b/test/models/test_project_roles_create_response.py new file mode 100644 index 0000000..7bed705 --- /dev/null +++ b/test/models/test_project_roles_create_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ProjectRolesCreateResponse import ProjectRolesCreateResponse + + +class TestProjectRolesCreateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_project_roles_create_response(self): + # Create ProjectRolesCreateResponse class instance + test_model = ProjectRolesCreateResponse(role={"quis": 8}) + self.assertEqual(test_model.role, {"quis": 8}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_project_roles_get_response.py b/test/models/test_project_roles_get_response.py new file mode 100644 index 0000000..115d606 --- /dev/null +++ b/test/models/test_project_roles_get_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ProjectRolesGetResponse import ProjectRolesGetResponse + + +class TestProjectRolesGetResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_project_roles_get_response(self): + # Create ProjectRolesGetResponse class instance + test_model = ProjectRolesGetResponse(role={"amet": 7}) + self.assertEqual(test_model.role, {"amet": 7}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_project_roles_list_permissions_response.py b/test/models/test_project_roles_list_permissions_response.py new file mode 100644 index 0000000..37be5ed --- /dev/null +++ b/test/models/test_project_roles_list_permissions_response.py @@ -0,0 +1,18 @@ +import unittest +from src.dopplersdk.models.ProjectRolesListPermissionsResponse import ( + ProjectRolesListPermissionsResponse, +) + + +class TestProjectRolesListPermissionsResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_project_roles_list_permissions_response(self): + # Create ProjectRolesListPermissionsResponse class instance + test_model = ProjectRolesListPermissionsResponse(permissions=["est", "nemo"]) + self.assertEqual(test_model.permissions, ["est", "nemo"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_project_roles_list_response.py b/test/models/test_project_roles_list_response.py new file mode 100644 index 0000000..5542126 --- /dev/null +++ b/test/models/test_project_roles_list_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ProjectRolesListResponse import ProjectRolesListResponse + + +class TestProjectRolesListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_project_roles_list_response(self): + # Create ProjectRolesListResponse class instance + test_model = ProjectRolesListResponse(roles=["voluptatum", "reiciendis"]) + self.assertEqual(test_model.roles, ["voluptatum", "reiciendis"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_project_roles_update_response.py b/test/models/test_project_roles_update_response.py new file mode 100644 index 0000000..72d0552 --- /dev/null +++ b/test/models/test_project_roles_update_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ProjectRolesUpdateResponse import ProjectRolesUpdateResponse + + +class TestProjectRolesUpdateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_project_roles_update_response(self): + # Create ProjectRolesUpdateResponse class instance + test_model = ProjectRolesUpdateResponse(role={"harum": 8}) + self.assertEqual(test_model.role, {"harum": 8}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_rename_request.py b/test/models/test_rename_request.py index 39076a1..7af48c1 100644 --- a/test/models/test_rename_request.py +++ b/test/models/test_rename_request.py @@ -8,9 +8,9 @@ def test_true(self): def test_rename_request(self): # Create RenameRequest class instance - test_model = RenameRequest(name="autem", slug="perspiciatis") - self.assertEqual(test_model.name, "autem") - self.assertEqual(test_model.slug, "perspiciatis") + test_model = RenameRequest(name="aut", slug="aperiam") + self.assertEqual(test_model.name, "aut") + self.assertEqual(test_model.slug, "aperiam") if __name__ == "__main__": diff --git a/test/models/test_rename_response.py b/test/models/test_rename_response.py index 19b7af8..ad6b910 100644 --- a/test/models/test_rename_response.py +++ b/test/models/test_rename_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_rename_response(self): # Create RenameResponse class instance - test_model = RenameResponse(environment={"asperiores": 9}) - self.assertEqual(test_model.environment, {"asperiores": 9}) + test_model = RenameResponse(environment={"officia": 6}) + self.assertEqual(test_model.environment, {"officia": 6}) if __name__ == "__main__": diff --git a/test/models/test_retrieve_response.py b/test/models/test_retrieve_response.py index 16a8c02..af9fbcd 100644 --- a/test/models/test_retrieve_response.py +++ b/test/models/test_retrieve_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_retrieve_response(self): # Create RetrieveResponse class instance - test_model = RetrieveResponse(log={"laboriosam": 9}) - self.assertEqual(test_model.log, {"laboriosam": 9}) + test_model = RetrieveResponse(log={"reiciendis": 2}) + self.assertEqual(test_model.log, {"reiciendis": 2}) if __name__ == "__main__": diff --git a/test/models/test_revoke_lease_request.py b/test/models/test_revoke_lease_request.py index 4227a52..12b0935 100644 --- a/test/models/test_revoke_lease_request.py +++ b/test/models/test_revoke_lease_request.py @@ -9,12 +9,12 @@ def test_true(self): def test_revoke_lease_request(self): # Create RevokeLeaseRequest class instance test_model = RevokeLeaseRequest( - slug="unde", dynamic_secret="autem", config="consectetur", project="dolore" + slug="vitae", dynamic_secret="quaerat", config="dicta", project="ut" ) - self.assertEqual(test_model.slug, "unde") - self.assertEqual(test_model.dynamic_secret, "autem") - self.assertEqual(test_model.config, "consectetur") - self.assertEqual(test_model.project, "dolore") + self.assertEqual(test_model.slug, "vitae") + self.assertEqual(test_model.dynamic_secret, "quaerat") + self.assertEqual(test_model.config, "dicta") + self.assertEqual(test_model.project, "ut") def test_revoke_lease_request_required_fields_missing(self): # Assert RevokeLeaseRequest class generation fails without required fields diff --git a/test/models/test_rollback_response.py b/test/models/test_rollback_response.py index 109d865..0246e32 100644 --- a/test/models/test_rollback_response.py +++ b/test/models/test_rollback_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_rollback_response(self): # Create RollbackResponse class instance - test_model = RollbackResponse(log={"laborum": 6}) - self.assertEqual(test_model.log, {"laborum": 6}) + test_model = RollbackResponse(log={"laboriosam": 3}) + self.assertEqual(test_model.log, {"laboriosam": 3}) if __name__ == "__main__": diff --git a/test/models/test_secrets_get_response.py b/test/models/test_secrets_get_response.py new file mode 100644 index 0000000..0bf9ec9 --- /dev/null +++ b/test/models/test_secrets_get_response.py @@ -0,0 +1,17 @@ +import unittest +from src.dopplersdk.models.SecretsGetResponse import SecretsGetResponse + + +class TestSecretsGetResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_secrets_get_response(self): + # Create SecretsGetResponse class instance + test_model = SecretsGetResponse(name="aliquam", value={"aliquam": 1}) + self.assertEqual(test_model.name, "aliquam") + self.assertEqual(test_model.value, {"aliquam": 1}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_secrets_list_response.py b/test/models/test_secrets_list_response.py new file mode 100644 index 0000000..674beb5 --- /dev/null +++ b/test/models/test_secrets_list_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.SecretsListResponse import SecretsListResponse + + +class TestSecretsListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_secrets_list_response(self): + # Create SecretsListResponse class instance + test_model = SecretsListResponse(secrets={"necessitatibus": 5}) + self.assertEqual(test_model.secrets, {"necessitatibus": 5}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_secrets_update_request.py b/test/models/test_secrets_update_request.py index 51377e7..4cd09ab 100644 --- a/test/models/test_secrets_update_request.py +++ b/test/models/test_secrets_update_request.py @@ -9,11 +9,11 @@ def test_true(self): def test_secrets_update_request(self): # Create SecretsUpdateRequest class instance test_model = SecretsUpdateRequest( - secrets={"quos": 4}, config="ullam", project="consectetur" + secrets={"eligendi": 8}, config="similique", project="eius" ) - self.assertEqual(test_model.secrets, {"quos": 4}) - self.assertEqual(test_model.config, "ullam") - self.assertEqual(test_model.project, "consectetur") + self.assertEqual(test_model.secrets, {"eligendi": 8}) + self.assertEqual(test_model.config, "similique") + self.assertEqual(test_model.project, "eius") def test_secrets_update_request_required_fields_missing(self): # Assert SecretsUpdateRequest class generation fails without required fields diff --git a/test/models/test_secrets_update_response.py b/test/models/test_secrets_update_response.py new file mode 100644 index 0000000..19ae896 --- /dev/null +++ b/test/models/test_secrets_update_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.SecretsUpdateResponse import SecretsUpdateResponse + + +class TestSecretsUpdateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_secrets_update_response(self): + # Create SecretsUpdateResponse class instance + test_model = SecretsUpdateResponse(secrets={"odio": 2}) + self.assertEqual(test_model.secrets, {"odio": 2}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_service_accounts_create_request.py b/test/models/test_service_accounts_create_request.py new file mode 100644 index 0000000..b447df1 --- /dev/null +++ b/test/models/test_service_accounts_create_request.py @@ -0,0 +1,21 @@ +import unittest +from src.dopplersdk.models.ServiceAccountsCreateRequest import ( + ServiceAccountsCreateRequest, +) + + +class TestServiceAccountsCreateRequestModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_service_accounts_create_request(self): + # Create ServiceAccountsCreateRequest class instance + test_model = ServiceAccountsCreateRequest( + name="ducimus", workplace_role={"eum": 3} + ) + self.assertEqual(test_model.name, "ducimus") + self.assertEqual(test_model.workplace_role, {"eum": 3}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_service_accounts_create_response.py b/test/models/test_service_accounts_create_response.py new file mode 100644 index 0000000..e82d301 --- /dev/null +++ b/test/models/test_service_accounts_create_response.py @@ -0,0 +1,18 @@ +import unittest +from src.dopplersdk.models.ServiceAccountsCreateResponse import ( + ServiceAccountsCreateResponse, +) + + +class TestServiceAccountsCreateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_service_accounts_create_response(self): + # Create ServiceAccountsCreateResponse class instance + test_model = ServiceAccountsCreateResponse(service_account={"porro": 2}) + self.assertEqual(test_model.service_account, {"porro": 2}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_service_accounts_get_response.py b/test/models/test_service_accounts_get_response.py new file mode 100644 index 0000000..c8f38eb --- /dev/null +++ b/test/models/test_service_accounts_get_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ServiceAccountsGetResponse import ServiceAccountsGetResponse + + +class TestServiceAccountsGetResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_service_accounts_get_response(self): + # Create ServiceAccountsGetResponse class instance + test_model = ServiceAccountsGetResponse(service_account={"sapiente": 9}) + self.assertEqual(test_model.service_account, {"sapiente": 9}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_service_accounts_list_response.py b/test/models/test_service_accounts_list_response.py new file mode 100644 index 0000000..8002f7f --- /dev/null +++ b/test/models/test_service_accounts_list_response.py @@ -0,0 +1,20 @@ +import unittest +from src.dopplersdk.models.ServiceAccountsListResponse import ( + ServiceAccountsListResponse, +) + + +class TestServiceAccountsListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_service_accounts_list_response(self): + # Create ServiceAccountsListResponse class instance + test_model = ServiceAccountsListResponse( + service_accounts=["aliquam", "consequatur"] + ) + self.assertEqual(test_model.service_accounts, ["aliquam", "consequatur"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_service_accounts_update_request.py b/test/models/test_service_accounts_update_request.py new file mode 100644 index 0000000..f83bfef --- /dev/null +++ b/test/models/test_service_accounts_update_request.py @@ -0,0 +1,21 @@ +import unittest +from src.dopplersdk.models.ServiceAccountsUpdateRequest import ( + ServiceAccountsUpdateRequest, +) + + +class TestServiceAccountsUpdateRequestModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_service_accounts_update_request(self): + # Create ServiceAccountsUpdateRequest class instance + test_model = ServiceAccountsUpdateRequest( + name="aliquam", workplace_role={"explicabo": 3} + ) + self.assertEqual(test_model.name, "aliquam") + self.assertEqual(test_model.workplace_role, {"explicabo": 3}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_service_accounts_update_response.py b/test/models/test_service_accounts_update_response.py new file mode 100644 index 0000000..3d79e7f --- /dev/null +++ b/test/models/test_service_accounts_update_response.py @@ -0,0 +1,18 @@ +import unittest +from src.dopplersdk.models.ServiceAccountsUpdateResponse import ( + ServiceAccountsUpdateResponse, +) + + +class TestServiceAccountsUpdateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_service_accounts_update_response(self): + # Create ServiceAccountsUpdateResponse class instance + test_model = ServiceAccountsUpdateResponse(service_account={"debitis": 7}) + self.assertEqual(test_model.service_account, {"debitis": 7}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_service_tokens_create_request.py b/test/models/test_service_tokens_create_request.py index ae9b381..20de9d3 100644 --- a/test/models/test_service_tokens_create_request.py +++ b/test/models/test_service_tokens_create_request.py @@ -9,16 +9,16 @@ def test_true(self): def test_service_tokens_create_request(self): # Create ServiceTokensCreateRequest class instance test_model = ServiceTokensCreateRequest( - name="earum", - config="officiis", - project="voluptates", - expire_at="similique", + name="laboriosam", + config="fugit", + project="ratione", + expire_at="facilis", access="read", ) - self.assertEqual(test_model.name, "earum") - self.assertEqual(test_model.config, "officiis") - self.assertEqual(test_model.project, "voluptates") - self.assertEqual(test_model.expire_at, "similique") + self.assertEqual(test_model.name, "laboriosam") + self.assertEqual(test_model.config, "fugit") + self.assertEqual(test_model.project, "ratione") + self.assertEqual(test_model.expire_at, "facilis") self.assertEqual(test_model.access, "read") def test_service_tokens_create_request_required_fields_missing(self): diff --git a/test/models/test_service_tokens_create_response.py b/test/models/test_service_tokens_create_response.py new file mode 100644 index 0000000..9d677e1 --- /dev/null +++ b/test/models/test_service_tokens_create_response.py @@ -0,0 +1,36 @@ +import unittest +from src.dopplersdk.models.ServiceTokensCreateResponse import ( + ServiceTokensCreateResponse, +) + + +class TestServiceTokensCreateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_service_tokens_create_response(self): + # Create ServiceTokensCreateResponse class instance + test_model = ServiceTokensCreateResponse( + name="nobis", + slug="ducimus", + created_at="animi", + key="reprehenderit", + config="sequi", + environment="explicabo", + project="amet", + expires_at="foo", + access="illum", + ) + self.assertEqual(test_model.name, "nobis") + self.assertEqual(test_model.slug, "ducimus") + self.assertEqual(test_model.created_at, "animi") + self.assertEqual(test_model.key, "reprehenderit") + self.assertEqual(test_model.config, "sequi") + self.assertEqual(test_model.environment, "explicabo") + self.assertEqual(test_model.project, "amet") + self.assertEqual(test_model.expires_at, "foo") + self.assertEqual(test_model.access, "illum") + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_service_tokens_delete_request.py b/test/models/test_service_tokens_delete_request.py index 34a923c..a85267c 100644 --- a/test/models/test_service_tokens_delete_request.py +++ b/test/models/test_service_tokens_delete_request.py @@ -9,12 +9,12 @@ def test_true(self): def test_service_tokens_delete_request(self): # Create ServiceTokensDeleteRequest class instance test_model = ServiceTokensDeleteRequest( - config="similique", project="non", slug="doloribus", token="amet" + config="iusto", project="fugiat", slug="tempora", token="iusto" ) - self.assertEqual(test_model.config, "similique") - self.assertEqual(test_model.project, "non") - self.assertEqual(test_model.slug, "doloribus") - self.assertEqual(test_model.token, "amet") + self.assertEqual(test_model.config, "iusto") + self.assertEqual(test_model.project, "fugiat") + self.assertEqual(test_model.slug, "tempora") + self.assertEqual(test_model.token, "iusto") def test_service_tokens_delete_request_required_fields_missing(self): # Assert ServiceTokensDeleteRequest class generation fails without required fields diff --git a/test/models/test_service_tokens_list_response.py b/test/models/test_service_tokens_list_response.py new file mode 100644 index 0000000..5c704b9 --- /dev/null +++ b/test/models/test_service_tokens_list_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.ServiceTokensListResponse import ServiceTokensListResponse + + +class TestServiceTokensListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_service_tokens_list_response(self): + # Create ServiceTokensListResponse class instance + test_model = ServiceTokensListResponse(tokens=["esse", "magnam"]) + self.assertEqual(test_model.tokens, ["esse", "magnam"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_syncs_create_request.py b/test/models/test_syncs_create_request.py index 397b29f..99a3c67 100644 --- a/test/models/test_syncs_create_request.py +++ b/test/models/test_syncs_create_request.py @@ -9,10 +9,10 @@ def test_true(self): def test_syncs_create_request(self): # Create SyncsCreateRequest class instance test_model = SyncsCreateRequest( - data={"unde": 5}, integration="modi", import_option="none" + data={"quas": 5}, integration="iusto", import_option="none" ) - self.assertEqual(test_model.data, {"unde": 5}) - self.assertEqual(test_model.integration, "modi") + self.assertEqual(test_model.data, {"quas": 5}) + self.assertEqual(test_model.integration, "iusto") self.assertEqual(test_model.import_option, "none") def test_syncs_create_request_required_fields_missing(self): diff --git a/test/models/test_syncs_create_response.py b/test/models/test_syncs_create_response.py new file mode 100644 index 0000000..45ea589 --- /dev/null +++ b/test/models/test_syncs_create_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.SyncsCreateResponse import SyncsCreateResponse + + +class TestSyncsCreateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_syncs_create_response(self): + # Create SyncsCreateResponse class instance + test_model = SyncsCreateResponse(sync={"excepturi": 9}) + self.assertEqual(test_model.sync, {"excepturi": 9}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_syncs_delete_response.py b/test/models/test_syncs_delete_response.py new file mode 100644 index 0000000..b8b7199 --- /dev/null +++ b/test/models/test_syncs_delete_response.py @@ -0,0 +1,15 @@ +import unittest +from src.dopplersdk.models.SyncsDeleteResponse import SyncsDeleteResponse + + +class TestSyncsDeleteResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_syncs_delete_response(self): + # Create SyncsDeleteResponse class instance + test_model = SyncsDeleteResponse() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_syncs_get_response.py b/test/models/test_syncs_get_response.py new file mode 100644 index 0000000..789fa41 --- /dev/null +++ b/test/models/test_syncs_get_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.SyncsGetResponse import SyncsGetResponse + + +class TestSyncsGetResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_syncs_get_response(self): + # Create SyncsGetResponse class instance + test_model = SyncsGetResponse(sync={"veritatis": 1}) + self.assertEqual(test_model.sync, {"veritatis": 1}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_unlock_request.py b/test/models/test_unlock_request.py index 625d51a..f4f21ed 100644 --- a/test/models/test_unlock_request.py +++ b/test/models/test_unlock_request.py @@ -8,9 +8,9 @@ def test_true(self): def test_unlock_request(self): # Create UnlockRequest class instance - test_model = UnlockRequest(config="molestiae", project="eveniet") - self.assertEqual(test_model.config, "molestiae") - self.assertEqual(test_model.project, "eveniet") + test_model = UnlockRequest(config="autem", project="voluptates") + self.assertEqual(test_model.config, "autem") + self.assertEqual(test_model.project, "voluptates") def test_unlock_request_required_fields_missing(self): # Assert UnlockRequest class generation fails without required fields diff --git a/test/models/test_unlock_response.py b/test/models/test_unlock_response.py index 58ae77e..820dc46 100644 --- a/test/models/test_unlock_response.py +++ b/test/models/test_unlock_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_unlock_response(self): # Create UnlockResponse class instance - test_model = UnlockResponse(config={"possimus": 4}) - self.assertEqual(test_model.config, {"possimus": 4}) + test_model = UnlockResponse(config={"soluta": 3}) + self.assertEqual(test_model.config, {"soluta": 3}) if __name__ == "__main__": diff --git a/test/models/test_update_note_request.py b/test/models/test_update_note_request.py index 7aa5c49..05cd64a 100644 --- a/test/models/test_update_note_request.py +++ b/test/models/test_update_note_request.py @@ -9,12 +9,12 @@ def test_true(self): def test_update_note_request(self): # Create UpdateNoteRequest class instance test_model = UpdateNoteRequest( - note="quae", secret="animi", config="amet", project="quaerat" + note="atque", secret="beatae", config="quidem", project="blanditiis" ) - self.assertEqual(test_model.note, "quae") - self.assertEqual(test_model.secret, "animi") - self.assertEqual(test_model.config, "amet") - self.assertEqual(test_model.project, "quaerat") + self.assertEqual(test_model.note, "atque") + self.assertEqual(test_model.secret, "beatae") + self.assertEqual(test_model.config, "quidem") + self.assertEqual(test_model.project, "blanditiis") def test_update_note_request_required_fields_missing(self): # Assert UpdateNoteRequest class generation fails without required fields diff --git a/test/models/test_update_note_response.py b/test/models/test_update_note_response.py index 906a6e8..a7ee13d 100644 --- a/test/models/test_update_note_response.py +++ b/test/models/test_update_note_response.py @@ -8,9 +8,9 @@ def test_true(self): def test_update_note_response(self): # Create UpdateNoteResponse class instance - test_model = UpdateNoteResponse(secret="veniam", note="hic") - self.assertEqual(test_model.secret, "veniam") - self.assertEqual(test_model.note, "hic") + test_model = UpdateNoteResponse(secret="placeat", note="aliquid") + self.assertEqual(test_model.secret, "placeat") + self.assertEqual(test_model.note, "aliquid") if __name__ == "__main__": diff --git a/test/models/test_update_request.py b/test/models/test_update_request.py index afb90ba..9fbaa2e 100644 --- a/test/models/test_update_request.py +++ b/test/models/test_update_request.py @@ -8,9 +8,15 @@ def test_true(self): def test_update_request(self): # Create UpdateRequest class instance - test_model = UpdateRequest(name="asperiores", default_project_role="ducimus") - self.assertEqual(test_model.name, "asperiores") - self.assertEqual(test_model.default_project_role, "ducimus") + test_model = UpdateRequest(name="ea", project="fugiat", description="molestiae") + self.assertEqual(test_model.name, "ea") + self.assertEqual(test_model.project, "fugiat") + self.assertEqual(test_model.description, "molestiae") + + def test_update_request_required_fields_missing(self): + # Assert UpdateRequest class generation fails without required fields + with self.assertRaises(TypeError): + test_model = UpdateRequest() if __name__ == "__main__": diff --git a/test/models/test_update_response.py b/test/models/test_update_response.py index 1571df2..c585d31 100644 --- a/test/models/test_update_response.py +++ b/test/models/test_update_response.py @@ -8,8 +8,8 @@ def test_true(self): def test_update_response(self): # Create UpdateResponse class instance - test_model = UpdateResponse(group={"beatae": 8}) - self.assertEqual(test_model.group, {"beatae": 8}) + test_model = UpdateResponse(project={"libero": 8}) + self.assertEqual(test_model.project, {"libero": 8}) if __name__ == "__main__": diff --git a/test/models/test_workplace_roles_create_response.py b/test/models/test_workplace_roles_create_response.py new file mode 100644 index 0000000..558e1c9 --- /dev/null +++ b/test/models/test_workplace_roles_create_response.py @@ -0,0 +1,18 @@ +import unittest +from src.dopplersdk.models.WorkplaceRolesCreateResponse import ( + WorkplaceRolesCreateResponse, +) + + +class TestWorkplaceRolesCreateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_workplace_roles_create_response(self): + # Create WorkplaceRolesCreateResponse class instance + test_model = WorkplaceRolesCreateResponse(role={"minus": 6}) + self.assertEqual(test_model.role, {"minus": 6}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_workplace_roles_get_response.py b/test/models/test_workplace_roles_get_response.py new file mode 100644 index 0000000..db9cde5 --- /dev/null +++ b/test/models/test_workplace_roles_get_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.WorkplaceRolesGetResponse import WorkplaceRolesGetResponse + + +class TestWorkplaceRolesGetResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_workplace_roles_get_response(self): + # Create WorkplaceRolesGetResponse class instance + test_model = WorkplaceRolesGetResponse(role={"dolorem": 4}) + self.assertEqual(test_model.role, {"dolorem": 4}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_workplace_roles_list_response.py b/test/models/test_workplace_roles_list_response.py new file mode 100644 index 0000000..af1f6c0 --- /dev/null +++ b/test/models/test_workplace_roles_list_response.py @@ -0,0 +1,16 @@ +import unittest +from src.dopplersdk.models.WorkplaceRolesListResponse import WorkplaceRolesListResponse + + +class TestWorkplaceRolesListResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_workplace_roles_list_response(self): + # Create WorkplaceRolesListResponse class instance + test_model = WorkplaceRolesListResponse(roles=["dolor", "hic"]) + self.assertEqual(test_model.roles, ["dolor", "hic"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_workplace_roles_update_response.py b/test/models/test_workplace_roles_update_response.py new file mode 100644 index 0000000..165332e --- /dev/null +++ b/test/models/test_workplace_roles_update_response.py @@ -0,0 +1,18 @@ +import unittest +from src.dopplersdk.models.WorkplaceRolesUpdateResponse import ( + WorkplaceRolesUpdateResponse, +) + + +class TestWorkplaceRolesUpdateResponseModel(unittest.TestCase): + def test_true(self): + self.assertTrue(True) + + def test_workplace_roles_update_response(self): + # Create WorkplaceRolesUpdateResponse class instance + test_model = WorkplaceRolesUpdateResponse(role={"qui": 6}) + self.assertEqual(test_model.role, {"qui": 6}) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/services/test_activity_logs.py b/test/services/test_activity_logs.py index 6992ab7..a93525e 100644 --- a/test/services/test_activity_logs.py +++ b/test/services/test_activity_logs.py @@ -15,7 +15,7 @@ def test_list(self): responses.get("https://api.doppler.com/v3/logs", json={}, status=200) # call the method to test test_service = ActivityLogs("testkey") - response = test_service.list("cumque", 4) + response = test_service.list("soluta", 4) self.assertEqual(response, {}) responses.reset(), @@ -25,7 +25,7 @@ def test_list_error_on_non_200(self): responses.get("https://api.doppler.com/v3/logs", json={}, status=404) with self.assertRaises(ClientException): test_service = ActivityLogs("testkey") - test_service.list("aliquam", 6) + test_service.list("quia", 7) responses.reset() @responses.activate @@ -34,7 +34,7 @@ def test_retrieve(self): responses.get("https://api.doppler.com/v3/logs/log", json={}, status=200) # call the method to test test_service = ActivityLogs("testkey") - response = test_service.retrieve("magni") + response = test_service.retrieve("consequuntur") self.assertEqual(response, {}) responses.reset(), @@ -53,7 +53,7 @@ def test_retrieve_error_on_non_200(self): responses.get("https://api.doppler.com/v3/logs/log", json={}, status=404) with self.assertRaises(ClientException): test_service = ActivityLogs("testkey") - test_service.retrieve("explicabo") + test_service.retrieve("neque") responses.reset() diff --git a/test/services/test_config_logs.py b/test/services/test_config_logs.py index 73da54f..4411561 100644 --- a/test/services/test_config_logs.py +++ b/test/services/test_config_logs.py @@ -17,7 +17,7 @@ def test_list(self): ) # call the method to test test_service = ConfigLogs("testkey") - response = test_service.list("quae", "harum", 8, 9) + response = test_service.list("dolorem", "voluptatum", 8, 4) self.assertEqual(response, {}) responses.reset(), @@ -40,7 +40,7 @@ def test_list_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = ConfigLogs("testkey") - test_service.list("distinctio", "expedita", 1, 6) + test_service.list("enim", "exercitationem", 8, 9) responses.reset() @responses.activate @@ -51,7 +51,7 @@ def test_get(self): ) # call the method to test test_service = ConfigLogs("testkey") - response = test_service.get("pariatur", "quidem", "saepe") + response = test_service.get("fuga", "amet", "odit") self.assertEqual(response, {}) responses.reset(), @@ -74,7 +74,7 @@ def test_get_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = ConfigLogs("testkey") - test_service.get("laborum", "officiis", "nemo") + test_service.get("sunt", "repellendus", "explicabo") responses.reset() @responses.activate @@ -87,7 +87,7 @@ def test_rollback(self): ) # call the method to test test_service = ConfigLogs("testkey") - response = test_service.rollback("similique", "deserunt", "quisquam") + response = test_service.rollback("unde", "laborum", "magnam") self.assertEqual(response, {}) responses.reset(), @@ -114,7 +114,7 @@ def test_rollback_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = ConfigLogs("testkey") - test_service.rollback("laboriosam", "incidunt", "ullam") + test_service.rollback("atque", "eveniet", "quas") responses.reset() diff --git a/test/services/test_configs.py b/test/services/test_configs.py index 6ecc4a0..afcc1c4 100644 --- a/test/services/test_configs.py +++ b/test/services/test_configs.py @@ -15,7 +15,7 @@ def test_list(self): responses.get("https://api.doppler.com/v3/configs", json={}, status=200) # call the method to test test_service = Configs("testkey") - response = test_service.list("harum", "praesentium", 2, 9) + response = test_service.list("qui", "odit", 4, 1) self.assertEqual(response, {}) responses.reset(), @@ -34,7 +34,7 @@ def test_list_error_on_non_200(self): responses.get("https://api.doppler.com/v3/configs", json={}, status=404) with self.assertRaises(ClientException): test_service = Configs("testkey") - test_service.list("excepturi", "laborum", 6, 6) + test_service.list("error", "dolore", 4, 8) responses.reset() @responses.activate @@ -62,7 +62,7 @@ def test_get(self): responses.get("https://api.doppler.com/v3/configs/config", json={}, status=200) # call the method to test test_service = Configs("testkey") - response = test_service.get("accusamus", "ipsa") + response = test_service.get("ut", "accusamus") self.assertEqual(response, {}) responses.reset(), @@ -81,7 +81,7 @@ def test_get_error_on_non_200(self): responses.get("https://api.doppler.com/v3/configs/config", json={}, status=404) with self.assertRaises(ClientException): test_service = Configs("testkey") - test_service.get("repudiandae", "commodi") + test_service.get("excepturi", "cum") responses.reset() @responses.activate @@ -195,6 +195,108 @@ def test_unlock_error_on_non_200(self): test_service.unlock({}) responses.reset() + @responses.activate + def test_list_trusted_ips(self): + # Mock the API response + responses.get( + "https://api.doppler.com/v3/configs/config/trusted_ips", json={}, status=200 + ) + # call the method to test + test_service = Configs("testkey") + response = test_service.list_trusted_ips("perferendis", "explicabo") + self.assertEqual(response, {}) + responses.reset(), + + @responses.activate + def test_list_trusted_ips_required_fields_missing(self): + # Mock the API response + responses.get( + "https://api.doppler.com/v3/configs/config/trusted_ips", json={}, status=202 + ) + with self.assertRaises(TypeError): + test_service = Configs("testkey") + test_service.list_trusted_ips() + responses.reset(), + + @responses.activate + def test_list_trusted_ips_error_on_non_200(self): + # Mock the API response + responses.get( + "https://api.doppler.com/v3/configs/config/trusted_ips", json={}, status=404 + ) + with self.assertRaises(ClientException): + test_service = Configs("testkey") + test_service.list_trusted_ips("ipsam", "illo") + responses.reset() + + @responses.activate + def test_add_trusted_ip(self): + # Mock the API response + responses.post( + "https://api.doppler.com/v3/configs/config/trusted_ips", json={}, status=200 + ) + # call the method to test + test_service = Configs("testkey") + response = test_service.add_trusted_ip("numquam", "atque", {}) + self.assertEqual(response, {}) + responses.reset(), + + @responses.activate + def test_add_trusted_ip_required_fields_missing(self): + # Mock the API response + responses.post( + "https://api.doppler.com/v3/configs/config/trusted_ips", json={}, status=202 + ) + with self.assertRaises(TypeError): + test_service = Configs("testkey") + test_service.add_trusted_ip() + responses.reset(), + + @responses.activate + def test_add_trusted_ip_error_on_non_200(self): + # Mock the API response + responses.post( + "https://api.doppler.com/v3/configs/config/trusted_ips", json={}, status=404 + ) + with self.assertRaises(ClientException): + test_service = Configs("testkey") + test_service.add_trusted_ip("ex", "quisquam", {}) + responses.reset() + + @responses.activate + def test_delete_trusted_ip(self): + # Mock the API response + responses.delete( + "https://api.doppler.com/v3/configs/config/trusted_ips", json={}, status=200 + ) + # call the method to test + test_service = Configs("testkey") + response = test_service.delete_trusted_ip("dolorum", "ullam", {}) + self.assertEqual(response, {}) + responses.reset(), + + @responses.activate + def test_delete_trusted_ip_required_fields_missing(self): + # Mock the API response + responses.delete( + "https://api.doppler.com/v3/configs/config/trusted_ips", json={}, status=202 + ) + with self.assertRaises(TypeError): + test_service = Configs("testkey") + test_service.delete_trusted_ip() + responses.reset(), + + @responses.activate + def test_delete_trusted_ip_error_on_non_200(self): + # Mock the API response + responses.delete( + "https://api.doppler.com/v3/configs/config/trusted_ips", json={}, status=404 + ) + with self.assertRaises(ClientException): + test_service = Configs("testkey") + test_service.delete_trusted_ip("iusto", "quam", {}) + responses.reset() + if __name__ == "__main__": unittest.main() diff --git a/test/services/test_environments.py b/test/services/test_environments.py index ee247f2..858d80b 100644 --- a/test/services/test_environments.py +++ b/test/services/test_environments.py @@ -15,7 +15,7 @@ def test_list(self): responses.get("https://api.doppler.com/v3/environments", json={}, status=200) # call the method to test test_service = Environments("testkey") - response = test_service.list("culpa") + response = test_service.list("exercitationem") self.assertEqual(response, {}) responses.reset(), @@ -34,7 +34,7 @@ def test_list_error_on_non_200(self): responses.get("https://api.doppler.com/v3/environments", json={}, status=404) with self.assertRaises(ClientException): test_service = Environments("testkey") - test_service.list("inventore") + test_service.list("ullam") responses.reset() @responses.activate @@ -43,7 +43,7 @@ def test_create(self): responses.post("https://api.doppler.com/v3/environments", json={}, status=200) # call the method to test test_service = Environments("testkey") - response = test_service.create("deleniti", {}) + response = test_service.create("unde", {}) self.assertEqual(response, {}) responses.reset(), @@ -62,7 +62,7 @@ def test_create_error_on_non_200(self): responses.post("https://api.doppler.com/v3/environments", json={}, status=404) with self.assertRaises(ClientException): test_service = Environments("testkey") - test_service.create("quia", {}) + test_service.create("neque", {}) responses.reset() @responses.activate @@ -73,7 +73,7 @@ def test_get(self): ) # call the method to test test_service = Environments("testkey") - response = test_service.get("aliquid", "est") + response = test_service.get("atque", "aspernatur") self.assertEqual(response, {}) responses.reset(), @@ -96,7 +96,7 @@ def test_get_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Environments("testkey") - test_service.get("praesentium", "sequi") + test_service.get("ipsam", "sit") responses.reset() @responses.activate @@ -107,7 +107,7 @@ def test_rename(self): ) # call the method to test test_service = Environments("testkey") - response = test_service.rename("blanditiis", "quae", {}) + response = test_service.rename("sit", "deleniti", {}) self.assertEqual(response, {}) responses.reset(), @@ -130,7 +130,7 @@ def test_rename_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Environments("testkey") - test_service.rename("qui", "culpa", {}) + test_service.rename("quisquam", "temporibus", {}) responses.reset() @responses.activate @@ -141,7 +141,7 @@ def test_delete(self): ) # call the method to test test_service = Environments("testkey") - response = test_service.delete("quod", "rerum") + response = test_service.delete("minus", "magnam") self.assertEqual(response, {}) responses.reset(), @@ -164,7 +164,7 @@ def test_delete_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Environments("testkey") - test_service.delete("commodi", "sit") + test_service.delete("ipsum", "quod") responses.reset() diff --git a/test/services/test_groups.py b/test/services/test_groups.py index cfb7433..7f3a564 100644 --- a/test/services/test_groups.py +++ b/test/services/test_groups.py @@ -17,7 +17,7 @@ def test_list(self): ) # call the method to test test_service = Groups("testkey") - response = test_service.list(1, 5) + response = test_service.list(7, 6) self.assertEqual(response, {}) responses.reset(), @@ -29,7 +29,7 @@ def test_list_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Groups("testkey") - test_service.list(5, 7) + test_service.list(5, 9) responses.reset() @responses.activate @@ -59,13 +59,13 @@ def test_create_error_on_non_200(self): def test_get(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/workplace/groups/group/laboriosam", + "https://api.doppler.com/v3/workplace/groups/group/neque", json={}, status=200, ) # call the method to test test_service = Groups("testkey") - response = test_service.get("laboriosam") + response = test_service.get("neque") self.assertEqual(response, {}) responses.reset(), @@ -73,7 +73,7 @@ def test_get(self): def test_get_required_fields_missing(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/workplace/groups/group/deserunt", + "https://api.doppler.com/v3/workplace/groups/group/maxime", json={}, status=202, ) @@ -86,26 +86,24 @@ def test_get_required_fields_missing(self): def test_get_error_on_non_200(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/workplace/groups/group/similique", - json={}, - status=404, + "https://api.doppler.com/v3/workplace/groups/group/aut", json={}, status=404 ) with self.assertRaises(ClientException): test_service = Groups("testkey") - test_service.get("similique") + test_service.get("aut") responses.reset() @responses.activate def test_update(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/workplace/groups/group/recusandae", + "https://api.doppler.com/v3/workplace/groups/group/eveniet", json={}, status=200, ) # call the method to test test_service = Groups("testkey") - response = test_service.update("recusandae", {}) + response = test_service.update("eveniet", {}) self.assertEqual(response, {}) responses.reset(), @@ -113,7 +111,7 @@ def test_update(self): def test_update_required_fields_missing(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/workplace/groups/group/nulla", + "https://api.doppler.com/v3/workplace/groups/group/consequuntur", json={}, status=202, ) @@ -126,24 +124,26 @@ def test_update_required_fields_missing(self): def test_update_error_on_non_200(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/workplace/groups/group/sit", json={}, status=404 + "https://api.doppler.com/v3/workplace/groups/group/nulla", + json={}, + status=404, ) with self.assertRaises(ClientException): test_service = Groups("testkey") - test_service.update("sit", {}) + test_service.update("nulla", {}) responses.reset() @responses.activate def test_delete(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/workplace/groups/group/blanditiis", + "https://api.doppler.com/v3/workplace/groups/group/doloremque", json={}, status=200, ) # call the method to test test_service = Groups("testkey") - response = test_service.delete("blanditiis") + response = test_service.delete("doloremque") self.assertEqual(response, {}) responses.reset(), @@ -151,9 +151,7 @@ def test_delete(self): def test_delete_required_fields_missing(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/workplace/groups/group/nihil", - json={}, - status=202, + "https://api.doppler.com/v3/workplace/groups/group/eos", json={}, status=202 ) with self.assertRaises(TypeError): test_service = Groups("testkey") @@ -164,26 +162,26 @@ def test_delete_required_fields_missing(self): def test_delete_error_on_non_200(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/workplace/groups/group/illo", + "https://api.doppler.com/v3/workplace/groups/group/similique", json={}, status=404, ) with self.assertRaises(ClientException): test_service = Groups("testkey") - test_service.delete("illo") + test_service.delete("similique") responses.reset() @responses.activate def test_add_member(self): # Mock the API response responses.post( - "https://api.doppler.com/v3/workplace/groups/group/impedit/members", + "https://api.doppler.com/v3/workplace/groups/group/tempore/members", json={}, status=200, ) # call the method to test test_service = Groups("testkey") - response = test_service.add_member("impedit", {}) + response = test_service.add_member("tempore", {}) self.assertEqual(response, {}) responses.reset(), @@ -191,7 +189,7 @@ def test_add_member(self): def test_add_member_required_fields_missing(self): # Mock the API response responses.post( - "https://api.doppler.com/v3/workplace/groups/group/illo/members", + "https://api.doppler.com/v3/workplace/groups/group/ea/members", json={}, status=202, ) @@ -204,26 +202,26 @@ def test_add_member_required_fields_missing(self): def test_add_member_error_on_non_200(self): # Mock the API response responses.post( - "https://api.doppler.com/v3/workplace/groups/group/corporis/members", + "https://api.doppler.com/v3/workplace/groups/group/eveniet/members", json={}, status=404, ) with self.assertRaises(ClientException): test_service = Groups("testkey") - test_service.add_member("corporis", {}) + test_service.add_member("eveniet", {}) responses.reset() @responses.activate def test_delete_member(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/workplace/groups/group/ab/members/workplace_user/odio", + "https://api.doppler.com/v3/workplace/groups/group/sunt/members/workplace_user/beatae", json={}, status=200, ) # call the method to test test_service = Groups("testkey") - response = test_service.delete_member("odio", "workplace_user", "ab") + response = test_service.delete_member("beatae", "workplace_user", "sunt") self.assertEqual(response, {}) responses.reset(), @@ -231,7 +229,7 @@ def test_delete_member(self): def test_delete_member_required_fields_missing(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/workplace/groups/group/autem/members/workplace_user/quo", + "https://api.doppler.com/v3/workplace/groups/group/necessitatibus/members/workplace_user/maiores", json={}, status=202, ) @@ -244,13 +242,13 @@ def test_delete_member_required_fields_missing(self): def test_delete_member_error_on_non_200(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/workplace/groups/group/hic/members/workplace_user/enim", + "https://api.doppler.com/v3/workplace/groups/group/assumenda/members/workplace_user/nam", json={}, status=404, ) with self.assertRaises(ClientException): test_service = Groups("testkey") - test_service.delete_member("enim", "workplace_user", "hic") + test_service.delete_member("nam", "workplace_user", "assumenda") responses.reset() diff --git a/test/services/test_integrations.py b/test/services/test_integrations.py index 7e173d5..232d332 100644 --- a/test/services/test_integrations.py +++ b/test/services/test_integrations.py @@ -55,7 +55,7 @@ def test_get(self): ) # call the method to test test_service = Integrations("testkey") - response = test_service.get("porro") + response = test_service.get("commodi") self.assertEqual(response, {}) responses.reset(), @@ -78,7 +78,7 @@ def test_get_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Integrations("testkey") - test_service.get("magni") + test_service.get("ipsum") responses.reset() @responses.activate @@ -89,7 +89,7 @@ def test_update(self): ) # call the method to test test_service = Integrations("testkey") - response = test_service.update("numquam", {}) + response = test_service.update("aspernatur", {}) self.assertEqual(response, {}) responses.reset(), @@ -112,7 +112,7 @@ def test_update_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Integrations("testkey") - test_service.update("facere", {}) + test_service.update("fugiat", {}) responses.reset() @responses.activate @@ -123,7 +123,7 @@ def test_delete(self): ) # call the method to test test_service = Integrations("testkey") - response = test_service.delete("eligendi") + response = test_service.delete("sed") self.assertEqual(response, {}) responses.reset(), @@ -146,7 +146,7 @@ def test_delete_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Integrations("testkey") - test_service.delete("unde") + test_service.delete("necessitatibus") responses.reset() diff --git a/test/services/test_invites.py b/test/services/test_invites.py index 8361446..450d4a7 100644 --- a/test/services/test_invites.py +++ b/test/services/test_invites.py @@ -17,7 +17,7 @@ def test_list(self): ) # call the method to test test_service = Invites("testkey") - response = test_service.list(4, 9) + response = test_service.list(4, 4) self.assertEqual(response, {}) responses.reset(), @@ -29,7 +29,7 @@ def test_list_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Invites("testkey") - test_service.list(9, 1) + test_service.list(5, 9) responses.reset() diff --git a/test/services/test_project_members.py b/test/services/test_project_members.py index 6593ef5..c5a493a 100644 --- a/test/services/test_project_members.py +++ b/test/services/test_project_members.py @@ -17,7 +17,7 @@ def test_list(self): ) # call the method to test test_service = ProjectMembers("testkey") - response = test_service.list("odio", 2, 6) + response = test_service.list("vero", 6, 3) self.assertEqual(response, {}) responses.reset(), @@ -40,7 +40,7 @@ def test_list_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = ProjectMembers("testkey") - test_service.list("deserunt", 6, 5) + test_service.list("nemo", 2, 1) responses.reset() @responses.activate @@ -51,7 +51,7 @@ def test_add(self): ) # call the method to test test_service = ProjectMembers("testkey") - response = test_service.add("voluptas", {}) + response = test_service.add("debitis", {}) self.assertEqual(response, {}) responses.reset(), @@ -74,20 +74,20 @@ def test_add_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = ProjectMembers("testkey") - test_service.add("expedita", {}) + test_service.add("eaque", {}) responses.reset() @responses.activate def test_get(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/projects/project/members/member/workplace_user/reprehenderit", + "https://api.doppler.com/v3/projects/project/members/member/workplace_user/in", json={}, status=200, ) # call the method to test test_service = ProjectMembers("testkey") - response = test_service.get("reprehenderit", "workplace_user", "sed") + response = test_service.get("in", "workplace_user", "optio") self.assertEqual(response, {}) responses.reset(), @@ -95,7 +95,7 @@ def test_get(self): def test_get_required_fields_missing(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/projects/project/members/member/workplace_user/temporibus", + "https://api.doppler.com/v3/projects/project/members/member/workplace_user/enim", json={}, status=202, ) @@ -108,26 +108,26 @@ def test_get_required_fields_missing(self): def test_get_error_on_non_200(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/projects/project/members/member/workplace_user/id", + "https://api.doppler.com/v3/projects/project/members/member/workplace_user/doloremque", json={}, status=404, ) with self.assertRaises(ClientException): test_service = ProjectMembers("testkey") - test_service.get("id", "workplace_user", "ducimus") + test_service.get("doloremque", "workplace_user", "nulla") responses.reset() @responses.activate def test_update(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/projects/project/members/member/workplace_user/enim", + "https://api.doppler.com/v3/projects/project/members/member/workplace_user/error", json={}, status=200, ) # call the method to test test_service = ProjectMembers("testkey") - response = test_service.update("saepe", "enim", "workplace_user", {}) + response = test_service.update("magnam", "error", "workplace_user", {}) self.assertEqual(response, {}) responses.reset(), @@ -135,7 +135,7 @@ def test_update(self): def test_update_required_fields_missing(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/projects/project/members/member/workplace_user/modi", + "https://api.doppler.com/v3/projects/project/members/member/workplace_user/consequatur", json={}, status=202, ) @@ -148,26 +148,26 @@ def test_update_required_fields_missing(self): def test_update_error_on_non_200(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/projects/project/members/member/workplace_user/iste", + "https://api.doppler.com/v3/projects/project/members/member/workplace_user/earum", json={}, status=404, ) with self.assertRaises(ClientException): test_service = ProjectMembers("testkey") - test_service.update("illo", "iste", "workplace_user", {}) + test_service.update("quos", "earum", "workplace_user", {}) responses.reset() @responses.activate def test_delete(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/projects/project/members/member/workplace_user/quibusdam", + "https://api.doppler.com/v3/projects/project/members/member/workplace_user/necessitatibus", json={}, status=200, ) # call the method to test test_service = ProjectMembers("testkey") - response = test_service.delete("ea", "quibusdam", "workplace_user") + response = test_service.delete("tempora", "necessitatibus", "workplace_user") self.assertEqual(response, {}) responses.reset(), @@ -175,7 +175,7 @@ def test_delete(self): def test_delete_required_fields_missing(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/projects/project/members/member/workplace_user/laborum", + "https://api.doppler.com/v3/projects/project/members/member/workplace_user/quo", json={}, status=202, ) @@ -188,13 +188,13 @@ def test_delete_required_fields_missing(self): def test_delete_error_on_non_200(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/projects/project/members/member/workplace_user/quasi", + "https://api.doppler.com/v3/projects/project/members/member/workplace_user/natus", json={}, status=404, ) with self.assertRaises(ClientException): test_service = ProjectMembers("testkey") - test_service.delete("natus", "quasi", "workplace_user") + test_service.delete("porro", "natus", "workplace_user") responses.reset() diff --git a/test/services/test_project_roles.py b/test/services/test_project_roles.py index 132ddd8..e3f5280 100644 --- a/test/services/test_project_roles.py +++ b/test/services/test_project_roles.py @@ -51,11 +51,11 @@ def test_create_error_on_non_200(self): def test_get(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/projects/roles/role/dolore", json={}, status=200 + "https://api.doppler.com/v3/projects/roles/role/quia", json={}, status=200 ) # call the method to test test_service = ProjectRoles("testkey") - response = test_service.get("dolore") + response = test_service.get("quia") self.assertEqual(response, {}) responses.reset(), @@ -63,7 +63,7 @@ def test_get(self): def test_get_required_fields_missing(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/projects/roles/role/libero", json={}, status=202 + "https://api.doppler.com/v3/projects/roles/role/facere", json={}, status=202 ) with self.assertRaises(TypeError): test_service = ProjectRoles("testkey") @@ -74,24 +74,22 @@ def test_get_required_fields_missing(self): def test_get_error_on_non_200(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/projects/roles/role/consectetur", - json={}, - status=404, + "https://api.doppler.com/v3/projects/roles/role/sint", json={}, status=404 ) with self.assertRaises(ClientException): test_service = ProjectRoles("testkey") - test_service.get("consectetur") + test_service.get("sint") responses.reset() @responses.activate def test_update(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/projects/roles/role/vitae", json={}, status=200 + "https://api.doppler.com/v3/projects/roles/role/ut", json={}, status=200 ) # call the method to test test_service = ProjectRoles("testkey") - response = test_service.update("vitae") + response = test_service.update("ut") self.assertEqual(response, {}) responses.reset(), @@ -99,7 +97,9 @@ def test_update(self): def test_update_required_fields_missing(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/projects/roles/role/quae", json={}, status=202 + "https://api.doppler.com/v3/projects/roles/role/officia", + json={}, + status=202, ) with self.assertRaises(TypeError): test_service = ProjectRoles("testkey") @@ -110,26 +110,24 @@ def test_update_required_fields_missing(self): def test_update_error_on_non_200(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/projects/roles/role/aspernatur", + "https://api.doppler.com/v3/projects/roles/role/deleniti", json={}, status=404, ) with self.assertRaises(ClientException): test_service = ProjectRoles("testkey") - test_service.update("aspernatur") + test_service.update("deleniti") responses.reset() @responses.activate def test_delete(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/projects/roles/role/deserunt", - json={}, - status=200, + "https://api.doppler.com/v3/projects/roles/role/a", json={}, status=200 ) # call the method to test test_service = ProjectRoles("testkey") - response = test_service.delete("deserunt") + response = test_service.delete("a") self.assertEqual(response, {}) responses.reset(), @@ -137,7 +135,7 @@ def test_delete(self): def test_delete_required_fields_missing(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/projects/roles/role/praesentium", + "https://api.doppler.com/v3/projects/roles/role/repellendus", json={}, status=202, ) @@ -150,11 +148,13 @@ def test_delete_required_fields_missing(self): def test_delete_error_on_non_200(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/projects/roles/role/at", json={}, status=404 + "https://api.doppler.com/v3/projects/roles/role/accusamus", + json={}, + status=404, ) with self.assertRaises(ClientException): test_service = ProjectRoles("testkey") - test_service.delete("at") + test_service.delete("accusamus") responses.reset() @responses.activate diff --git a/test/services/test_projects.py b/test/services/test_projects.py index 808fb1a..4e3cdda 100644 --- a/test/services/test_projects.py +++ b/test/services/test_projects.py @@ -17,7 +17,7 @@ def test_get(self): ) # call the method to test test_service = Projects("testkey") - response = test_service.get("fugiat") + response = test_service.get("temporibus") self.assertEqual(response, {}) responses.reset(), @@ -40,7 +40,7 @@ def test_get_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Projects("testkey") - test_service.get("dolorum") + test_service.get("laboriosam") responses.reset() @responses.activate @@ -95,7 +95,7 @@ def test_list(self): responses.get("https://api.doppler.com/v3/projects", json={}, status=200) # call the method to test test_service = Projects("testkey") - response = test_service.list(3, 4) + response = test_service.list(8, 4) self.assertEqual(response, {}) responses.reset(), @@ -105,7 +105,7 @@ def test_list_error_on_non_200(self): responses.get("https://api.doppler.com/v3/projects", json={}, status=404) with self.assertRaises(ClientException): test_service = Projects("testkey") - test_service.list(1, 2) + test_service.list(8, 7) responses.reset() @responses.activate diff --git a/test/services/test_secrets.py b/test/services/test_secrets.py index 83c2c0d..14c08d0 100644 --- a/test/services/test_secrets.py +++ b/test/services/test_secrets.py @@ -17,9 +17,7 @@ def test_list(self): ) # call the method to test test_service = Secrets("testkey") - response = test_service.list( - "pariatur", "accusantium", "sint", True, 9, "eligendi", True - ) + response = test_service.list("omnis", "vero", "nobis", True, 3, "qui", True) self.assertEqual(response, {}) responses.reset(), @@ -43,7 +41,7 @@ def test_list_error_on_non_200(self): with self.assertRaises(ClientException): test_service = Secrets("testkey") test_service.list( - "dolore", "dolores", "molestiae", True, 7, "doloribus", True + "doloremque", "perferendis", "odio", True, 3, "quibusdam", True ) responses.reset() @@ -78,7 +76,7 @@ def test_get(self): ) # call the method to test test_service = Secrets("testkey") - response = test_service.get("Ila", "aperiam", "possimus") + response = test_service.get("Tiara", "totam", "nemo") self.assertEqual(response, {}) responses.reset(), @@ -101,7 +99,7 @@ def test_get_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Secrets("testkey") - test_service.get("Vada", "facilis", "ut") + test_service.get("Litzy", "reprehenderit", "fugit") responses.reset() @responses.activate @@ -112,7 +110,7 @@ def test_delete(self): ) # call the method to test test_service = Secrets("testkey") - response = test_service.delete("Amina", "delectus", "voluptates") + response = test_service.delete("Quinn", "deserunt", "aut") self.assertEqual(response, {}) responses.reset(), @@ -135,7 +133,7 @@ def test_delete_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Secrets("testkey") - test_service.delete("Jeffrey", "exercitationem", "tenetur") + test_service.delete("Dale", "et", "hic") responses.reset() @responses.activate @@ -148,7 +146,7 @@ def test_download(self): ) # call the method to test test_service = Secrets("testkey") - response = test_service.download("quo", "facere", "json", "camel", True, 1) + response = test_service.download("id", "laboriosam", "json", "camel", True, 9) self.assertEqual(response, {}) responses.reset(), @@ -175,7 +173,7 @@ def test_download_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Secrets("testkey") - test_service.download("aliquid", "suscipit", "json", "camel", True, 3) + test_service.download("earum", "accusamus", "json", "camel", True, 9) responses.reset() @responses.activate @@ -188,7 +186,7 @@ def test_names(self): ) # call the method to test test_service = Secrets("testkey") - response = test_service.names("unde", "molestiae", True, True) + response = test_service.names("doloremque", "odio", True, True) self.assertEqual(response, {}) responses.reset(), @@ -215,7 +213,7 @@ def test_names_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Secrets("testkey") - test_service.names("modi", "sed", True, True) + test_service.names("laudantium", "dignissimos", True, True) responses.reset() @responses.activate diff --git a/test/services/test_service_accounts.py b/test/services/test_service_accounts.py index 24c3368..5a3167a 100644 --- a/test/services/test_service_accounts.py +++ b/test/services/test_service_accounts.py @@ -17,7 +17,7 @@ def test_list(self): ) # call the method to test test_service = ServiceAccounts("testkey") - response = test_service.list(8, 2) + response = test_service.list(3, 5) self.assertEqual(response, {}) responses.reset(), @@ -29,7 +29,7 @@ def test_list_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = ServiceAccounts("testkey") - test_service.list(1, 3) + test_service.list(4, 7) responses.reset() @responses.activate @@ -59,13 +59,13 @@ def test_create_error_on_non_200(self): def test_get(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/workplace/service_accounts/service_account/exercitationem", + "https://api.doppler.com/v3/workplace/service_accounts/service_account/consequuntur", json={}, status=200, ) # call the method to test test_service = ServiceAccounts("testkey") - response = test_service.get("exercitationem") + response = test_service.get("consequuntur") self.assertEqual(response, {}) responses.reset(), @@ -73,7 +73,7 @@ def test_get(self): def test_get_required_fields_missing(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/workplace/service_accounts/service_account/atque", + "https://api.doppler.com/v3/workplace/service_accounts/service_account/minus", json={}, status=202, ) @@ -86,26 +86,26 @@ def test_get_required_fields_missing(self): def test_get_error_on_non_200(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/workplace/service_accounts/service_account/dicta", + "https://api.doppler.com/v3/workplace/service_accounts/service_account/ratione", json={}, status=404, ) with self.assertRaises(ClientException): test_service = ServiceAccounts("testkey") - test_service.get("dicta") + test_service.get("ratione") responses.reset() @responses.activate def test_update(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/workplace/service_accounts/service_account/dolor", + "https://api.doppler.com/v3/workplace/service_accounts/service_account/veritatis", json={}, status=200, ) # call the method to test test_service = ServiceAccounts("testkey") - response = test_service.update("dolor", {}) + response = test_service.update("veritatis", {}) self.assertEqual(response, {}) responses.reset(), @@ -113,7 +113,7 @@ def test_update(self): def test_update_required_fields_missing(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/workplace/service_accounts/service_account/fuga", + "https://api.doppler.com/v3/workplace/service_accounts/service_account/officiis", json={}, status=202, ) @@ -126,13 +126,13 @@ def test_update_required_fields_missing(self): def test_update_error_on_non_200(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/workplace/service_accounts/service_account/a", + "https://api.doppler.com/v3/workplace/service_accounts/service_account/excepturi", json={}, status=404, ) with self.assertRaises(ClientException): test_service = ServiceAccounts("testkey") - test_service.update("a", {}) + test_service.update("excepturi", {}) responses.reset() @responses.activate @@ -153,7 +153,7 @@ def test_delete(self): def test_delete_required_fields_missing(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/workplace/service_accounts/service_account/et", + "https://api.doppler.com/v3/workplace/service_accounts/service_account/in", json={}, status=202, ) @@ -166,13 +166,13 @@ def test_delete_required_fields_missing(self): def test_delete_error_on_non_200(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/workplace/service_accounts/service_account/fugiat", + "https://api.doppler.com/v3/workplace/service_accounts/service_account/consequatur", json={}, status=404, ) with self.assertRaises(ClientException): test_service = ServiceAccounts("testkey") - test_service.delete("fugiat") + test_service.delete("consequatur") responses.reset() diff --git a/test/services/test_service_tokens.py b/test/services/test_service_tokens.py index aba67e4..52723e3 100644 --- a/test/services/test_service_tokens.py +++ b/test/services/test_service_tokens.py @@ -17,7 +17,7 @@ def test_list(self): ) # call the method to test test_service = ServiceTokens("testkey") - response = test_service.list("fugiat", "sapiente") + response = test_service.list("iusto", "officiis") self.assertEqual(response, {}) responses.reset(), @@ -40,7 +40,7 @@ def test_list_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = ServiceTokens("testkey") - test_service.list("nam", "praesentium") + test_service.list("fuga", "dolor") responses.reset() @responses.activate diff --git a/test/services/test_syncs.py b/test/services/test_syncs.py index d3ea129..8e345d3 100644 --- a/test/services/test_syncs.py +++ b/test/services/test_syncs.py @@ -17,7 +17,7 @@ def test_create(self): ) # call the method to test test_service = Syncs("testkey") - response = test_service.create("aliquam", "ducimus", {}) + response = test_service.create("et", "a", {}) self.assertEqual(response, {}) responses.reset(), @@ -40,7 +40,7 @@ def test_create_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Syncs("testkey") - test_service.create("eaque", "doloremque", {}) + test_service.create("quisquam", "id", {}) responses.reset() @responses.activate @@ -51,7 +51,7 @@ def test_get(self): ) # call the method to test test_service = Syncs("testkey") - response = test_service.get("sequi", "odio", "saepe") + response = test_service.get("maiores", "ipsa", "qui") self.assertEqual(response, {}) responses.reset(), @@ -74,7 +74,7 @@ def test_get_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Syncs("testkey") - test_service.get("optio", "consectetur", "cum") + test_service.get("recusandae", "voluptas", "sed") responses.reset() @responses.activate @@ -85,7 +85,7 @@ def test_delete(self): ) # call the method to test test_service = Syncs("testkey") - response = test_service.delete(True, "esse", "velit", "reiciendis") + response = test_service.delete(True, "est", "repudiandae", "quam") self.assertEqual(response, {}) responses.reset(), @@ -108,7 +108,7 @@ def test_delete_error_on_non_200(self): ) with self.assertRaises(ClientException): test_service = Syncs("testkey") - test_service.delete(True, "officia", "eveniet", "sit") + test_service.delete(True, "tenetur", "suscipit", "quis") responses.reset() diff --git a/test/services/test_workplace_roles.py b/test/services/test_workplace_roles.py index 059a645..7cdf5c8 100644 --- a/test/services/test_workplace_roles.py +++ b/test/services/test_workplace_roles.py @@ -78,11 +78,11 @@ def test_list_permissions_error_on_non_200(self): def test_get(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/workplace/roles/role/earum", json={}, status=200 + "https://api.doppler.com/v3/workplace/roles/role/sed", json={}, status=200 ) # call the method to test test_service = WorkplaceRoles("testkey") - response = test_service.get("earum") + response = test_service.get("sed") self.assertEqual(response, {}) responses.reset(), @@ -90,7 +90,7 @@ def test_get(self): def test_get_required_fields_missing(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/workplace/roles/role/suscipit", + "https://api.doppler.com/v3/workplace/roles/role/dolores", json={}, status=202, ) @@ -103,24 +103,26 @@ def test_get_required_fields_missing(self): def test_get_error_on_non_200(self): # Mock the API response responses.get( - "https://api.doppler.com/v3/workplace/roles/role/assumenda", + "https://api.doppler.com/v3/workplace/roles/role/similique", json={}, status=404, ) with self.assertRaises(ClientException): test_service = WorkplaceRoles("testkey") - test_service.get("assumenda") + test_service.get("similique") responses.reset() @responses.activate def test_update(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/workplace/roles/role/dicta", json={}, status=200 + "https://api.doppler.com/v3/workplace/roles/role/explicabo", + json={}, + status=200, ) # call the method to test test_service = WorkplaceRoles("testkey") - response = test_service.update("dicta") + response = test_service.update("explicabo") self.assertEqual(response, {}) responses.reset(), @@ -128,7 +130,7 @@ def test_update(self): def test_update_required_fields_missing(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/workplace/roles/role/ratione", + "https://api.doppler.com/v3/workplace/roles/role/eligendi", json={}, status=202, ) @@ -141,22 +143,26 @@ def test_update_required_fields_missing(self): def test_update_error_on_non_200(self): # Mock the API response responses.patch( - "https://api.doppler.com/v3/workplace/roles/role/ipsa", json={}, status=404 + "https://api.doppler.com/v3/workplace/roles/role/magnam", + json={}, + status=404, ) with self.assertRaises(ClientException): test_service = WorkplaceRoles("testkey") - test_service.update("ipsa") + test_service.update("magnam") responses.reset() @responses.activate def test_delete(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/workplace/roles/role/illo", json={}, status=200 + "https://api.doppler.com/v3/workplace/roles/role/deserunt", + json={}, + status=200, ) # call the method to test test_service = WorkplaceRoles("testkey") - response = test_service.delete("illo") + response = test_service.delete("deserunt") self.assertEqual(response, {}) responses.reset(), @@ -164,7 +170,9 @@ def test_delete(self): def test_delete_required_fields_missing(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/workplace/roles/role/optio", json={}, status=202 + "https://api.doppler.com/v3/workplace/roles/role/sapiente", + json={}, + status=202, ) with self.assertRaises(TypeError): test_service = WorkplaceRoles("testkey") @@ -175,13 +183,13 @@ def test_delete_required_fields_missing(self): def test_delete_error_on_non_200(self): # Mock the API response responses.delete( - "https://api.doppler.com/v3/workplace/roles/role/reprehenderit", + "https://api.doppler.com/v3/workplace/roles/role/libero", json={}, status=404, ) with self.assertRaises(ClientException): test_service = WorkplaceRoles("testkey") - test_service.delete("reprehenderit") + test_service.delete("libero") responses.reset()